/* /llm/index, /llm/libraries, /llm/<model> and /llm/<a>-vs-<b>. Token-only; replaces the GitHub-README inline
   sheets those pages carried (rgb(31, 35, 40) body, rgb(9, 105, 218) links, a
   green #388e3c button). Pairs with glossary.css for .gl-back. */

.llmx-wrap {
  max-width: 1040px;
}

.llmx-updated {
  margin: 1rem 0 0;
  font-size: 0.8125rem;
  color: rgb(255 255 255 / 60%);
}

/* In-page jump links under the hero. */
.llmx-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  margin: 0 0 2.5rem;
  padding: 0 0 1rem;
  list-style: none;
  border-bottom: 1px solid var(--ds-line);
  font-size: 0.875rem;
}
.llmx-jump a {
  color: var(--ds-ink-soft);
  font-weight: 600;
}
.llmx-jump a:hover {
  color: var(--ds-ink);
  text-decoration: none;
}

.llmx-prose {
  max-width: 46rem;
  color: var(--ds-ink);
  font-size: 1rem;
  line-height: 1.7;
}
.llmx-prose p {
  margin: 0 0 1rem;
}
.llmx-prose ul {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}
.llmx-prose li {
  margin-bottom: 0.35rem;
}
.llmx-note {
  color: var(--ds-ink-soft);
  font-size: 0.875rem;
}

.llmx-h2 {
  margin: 3.5rem 0 0.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--ds-ink);
  scroll-margin-top: 1.5rem;
}
.llmx-h3 {
  margin: 2rem 0 0.5rem;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--ds-ink);
}
.llmx-sub {
  max-width: 46rem;
  margin: 0 0 1.25rem;
  color: var(--ds-ink-soft);
  line-height: 1.65;
}
.llmx-soon {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ds-ink-soft);
}

/* Filter above the model tables. */
.llmx-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  margin: 1.5rem 0 0;
}
.llmx-search {
  position: relative;
  flex: 0 1 22rem;
}
.llmx-search .s-icon {
  position: absolute;
  top: 50%;
  left: 0.75rem;
  transform: translateY(-50%);
  color: var(--ds-ink-soft);
  pointer-events: none;
}
.llmx-search input {
  width: 100%;
  height: 2.25rem;
  padding: 0 0.75rem 0 2.25rem;
  border: 1px solid var(--ds-line-strong);
  border-radius: var(--border-radius-lg);
  background: #fff;
  color: var(--ds-ink);
  font-size: 0.875rem;
}
.llmx-search input:focus {
  outline: 2px solid var(--sapling-blue);
  outline-offset: 1px;
  border-color: var(--sapling-blue);
}
.llmx-count {
  font-size: 0.8125rem;
  color: var(--ds-ink-soft);
}

/* Data tables: hairline rows, no zebra. */
.llmx-table-wrap {
  /* Containing block for the cells' .sr-only text, which otherwise escapes
     the scroller and widens the page on phones. */
  position: relative;
  overflow-x: auto;
  border: 1px solid var(--ds-line);
  border-radius: var(--border-radius-lg);
  background: #fff;
}
.llmx-table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
  font-size: 0.875rem;
  color: var(--ds-ink);
}
.llmx-table th,
.llmx-table td {
  padding: 0.625rem 0.875rem;
  border-bottom: 1px solid var(--ds-line);
  text-align: left;
  vertical-align: top;
}
.llmx-table tbody tr:last-child th,
.llmx-table tbody tr:last-child td {
  border-bottom: 0;
}
.llmx-table thead th {
  background: var(--ds-surface);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ds-ink-soft);
  white-space: nowrap;
}
.llmx-table tbody tr:hover {
  background: var(--ds-surface);
}
.llmx-table a {
  color: var(--sapling-blue);
  font-weight: 600;
}
.llmx-table .llmx-num {
  font-family: var(--ds-font-mono);
  font-size: 0.8125rem;
  white-space: nowrap;
}
.llmx-table .llmx-center {
  text-align: center;
}
.llmx-table .llmx-dim {
  color: var(--ds-ink-soft);
}
.llmx-table .s-icon {
  color: var(--sapling-blue);
}
.llmx-ext {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  color: var(--ds-ink-soft) !important;
  font-weight: 400 !important;
  white-space: nowrap;
}
.llmx-ext:hover {
  color: var(--ds-ink) !important;
}
.llmx-table .llmx-dev {
  white-space: nowrap;
}
.llmx-ico {
  width: 1rem;
  height: 1rem;
  margin-right: 0.4rem;
  border: 1px solid var(--ds-line);
  border-radius: 3px;
  vertical-align: -0.2em;
}
.llmx-tag {
  display: inline-block;
  margin: 0 0.25rem 0.25rem 0;
  padding: 0 0.4rem;
  border: 1px solid var(--ds-line);
  border-radius: var(--border-radius);
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--ds-ink-soft);
  white-space: nowrap;
}
.llmx-empty td {
  padding: 1.5rem;
  text-align: center;
  color: var(--ds-ink-soft);
}

