/* license-tilt — dark theme */
* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: #0b0d10;
  color: #e6edf3;
  font: 14px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Inter, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: #7dd3fc; text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: 1240px; margin: 0 auto; padding: 0 20px; }

/* header */
.site-header {
  background: linear-gradient(180deg, #0f1318 0%, #0b0d10 100%);
  border-bottom: 1px solid #1f242b;
  position: sticky; top: 0; z-index: 100;
}
.header-row {
  display: flex; align-items: center; gap: 28px; height: 56px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  color: #e6edf3; font-weight: 600; font-size: 16px;
}
.brand-mark { color: #ef4444; font-size: 18px; }
.brand:hover { text-decoration: none; }
.nav {
  display: flex; gap: 22px; flex: 1;
}
.nav a {
  color: #9aa5b1; font-size: 14px;
}
.nav a:hover { color: #e6edf3; text-decoration: none; }
.header-meta { color: #7dd3fc; font-size: 12px; }

/* footer */
.site-footer {
  margin-top: 64px; padding: 28px 0;
  border-top: 1px solid #1f242b;
  background: #0d1014;
}
.site-footer .container { display: flex; gap: 24px; justify-content: space-between; flex-wrap: wrap; }

/* shared */
.muted { color: #7d8794; }
.section-title { font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: #7d8794; margin: 24px 0 12px; }
h1 { font-size: 26px; margin: 28px 0 6px; font-weight: 600; }
h2 { font-size: 18px; margin: 24px 0 8px; font-weight: 600; }
h3 { font-size: 15px; margin: 12px 0 6px; font-weight: 600; }
p { margin: 6px 0; color: #c9d1d9; }
hr { border: none; border-top: 1px solid #1f242b; margin: 24px 0; }
.lead { color: #9aa5b1; font-size: 16px; max-width: 740px; }
.row { display: grid; gap: 16px; }
.row.cols-3 { grid-template-columns: repeat(3, 1fr); }
.row.cols-4 { grid-template-columns: repeat(4, 1fr); }
.row.cols-2 { grid-template-columns: 2fr 1fr; }
@media (max-width: 900px) {
  .row.cols-3, .row.cols-4, .row.cols-2 { grid-template-columns: 1fr; }
}

.card {
  background: #14181d;
  border: 1px solid #22272e;
  border-radius: 8px;
  padding: 16px 18px;
}
.card.tight { padding: 10px 14px; }
.card .label {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: #7d8794;
}
.card .stat {
  font-size: 28px; font-weight: 600; margin-top: 4px; color: #e6edf3;
}
.card .stat.small { font-size: 18px; }
.card .stat.accent { color: #7dd3fc; }
.card .stat.warn { color: #f97316; }
.card .stat.crit { color: #ef4444; }
.card .sub { color: #7d8794; font-size: 12px; margin-top: 4px; }

/* tables */
table.t {
  width: 100%; border-collapse: collapse; font-size: 13px;
}
table.t th, table.t td {
  text-align: left; padding: 8px 10px; border-bottom: 1px solid #1f242b;
}
table.t th {
  font-weight: 500; text-transform: uppercase; font-size: 11px; letter-spacing: 0.06em; color: #7d8794;
  background: #11151a;
}
table.t tr:hover td { background: #161b22; }
table.t td.num { text-align: right; font-variant-numeric: tabular-nums; }

/* license category chips */
.chip {
  display: inline-block; padding: 2px 8px;
  border-radius: 4px; font-size: 11px; font-weight: 500;
  border: 1px solid transparent;
}
.chip-permissive       { background: #14321f; color: #22c55e; border-color: #1f4a2f; }
.chip-weak-copyleft    { background: #3a2d10; color: #fbbf24; border-color: #54421a; }
.chip-strong-copyleft  { background: #3a2010; color: #f97316; border-color: #573219; }
.chip-source-available { background: #3a1414; color: #ef4444; border-color: #571f1f; }
.chip-proprietary      { background: #2a1a3a; color: #a855f7; border-color: #3e2557; }
.chip-unknown          { background: #1a1f26; color: #64748b; border-color: #2a313b; }

/* direction icons */
.dir { font-weight: 600; padding: 0 4px; }
.dir-more-restrictive { color: #ef4444; }
.dir-more-permissive  { color: #22c55e; }
.dir-lateral          { color: #7d8794; }
.dir-first-seen       { color: #7dd3fc; }

/* package name */
.pkg-name { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: #e6edf3; }
.pkg-eco {
  display: inline-block; padding: 1px 6px; margin-right: 6px;
  background: #1a1f26; color: #9aa5b1; border-radius: 3px; font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.06em;
}

/* feed item */
.feed-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 16px;
  padding: 12px 0;
  border-bottom: 1px solid #1f242b;
}
.feed-item:last-child { border-bottom: none; }
.feed-item .title { font-size: 14px; }
.feed-item .meta { color: #7d8794; font-size: 12px; }

/* form bits */
.controls {
  display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0;
}
.controls input, .controls select {
  background: #11151a; color: #e6edf3;
  border: 1px solid #22272e; border-radius: 6px;
  padding: 6px 10px; font: inherit;
}
.controls input:focus, .controls select:focus {
  outline: none; border-color: #7dd3fc;
}
button.btn {
  background: #1a232c; color: #7dd3fc;
  border: 1px solid #22272e; border-radius: 6px;
  padding: 6px 14px; font: inherit; cursor: pointer;
}
button.btn:hover { background: #1f2a36; }

.pager {
  display: flex; gap: 8px; align-items: center; margin: 18px 0;
}

/* timeline chart wrapper */
.chart-box { background: #14181d; border: 1px solid #22272e; border-radius: 8px; padding: 14px; }
.chart-box canvas { max-height: 260px; }

/* risk panel */
.risk-bar {
  height: 6px; background: #1f242b; border-radius: 3px; overflow: hidden;
}
.risk-bar > span {
  display: block; height: 100%;
  background: linear-gradient(90deg, #22c55e 0%, #fbbf24 50%, #ef4444 100%);
}

/* empty / loading */
.empty {
  padding: 32px 0; text-align: center; color: #7d8794;
}
.spinner {
  display: inline-block; width: 14px; height: 14px;
  border: 2px solid #22272e; border-top-color: #7dd3fc; border-radius: 50%;
  animation: spin 0.7s linear infinite; vertical-align: -2px; margin-right: 6px;
}
@keyframes spin { to { transform: rotate(360deg); } }
