/* Shared Guides / reference detail styles (models, chains, hubs). */
.ref-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.5rem 1rem;
  background: #171717;
  color: #fff;
  text-decoration: none;
}
.ref-skip:focus {
  left: 0.75rem;
  top: 0.75rem;
}

.ref-crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  font-size: 0.875rem;
  color: #666;
  margin: 0 0 1.25rem;
}
.ref-crumbs a {
  color: #666;
  text-decoration: none;
}
.ref-crumbs a:hover {
  color: #222;
  text-decoration: underline;
}
.ref-crumbs-sep {
  opacity: 0.5;
  user-select: none;
}
.ref-crumbs [aria-current="page"] {
  color: #222;
  font-weight: 600;
}

.back-link {
  display: inline-block;
  color: #666;
  text-decoration: none;
  margin-bottom: 1.5rem;
}
.back-link:hover {
  color: #222;
}

.model-header,
.chain-header {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.model-title-group,
.chain-title-group {
  flex: 1;
  min-width: 200px;
}
.model-name,
.chain-name {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
}
.model-family,
.chain-ticker {
  font-size: 1rem;
  color: #666;
}
.model-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-weight: 600;
  color: #fff;
}
.chain-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-weight: 600;
  background: #dbeafe;
  color: #1e40af;
}
.model-meta,
.chain-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}
.model-meta-item,
.chain-meta-item {
  padding: 1rem;
  background: #f9f9f9;
  border-radius: 8px;
}
.model-meta-label,
.chain-meta-label {
  font-size: 0.75rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.model-meta-value,
.chain-meta-value {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 0.25rem;
}
.model-arch {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 1rem 0;
}
.arch-tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: #f3f4f6;
  border-radius: 4px;
  font-size: 0.875rem;
}
.model-desc,
.chain-desc {
  line-height: 1.7;
  color: #444;
  max-width: 700px;
}
.model-sources,
.chain-sources {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e5e5e5;
}
.model-sources h3,
.chain-sources h3 {
  font-size: 1rem;
  margin-bottom: 0.75rem;
}
.model-sources a,
.chain-sources > a {
  display: block;
  color: #2563eb;
  text-decoration: none;
  margin: 0.5rem 0;
}
.model-sources a:hover,
.chain-sources > a:hover {
  text-decoration: underline;
}
.chain-explorer-list {
  margin: 0.35rem 0 0 0;
  padding-left: 1.25rem;
}
.chain-explorer-list li {
  margin: 0.35rem 0;
}
.chain-explorers .chain-explorer-list a {
  display: inline;
  color: #2563eb;
  text-decoration: none;
  margin: 0;
}
.chain-explorers .chain-explorer-list a:hover {
  text-decoration: underline;
}

.model-diagram {
  margin: 1.5rem 0 2rem;
  max-width: 900px;
}
.model-diagram img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid #e5e5e5;
  background: #0b0b0b;
  display: block;
}
.model-diagram figcaption {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: #666;
}

.ref-table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
}
.ref-table th,
.ref-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid #e5e5e5;
}
.ref-table th {
  background: #f5f5f5;
  font-weight: 600;
  font-size: 0.875rem;
}
.ref-table tr:hover {
  background: #fafafa;
}
.ref-table a {
  color: #2563eb;
  text-decoration: none;
}
.ref-table a:hover {
  text-decoration: underline;
}
.ref-thumb-cell {
  width: 108px;
}
.ref-thumb {
  width: 96px;
  height: 54px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #e5e5e5;
  background: #111;
  display: block;
}
.badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
}
.badge--small {
  background: #e5e7eb;
  color: #374151;
}
.badge--medium {
  background: #dbeafe;
  color: #1e40af;
}
.badge--large {
  background: #fef3c7;
  color: #92400e;
}
.badge--xlarge {
  background: #fee2e2;
  color: #991b1b;
}
.filters {
  display: flex;
  gap: 1rem;
  margin: 1.5rem 0;
  flex-wrap: wrap;
}
.filter-select {
  padding: 0.5rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.875rem;
  background: white;
}

.concept-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}
.concept-card {
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.concept-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.concept-card-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: #f5f5f5;
}
.concept-card-body {
  padding: 1rem;
}
.concept-card-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
}
.concept-card-group {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  background: #f3f4f6;
}
.concept-card-desc {
  font-size: 0.875rem;
  color: #666;
  margin-top: 0.5rem;
}

.selector-container {
  max-width: 800px;
  margin: 0 auto;
}
.selector-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-align: center;
}
.selector-subtitle {
  text-align: center;
  color: #666;
  margin-bottom: 2rem;
}
.selector-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.filter-group label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #666;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.filter-group select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.875rem;
  background: white;
}
.results-count {
  text-align: center;
  color: #666;
  margin-bottom: 1rem;
}
.results-grid {
  display: grid;
  gap: 1rem;
}
.result-card {
  display: block;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 1.25rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.result-card:hover {
  border-color: #2563eb;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.1);
}
.result-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}
.result-card-name {
  font-weight: 600;
  font-size: 1.125rem;
}
.result-card-family {
  font-size: 0.75rem;
  color: #888;
}
.result-card-meta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.875rem;
}
.result-card-meta span {
  color: #666;
}
.result-card-arch {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}
.arch-pill {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  background: #f3f4f6;
  border-radius: 4px;
  font-size: 0.75rem;
}
.result-card-link {
  display: inline-block;
  margin-top: 0.75rem;
  color: #2563eb;
  font-size: 0.875rem;
}
.no-results {
  text-align: center;
  padding: 3rem;
  color: #888;
}

