/* SPDX-License-Identifier: GPL-3.0-or-later */
/* leyr.stream/technology: the measured numbers, the platform lists and the
   stack. Everything else comes from site.css. */

.tech-hero h1 { max-width: 17ch; }

.stats { display: grid; gap: 1px; grid-template-columns: 1fr 1fr; margin: 8px 0 0; padding: 0; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; list-style: none; }
.stats li { background: var(--surface); padding: 22px 20px; min-width: 0; }
.stats b { display: block; font-size: clamp(26px, 4vw, 36px); font-weight: 700; letter-spacing: -0.03em; color: var(--accent-ink); line-height: 1.1; font-variant-numeric: tabular-nums; }
.stats span { display: block; margin-top: 6px; font-size: 14px; color: var(--fg-2); }
@media (min-width: 760px) { .stats { grid-template-columns: repeat(5, 1fr); } }

.stats-note { margin: 14px 0 0; font-size: 13.5px; color: var(--fg-3); }
.stats-note a, .tech-link { color: var(--accent-ink); }

@media (min-width: 760px) { .specs.three { grid-template-columns: repeat(3, 1fr); } }

.platforms { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .platforms { grid-template-columns: 1fr 1fr; } }
.platform { padding: 28px; border-radius: var(--r-lg); border: 1px solid var(--line-2); background: var(--surface); min-width: 0; }
.platform h3 { font-size: 19px; letter-spacing: -0.02em; margin: 0 0 8px; }
.platform p { margin: 0 0 12px; color: var(--fg-2); font-size: 15px; }
.platform ul { margin: 0; padding-left: 18px; color: var(--fg-2); font-size: 15px; }
.platform li + li { margin-top: 4px; }

.stack { display: grid; gap: 0; margin: 0; border-top: 1px solid var(--line-2); }
.stack div { display: grid; gap: 4px 24px; grid-template-columns: 1fr; padding: 16px 0; border-bottom: 1px solid var(--line); }
@media (min-width: 640px) { .stack div { grid-template-columns: 9rem 1fr; } }
.stack dt { font-weight: 640; }
.stack dd { margin: 0; color: var(--fg-2); }

.cmp-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.cmp { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
.cmp caption { caption-side: bottom; text-align: left; padding: 10px 16px; font-size: 13px; color: var(--fg-3); }
.cmp th, .cmp td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); }
.cmp thead th { font-size: 13px; color: var(--fg-2); font-weight: 600; }
.cmp tbody th { font-weight: 560; }
.cmp td { color: var(--fg-2); white-space: nowrap; }
.cmp td.win { color: var(--accent-ink); font-weight: 680; }
@media (max-width: 759px) {
  .cmp-wrap { overflow: visible; border: 0; background: none; }
  .cmp thead { display: none; }
  .cmp, .cmp tbody, .cmp tr, .cmp th, .cmp td { display: block; width: 100%; }
  .cmp tr { margin-bottom: 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
  .cmp tbody th { border-bottom: 1px solid var(--line); }
  .cmp td { display: flex; justify-content: space-between; gap: 12px; border-bottom: 0; padding: 6px 16px; }
  .cmp td::before { content: attr(data-label); color: var(--fg-3); }
  .cmp caption { display: block; padding: 0 0 8px; }
}

/* server logos in the comparison tables */
[data-srv="leyr"] { --logo: url(/brand/leyr-mark.svg); }
[data-srv="navidrome"] { --logo: url(/technology/logos/navidrome.svg); }
[data-srv="gonic"] { --logo: url(/technology/logos/gonic.svg); }
[data-srv="jellyfin"] { --logo: url(/technology/logos/jellyfin.svg); }
[data-srv="plex"] { --logo: url(/technology/logos/plex.svg); }
.srv { display: inline-flex; align-items: center; gap: 8px; }
.srv-logo { width: 20px; height: 20px; flex: none; }
@media (max-width: 759px) {
  .cmp td[data-srv]::before { padding-left: 26px; background: var(--logo) no-repeat left center / 18px 18px; }
}

/* benchmark page */
.cmp.bench { font-size: 14px; }
.cmp.bench td { white-space: normal; vertical-align: top; }
.cmp.bench code { font-size: 12.5px; overflow-wrap: anywhere; }
.bench-toc { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.bench-toc a { color: var(--fg-2); font-size: 15px; }
.plain { margin: 0; padding-left: 18px; color: var(--fg-2); }
.plain li + li { margin-top: 6px; }
#results-public h3, #results-real h3 { margin: 32px 0 10px; font-size: 18px; letter-spacing: -0.02em; }
.repro h3 { font-size: 17px; margin: 24px 0 8px; }
.repro pre { margin: 0 0 12px; padding: 14px 16px; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); font-size: 13px; }
.repro p { color: var(--fg-2); max-width: 70ch; }
.dl td:last-child code { word-break: break-all; font-size: 11.5px; }
@media (max-width: 759px) {
  .cmp.bench tbody th { background: none; }
  .cmp.bench td { align-items: baseline; }
  .cmp.bench td[data-label] { flex-direction: column; gap: 2px; }
}