/* tablesort.css draws a #404040 caret; keep its behaviour, use the ink token. */
.llmx-table th[role=columnheader]:not(.no-sort)::after {
  border-color: var(--ds-ink-soft) transparent;
}

/* Compare picker. */
.llmx-picker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin: 0 0 1.5rem;
  padding: 1rem;
  border: 1px solid var(--ds-line);
  border-radius: var(--border-radius-lg);
  background: var(--ds-surface);
}
.llmx-picker select {
  flex: 1 1 12rem;
  min-width: 0;
  height: 2.25rem;
  padding: 0 2rem 0 0.75rem;
  border: 1px solid var(--ds-line-strong);
  border-radius: var(--border-radius-lg);
  background-color: #fff;
  color: var(--ds-ink);
  font-size: 0.875rem;
}
.llmx-vs {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ds-ink-soft);
}
.llmx-picker-error {
  flex-basis: 100%;
  margin: 0;
  font-size: 0.8125rem;
  color: var(--danger-color);
}

/* Per-model pairing lists, collapsed. Still in the DOM for crawlers. */
.llmx-pairs {
  border-top: 1px solid var(--ds-line);
}
.llmx-pairs details {
  border-bottom: 1px solid var(--ds-line);
}
.llmx-pairs summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0.25rem;
  cursor: pointer;
  list-style: none;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ds-ink);
}
.llmx-pairs summary::-webkit-details-marker {
  display: none;
}
.llmx-pairs summary .s-icon {
  color: var(--ds-ink-soft);
  transition: transform var(--transition-fast);
}
.llmx-pairs details[open] summary .s-icon {
  transform: rotate(90deg);
}
.llmx-pairs summary small {
  margin-left: auto;
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--ds-ink-soft);
}
.llmx-pairs ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
  margin: 0;
  padding: 0 0.25rem 0.9rem;
  list-style: none;
  font-size: 0.875rem;
}
.llmx-pairs a {
  color: var(--sapling-blue);
}

.llmx-cta {
  margin: 3.5rem 0 0;
  padding: 1.5rem;
  border: 1px solid var(--ds-line);
  border-radius: var(--border-radius-lg);
  background: var(--ds-surface);
}
.llmx-cta h2 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--ds-ink);
}
.llmx-cta p {
  max-width: 44rem;
  margin: 0.5rem 0 1rem;
  color: var(--ds-ink-soft);
  line-height: 1.6;
}

.llmx-faq {
  max-width: none;
  margin: 1rem 0 0;
}

.llmx-mono {
  font-family: var(--ds-font-mono);
}
.llmx-updated .llmx-ico {
  border-color: rgb(255 255 255 / 20%);
  background: #fff;
}
.llmx-dash {
  color: var(--ds-ink-soft);
}