.footer-privacy {
  margin-top: 0.35rem;
  font-size: 0.8rem;
  color: #888;
}
.footer-privacy a {
  color: #666;
}

/* Dark theme — matches hub pablobot_theme_v1 / [data-theme="dark"] */
[data-theme="dark"] {
  color-scheme: dark;
}
[data-theme="dark"] .ref-crumbs,
[data-theme="dark"] .ref-crumbs a,
[data-theme="dark"] .back-link,
[data-theme="dark"] .model-family,
[data-theme="dark"] .chain-ticker,
[data-theme="dark"] .model-diagram figcaption,
[data-theme="dark"] .concept-card-desc,
[data-theme="dark"] .selector-subtitle,
[data-theme="dark"] .results-count,
[data-theme="dark"] .result-card-meta span,
[data-theme="dark"] .result-card-family,
[data-theme="dark"] .footer-privacy,
[data-theme="dark"] .footer-privacy a {
  color: #a3a3a3;
}
[data-theme="dark"] .ref-crumbs [aria-current="page"],
[data-theme="dark"] .back-link:hover,
[data-theme="dark"] .ref-crumbs a:hover {
  color: #f5f5f5;
}
[data-theme="dark"] .model-meta-item,
[data-theme="dark"] .chain-meta-item {
  background: #262626;
}
[data-theme="dark"] .model-meta-label,
[data-theme="dark"] .chain-meta-label {
  color: #a3a3a3;
}
[data-theme="dark"] .arch-tag,
[data-theme="dark"] .arch-pill,
[data-theme="dark"] .concept-card-group {
  background: #333;
  color: #e5e5e5;
}
[data-theme="dark"] .model-desc,
[data-theme="dark"] .chain-desc {
  color: #d4d4d4;
}
[data-theme="dark"] .model-sources,
[data-theme="dark"] .chain-sources {
  border-top-color: #404040;
}
[data-theme="dark"] .model-diagram img,
[data-theme="dark"] .ref-thumb {
  border-color: #404040;
}
[data-theme="dark"] .ref-table th,
[data-theme="dark"] .ref-table td {
  border-bottom-color: #404040;
}
[data-theme="dark"] .ref-table th {
  background: #262626;
}
[data-theme="dark"] .ref-table tr:hover {
  background: #1f1f1f;
}
[data-theme="dark"] .filter-select,
[data-theme="dark"] .filter-group select {
  background: #171717;
  border-color: #404040;
  color: #f5f5f5;
}
[data-theme="dark"] .concept-card,
[data-theme="dark"] .result-card {
  border-color: #404040;
  background: #171717;
}
[data-theme="dark"] .concept-card-img {
  background: #262626;
}
[data-theme="dark"] .chain-badge {
  background: #1e3a5f;
  color: #93c5fd;
}

/* Compare tables */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.875rem;
}
.compare-table th,
.compare-table td {
  padding: 0.625rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid #e5e5e5;
}
.compare-table th {
  background: #f5f5f5;
  font-weight: 600;
  position: sticky;
  top: 0;
}
.compare-table tr:hover {
  background: #fafafa;
}
.compare-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.compare-table th.sortable {
  cursor: pointer;
  user-select: none;
}
.compare-table th.sortable:hover {
  background: #e5e5e5;
}
.compare-table th.sorted-asc::after {
  content: " \2191";
}
.compare-table th.sorted-desc::after {
  content: " \2193";
}
.layer-badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
}
.layer-L0 {
  background: #fef3c7;
  color: #92400e;
}
.layer-L1 {
  background: #dbeafe;
  color: #1e40af;
}
.layer-L2 {
  background: #d1fae5;
  color: #065f46;
}
.cons-tag {
  display: inline-block;
  padding: 0.125rem 0.375rem;
  background: #f3f4f6;
  border-radius: 3px;
  font-size: 0.75rem;
}
.table-wrap {
  overflow-x: auto;
  min-width: 0;
}
@media (max-width: 720px) {
  .compare-table {
    font-size: 0.8125rem;
  }
  .compare-table th,
  .compare-table td {
    padding: 0.45rem 0.5rem;
  }
  .filters {
    flex-direction: column;
    align-items: stretch;
  }
  .filter-select {
    width: 100%;
  }
}

/* Families hub */
.family-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}
.family-card {
  display: block;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 1.5rem;
  transition: box-shadow 0.2s;
  text-decoration: none;
  color: inherit;
}
.family-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.family-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.family-color {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.family-name {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
}
.family-provider {
  font-size: 0.875rem;
  color: #666;
  margin-bottom: 0.75rem;
}
.family-desc {
  font-size: 0.875rem;
  color: #444;
  line-height: 1.5;
  margin-bottom: 1rem;
}
.family-stats {
  font-size: 0.75rem;
  color: #888;
}

[data-theme="dark"] .compare-table th,
[data-theme="dark"] .compare-table td {
  border-bottom-color: #404040;
}
[data-theme="dark"] .compare-table th {
  background: #262626;
}
[data-theme="dark"] .compare-table th.sortable:hover {
  background: #333;
}
[data-theme="dark"] .compare-table tr:hover {
  background: #1f1f1f;
}
[data-theme="dark"] .cons-tag {
  background: #333;
  color: #e5e5e5;
}
[data-theme="dark"] .family-card {
  border-color: #404040;
  background: #171717;
}
[data-theme="dark"] .family-provider,
[data-theme="dark"] .family-stats {
  color: #a3a3a3;
}
[data-theme="dark"] .family-desc {
  color: #d4d4d4;
}
