/* notes-tall.css — Notes de tall (cercador + grau + universitat). Mobile-first,
   només var(--...) del tokens.css. */

.nt-intro { color: var(--text-muted); margin-top: 0; }
.nt-intro a { white-space: nowrap; }

/* Filtres del cercador (en viu; sense botó) */
.nt-filters { display: grid; gap: var(--space-3); margin-block: var(--space-4) var(--space-3); }
.nt-filters input, .nt-filters select {
  width: 100%; padding: var(--space-3); font-size: var(--size-base);
  border: var(--border-width) solid var(--border); border-radius: var(--radius-md);
  background: var(--surface); color: var(--text); min-height: var(--tap-target);
}
@media (min-width: 34rem) {
  .nt-filters { grid-template-columns: 1fr auto; align-items: center; }
  .nt-filters input { min-width: 12rem; }
}
.nt-count { color: var(--text-muted); font-size: var(--size-sm); margin: 0 0 var(--space-3); }

/* Cercador: graus desplegables amb històric i mini gràfic */
.nt-items { margin: 0; }
.nt-item { border-bottom: var(--border-width) solid var(--border); }
.nt-item[hidden] { display: none; }
.nt-item > summary {
  display: flex; align-items: center; gap: var(--space-3);
  padding-block: var(--space-3); min-height: var(--tap-target); cursor: pointer;
  list-style: none;
}
.nt-item > summary::-webkit-details-marker { display: none; }
.nt-item > summary::after { content: "▸"; flex: none; color: var(--text-muted); }
.nt-item[open] > summary::after { content: "▾"; }
.nt-item-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.nt-item > summary:hover .nt-name { color: var(--accent); }
.nt-detail { padding: 0 0 var(--space-4); }
.nt-years { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); font-size: var(--size-sm); color: var(--text-muted); }
.nt-year b { color: var(--text); font-family: var(--font-mono); }
/* El gràfic ocupa l'esquerra (70-80%) i els KPIs una columna de 2 files a la
   dreta (variació a dalt, places a baix), igual a escriptori i a mòbil. */
.nt-viz { display: flex; align-items: center; gap: var(--space-4); margin: var(--space-3) 0; }
.nt-chart { flex: 1 1 auto; min-width: 0; color: var(--accent); }
.nt-chart:empty { display: none; }
.nt-chart svg { width: 100%; height: auto; overflow: visible; }
.nt-kpis { flex: 0 0 auto; display: flex; flex-direction: column; gap: var(--space-4); }
.nt-kpi { display: flex; flex-direction: column; gap: 2px; }
.nt-kpi-label { font-size: var(--size-xs); color: var(--text-muted); text-transform: uppercase; letter-spacing: .02em; }
.nt-kpi-val {
  display: inline-flex; align-items: center; gap: var(--space-1); line-height: 1;
  font-family: var(--font-display); font-weight: var(--weight-bold);
  font-size: var(--size-2xl); color: var(--text); font-variant-numeric: tabular-nums;
}
.nt-kpi-arrow { font-size: var(--size-lg); }
.nt-kpi-val.up .nt-kpi-arrow { color: var(--success); }
.nt-kpi-val.down .nt-kpi-arrow { color: var(--danger); }
.nt-kpi-val.flat .nt-kpi-arrow { color: var(--text-muted); }
@media (max-width: 33.99rem) {
  .nt-kpi-val { font-size: var(--size-xl); }
  .nt-kpi-arrow { font-size: var(--size-base); }
}
.nt-chart-val { fill: var(--text); font-family: var(--font-mono); font-size: 11px; font-weight: var(--weight-bold); }
.nt-chart-yr { fill: var(--text-muted); font-family: var(--font-mono); font-size: 10px; }
.nt-degree-link { display: inline-block; font-size: var(--size-sm); margin-top: var(--space-1); }
.nt-noresults { color: var(--text-muted); padding-block: var(--space-4); }

/* Llista de graus (cercador i pàgina d'universitat) */
.nt-list { list-style: none; padding: 0; margin: 0; }
.nt-list li {
  display: flex; align-items: center; gap: var(--space-3);
  border-bottom: var(--border-width) solid var(--border); padding-block: var(--space-2);
}
.nt-list li > a {
  flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px;
  text-decoration: none; color: var(--text); min-height: var(--tap-target); justify-content: center;
}
.nt-list li > a:hover .nt-name { color: var(--accent); }
.nt-name { font-weight: var(--weight-bold); }
.nt-uni { font-size: var(--size-sm); color: var(--text-muted); }
.nt-nota {
  flex: none; font-family: var(--font-mono); font-variant-numeric: tabular-nums;
  font-size: var(--size-lg); font-weight: var(--weight-bold); color: var(--accent);
}
.nt-empty { color: var(--text-muted); justify-content: flex-start; }

/* Taula d'un grau: universitats × anys */
.nt-table-wrap { overflow-x: auto; margin-block: var(--space-4); border: var(--border-width) solid var(--border); border-radius: var(--radius-lg); }
.nt-table { border-collapse: collapse; width: 100%; font-size: var(--size-sm); }
.nt-table th, .nt-table td { padding: var(--space-3); text-align: right; white-space: nowrap; border-bottom: var(--border-width) solid var(--border); }
.nt-table thead th { background: var(--surface-alt); color: var(--text-muted); font-size: var(--size-xs); text-transform: uppercase; letter-spacing: .02em; position: sticky; top: 0; }
.nt-table th:first-child, .nt-table td:first-child { text-align: left; white-space: normal; }
.nt-table tbody tr:last-child td { border-bottom: 0; }
.nt-table td a { text-decoration: none; font-weight: var(--weight-bold); }
.nt-cell { font-family: var(--font-mono); font-variant-numeric: tabular-nums; color: var(--accent); font-weight: var(--weight-bold); }
.nt-places { font-family: var(--font-mono); color: var(--text-muted); }
.nt-muni { display: block; font-size: var(--size-xs); color: var(--text-muted); font-weight: var(--weight-normal); }

/* Navega per universitat */
.nt-browse { margin-top: var(--space-7); }
.nt-unis { list-style: none; padding: 0; margin: var(--space-3) 0 0; display: flex; flex-wrap: wrap; gap: var(--space-2); }
.nt-unis a {
  display: inline-flex; align-items: center; min-height: var(--tap-target); padding: var(--space-2) var(--space-4);
  border: var(--border-width) solid var(--border); border-radius: var(--radius-full);
  background: var(--surface); color: var(--text); text-decoration: none; font-weight: var(--weight-bold);
}
.nt-unis a:hover { border-color: var(--accent); color: var(--accent); }

.nt-source { margin-top: var(--space-7); font-size: var(--size-sm); color: var(--text-muted); }
