/* Home: three results from the performance page (assets/data/performance.js), CrushFTP 11 vs CrushMFT27.
   Same chart language as performance.css: CrushMFT27 in the data blue, CrushFTP 11 in recessive gray,
   12px bars square at the baseline, values printed beside the bars. */

:root,
:root[data-theme="dark"] { --pt-v11: #6f787f; --pt-v27: #3987e5; }
:root[data-theme="light"] { --pt-v11: #8b959c; --pt-v27: #2a78d6; }

.perf-teaser .view-sub { margin-top: 12px; }
.pt-legend { display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--ink); font-size: .8125rem; font-weight: 650; }
.pt-legend li { display: inline-flex; align-items: center; gap: 8px; }
.pt-legend i { width: 14px; height: 10px; border-radius: 0 3px 3px 0; background: var(--pt-v11); }
.pt-legend i.v27 { background: var(--pt-v27); }

.pt-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pt-card {
  position: relative;
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-content: start; column-gap: 8px;
  padding: 15px 18px 14px;
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--panel);
}
.pt-card::after {
  content: ""; position: absolute; left: 18px; right: 18px; top: -1px; height: 2px; border-radius: 0 0 2px 2px;
  background: var(--pt-v27);
}
.pt-card > * { grid-column: 1 / -1; }
.pt-card > .pt-fig { grid-column: 1; }
.pt-card > .pt-tail { grid-column: 2; align-self: end; padding-bottom: 4px; }
.pt-fig { display: flex; align-items: baseline; color: var(--strong); font-weight: 750; line-height: 1; letter-spacing: -.04em; }
.pt-n { font-size: clamp(2.75rem, 2.2rem + 1vw, 3.25rem); }
.pt-pre { margin-right: 6px; color: var(--muted); font-size: 1rem; font-weight: 650; letter-spacing: 0; }
.pt-x { margin-left: 1px; font-size: 1.5rem; }
.pt-tail { color: var(--muted); font-size: .875rem; font-weight: 650; }
.pt-card h3 { margin-top: 8px; font-size: .9688rem; line-height: 1.3; }

.pt-bars { display: grid; gap: 6px; margin-top: 10px; }
.pt-bar { --c: var(--pt-v11); display: flex; align-items: center; gap: 10px; min-width: 0; }
.pt-bar.v27 { --c: var(--pt-v27); }
.pt-fill {
  flex: none; height: 12px;
  width: max(3px, calc((100% - 9.5rem) * var(--f)));
  border-radius: 0 4px 4px 0;
  background: linear-gradient(90deg, var(--c) var(--split, 100%), color-mix(in srgb, var(--c) 42%, transparent) var(--split, 100%));
  transform-origin: left center;
}
.pt-bar span:last-child { color: var(--muted); font-size: .8125rem; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pt-bar.v27 span:last-child { color: var(--strong); }
/* v11 did not finish: the bar leaves the scale, hatched and fading */
.pt-open .pt-fill {
  width: calc(100% - 9.5rem);
  background: repeating-linear-gradient(135deg, var(--c) 0 5px, color-mix(in srgb, var(--c) 35%, transparent) 5px 9px);
  -webkit-mask-image: linear-gradient(90deg, #000 70%, transparent);
  mask-image: linear-gradient(90deg, #000 70%, transparent);
}
.pt-hint { margin-top: 6px; color: var(--faint); font-size: .75rem; }

.pt-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-top: 18px; }
.pt-foot .pt-source { color: var(--faint); font-size: .875rem; }

/* the two capacity figures, set as plain facts under the comparison */
.pt-facts { display: grid; grid-template-columns: minmax(0, 220px) repeat(2, minmax(0, 1fr)); gap: 16px 40px; margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--line); }
.pt-facts h3 { font-size: 1.125rem; }
.pt-fact { display: grid; gap: 8px; align-content: start; }
.pt-fact-n { color: var(--strong); font-size: clamp(2rem, 1.6rem + 1.2vw, 2.75rem); font-weight: 750; line-height: 1; letter-spacing: -.035em; }
.pt-fact p:not(.pt-fact-n) { max-width: 46ch; color: var(--muted); font-size: .9375rem; }
.pt-fact strong { color: var(--ink); font-weight: 650; }

@media (max-width: 960px) {
  .pt-cards { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .pt-facts { grid-template-columns: minmax(0, 1fr); gap: 20px; }
}
@media (max-width: 720px) {
  .pt-card { padding: 13px 14px 12px; }
  .pt-card::after { left: 14px; right: 14px; }
  .pt-foot .btn { flex: 1 1 auto; }
}
