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

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #020617;
  background: #f9fafb;
}

body {
  display: flex;
  flex-direction: column;
}

.top-bar {
  padding: 1.25rem 2rem 0.85rem;
  border-bottom: 1px solid #e5e7eb;
  background: #ffffff;
  position: sticky;
  top: 0;
  z-index: 20;
}

.top-bar__brand {
  max-width: 72rem;
  margin: 0;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  text-decoration: none;
}

.brand-logo {
  width: 160px;
  height: 30px;
  object-fit: contain;
}

.brand-text__title {
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #020617;
}

.brand-text__subtitle {
  margin-top: 0.1rem;
  font-size: 0.85rem;
  color: #4b5563;
}

.page {
  flex: 1;
  padding: 1.5rem 2rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.panel {
  background: #ffffff;
  border-radius: 1rem;
  border: 1px solid #e5e7eb;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
  padding: 1.25rem 1.5rem 1.5rem;
  color: #111827;
}

.panel--summary {
  padding-bottom: 1.25rem;
}

.panel--methodology {
  border-style: dashed;
  border-color: rgba(148, 163, 184, 0.6);
}

.panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.9rem;
}

.panel__header h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #111827;
}

.panel__header--with-controls {
  gap: 1rem;
  align-items: flex-start;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.summary-card {
  padding: 0.9rem 1rem;
  border-radius: 0.8rem;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
}

.summary-card__label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
}

.summary-card__value {
  margin-top: 0.35rem;
  font-size: 1.5rem;
  font-weight: 600;
  color: #111827;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.1fr);
  gap: 1.5rem;
  align-items: stretch;
}

.panel--left {
  min-width: 0;
}

.panel--right {
  min-width: 0;
}


.controls {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 0.6rem;
  width: 100%;
  justify-content: flex-end;
  align-items: flex-end;
}
.control {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.control span {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #94a3b8;
}

.control input,
.control select {
  background: #ffffff;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  padding: 0.35rem 0.75rem;
  font-size: 0.95rem;
  color: #111827;
  outline: none;
}

.control input::placeholder {
  color: #9ca3af;
}

.control input:focus,
.control select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.25);
}

.control--search {
  flex: 1 1 360px;
}