/* Detail page: prose on the left, an at-a-glance spec panel on the right. */
.llmx-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18rem;
  gap: 3rem;
  align-items: start;
}
.llmx-h2-first {
  margin-top: 0;
}
.llmx-archived {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1.5rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--ds-line);
  border-radius: var(--border-radius-lg);
  background: var(--ds-surface);
  font-size: 0.875rem;
  color: var(--ds-ink-soft);
}
.llmx-lineage {
  font-size: 0.9375rem;
  color: var(--ds-ink-soft);
}
.llmx-lineage a,
.llmx-prose a {
  color: var(--sapling-blue);
}
.llmx-spec {
  position: sticky;
  top: 1.5rem;
  border: 1px solid var(--ds-line);
  border-radius: var(--border-radius-lg);
  background: #fff;
  font-size: 0.875rem;
}
.llmx-spec-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 5.5rem;
  padding: 1rem;
  border-bottom: 1px solid var(--ds-line);
}
.llmx-spec-logo img {
  max-width: 100%;
  max-height: 100%;
}
.llmx-spec dl {
  margin: 0;
  padding: 0.25rem 1rem;
}
.llmx-spec dt {
  padding-top: 0.625rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ds-ink-soft);
}
.llmx-spec dd {
  margin: 0;
  padding: 0.125rem 0 0.625rem;
  border-bottom: 1px solid var(--ds-line);
  color: var(--ds-ink);
  overflow-wrap: break-word;
}
.llmx-spec dd:last-of-type {
  border-bottom: 0;
}
.llmx-spec .s-icon {
  color: var(--sapling-blue);
}
.llmx-spec-links,
.llmx-cell-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
}
.llmx-spec-links {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--ds-line);
  background: var(--ds-surface);
  border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
}

/* External reference links: host, then a muted, truncated path. */
.llmx-links {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.875rem;
}
.llmx-links li {
  margin-bottom: 0.35rem;
}
.llmx-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  max-width: 100%;
  color: var(--ds-ink);
  font-weight: 600;
}
.llmx-links .llmx-path {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 400;
  color: var(--ds-ink-soft);
}
.llmx-links .s-icon {
  flex: none;
  color: var(--ds-ink-soft);
}

/* Pair links on detail and comparison pages. */
.llmx-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
  font-size: 0.8125rem;
}
.llmx-chips a {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  border: 1px solid var(--ds-line);
  border-radius: var(--border-radius);
  background: #fff;
  color: var(--ds-ink);
}
.llmx-chips a:hover {
  border-color: var(--ds-line-strong);
  text-decoration: none;
}
.llmx-chips a[aria-current] {
  border-color: var(--sapling-blue);
  color: var(--sapling-blue);
  font-weight: 600;
}

/* Comparison page. */
.llmx-vs-table {
  table-layout: fixed;
}
.llmx-vs-table th[scope=row] {
  width: 11rem;
  font-weight: 600;
  color: var(--ds-ink-soft);
}
.llmx-vs-table thead th {
  font-size: 0.9375rem;
  color: var(--ds-ink);
  white-space: normal;
}
.llmx-vs-table tbody tr:hover {
  background: none;
}
.llmx-vs-name {
  color: var(--ds-ink) !important;
}
.llmx-vs-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  margin: 2rem 0 0;
}
.llmx-vs-card h2 {
  margin: 0 0 0.75rem;
  font-size: 1.125rem;
  font-weight: 700;
}
.llmx-vs-card h2 a {
  color: var(--ds-ink);
}
.llmx-vs-card p {
  margin: 0 0 0.75rem;
  font-size: 0.9375rem;
  line-height: 1.65;
}
.llmx-vs-card .llmx-vs-short {
  color: var(--ds-ink);
}
.llmx-vs-card .llmx-h3 {
  margin-top: 1.25rem;
  font-size: 0.875rem;
}

@media (max-width: 991px) {
  .llmx-detail {
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
  }
  /* Spec panel first on narrow screens: it's the at-a-glance answer. */
  .llmx-spec {
    position: static;
    order: -1;
  }
}
@media (max-width: 767px) {
  .llmx-vs-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .llmx-vs-table th[scope=row] {
    width: 7.5rem;
  }
}

@media (max-width: 575px) {
  .llmx-search {
    flex-basis: 100%;
  }
  .llmx-picker .s-btn {
    width: 100%;
    justify-content: center;
  }
  .llmx-vs {
    display: none;
  }
}