select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #64748b 50%),
    linear-gradient(135deg, #64748b 50%, transparent 50%);
  background-position: calc(100% - 14px) 55%, calc(100% - 9px) 55%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.table-wrapper {
  margin-top: 0.6rem;
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  background: #ffffff;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.table thead {
  background: #f3f4f6;
}

.table th,
.table td {
  padding: 0.5rem 0.75rem;
  text-align: left;
}

.table th {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #6b7280;
  border-bottom: 1px solid #e5e7eb;
}

.table__th--numeric {
  text-align: center;
}

.table td {
  border-bottom: 1px solid #f3f4f6;
  color: #111827;
}

.table tr:nth-child(even) td {
  background: #f9fafb;
}

.table tr:nth-child(odd) td {
  background: #ffffff;
}

.table tr:hover td {
  background: #eff6ff;
  cursor: pointer;
}

.table td:nth-child(3),
.table td:nth-child(5) {
  text-align: center;
}

.pagination {
  margin-top: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: #4b5563;
}

.pagination__info {
  margin-right: auto;
}

.pagination button {
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  padding: 0.25rem 0.7rem;
  font-size: 0.9rem;
  color: #111827;
  cursor: pointer;
}

.pagination button:hover:not(:disabled) {
  border-color: #2563eb;
  background: #eff6ff;
}

.pagination button:disabled {
  opacity: 0.4;
  cursor: default;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.08rem 0.45rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.tag--state {
  background: #ecfdf3;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.tag--bigtech {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.tag--independent {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #facc15;
}

.tag--community {
  background: #fdf2ff;
  color: #a21caf;
  border: 1px solid #f9a8d4;
}

.tag--nonprofit {
  background: #ecfeff;
  color: #0f766e;
  border: 1px solid #a5f3fc;
}

.tag--academic {
  background: #eef2ff;
  color: #4338ca;
  border: 1px solid #dbeafe;
}

.score-chip {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 3.25rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
  font-size: 0.8rem;
  font-weight: 600;
  color: #111827;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
}

.score-chip--high {
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  color: #111827;
}

.score-chip--medium {
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  color: #111827;
}

.score-chip--low {
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  color: #111827;
}

.details-placeholder {
  margin-top: 0.25rem;
  padding: 0.9rem 1rem;
  border-radius: 0.75rem;
  border: 1px dashed #d1d5db;
  color: #6b7280;
  font-size: 0.95rem;
  background: #f9fafb;
}

.details-card {
  margin-top: 0.25rem;
  padding: 1rem 1.1rem 1.1rem;
  border-radius: 0.9rem;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
}

.details-card.hidden {
  display: none;
}

.details-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.details-card__title {
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
}

.details-card__meta {
  margin-top: 0.25rem;
  font-size: 0.95rem;
  color: #6b7280;
}

.details-card__score {
  text-align: right;
  flex-shrink: 0;
}

.details-card__score-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b7280;
}

.details-card__score-value {
  margin-top: 0.25rem;
  font-size: 1.6rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.details-card__section {
  margin-top: 0.9rem;
}

.details-card__section h3 {
  margin: 0 0 0.25rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #111827;
}

.details-card__text {
  margin: 0;
  font-size: 0.95rem;
  color: #4b5563;
  line-height: 1.5;
}

.dimensions-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.dimension-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.dimension-row__label {
  flex: 0 0 260px;
  font-size: 0.95rem;
  color: #111827;
}

.dimension-row__bar {
  flex: 1 1 200px;
  height: 0.6rem;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
  position: relative;
}

.dimension-row__bar-fill {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  border-radius: inherit;
  background: linear-gradient(to right, #16a34a, #2563eb);
}

.dimension-row__value {
  flex: 0 0 auto;
  text-align: left;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
  color: #4b5563;
}

.methodology-item {
  position: relative;
  padding: 1.1rem 1.25rem 1.15rem 1.25rem;
  border-radius: 1rem;
  border: 1px solid #e5e7eb;
  background: #ffffff; /* ← light card */
  overflow: hidden;
  transition: all 0.2s ease;
}

/* hover */
.methodology-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
}

/* title */
.methodology-item h3 {
  margin: 0 0 0.4rem;
  font-size: 1rem;
  font-weight: 600;
  color: #000000; /* dark */
}

/* paragraph */
.methodology-item p {
  margin: 0.2rem 0 0;
  line-height: 1.6;
  color: #4b5563; /* your original now works */
}

.methodology-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem; /* increase this */
}

code {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco,
    Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.9rem;
  background: #f3f4f6;
  padding: 0.1rem 0.25rem;
  border-radius: 0.25rem;
  border: 1px solid #e5e7eb;
}

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

  .panel--right {
    order: 2;
  }

  .panel--left {
    order: 1;
  }
}

@media (max-width: 768px) {
  .page {
    padding: 1rem;
  }

  .top-bar {
    padding: 1rem 1.25rem 0.75rem;
  }

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

  .controls {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .dimension-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .dimension-row__label {
    flex: none;
  }

  .dimension-row__value {
    flex: none;
    text-align: left;
  }
}


.dimension-item.clickable {
  cursor: pointer;
  transition: background 0.15s ease;
}

.dimension-item.clickable:hover {
  background: #f5f7fa;
}

.dimension-evidence {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 0.75rem;
  background: #fafafa;
  border: 1px solid #e5e7eb;
}

.evidence-item {
  margin-bottom: 1rem;
}

.evidence-quote {
  font-size: 0.9rem;
  color: #333;
  margin-bottom: 0.25rem;
}

.evidence-link {
  font-size: 0.8rem;
  color: #2563eb;
}