/* The comparison post (hs 850): head, summary box with the score, feature table, charts with their data and the sources.
   Loaded on posts only, after site.css, whose tokens (DESIGN.md 2 to 4) it uses. One accent: Play Strawberry's marks are
   berry, every other host is one grey, an even point is a hollow square; the words always say the same thing. */
:root { --chart-home: #ce2853; --chart-other: #7d878e; --chart-track: var(--surface); }
@media (prefers-color-scheme: dark) { :root { --chart-home: #e8456f; --chart-other: #b8c0c6; } }

.post { width: min(720px, calc(100% - 32px)); margin-inline: auto; padding-block: 40px 72px; }
.post-back { font-size: var(--fs-sm); }
.post-back a { display: inline-flex; align-items: center; min-height: 32px; color: var(--muted); text-decoration: underline; text-underline-offset: 4px; }
.post-back a:hover { color: var(--berry-text); }
.post-head h1 { margin-top: 8px; font-size: clamp(1.75rem, 3.2vw, 2.25rem); line-height: 1.15; letter-spacing: var(--tracking-display); text-wrap: balance; }
.post-dek { margin-top: 16px; color: var(--muted); font-size: var(--fs-xl); line-height: 1.55; max-width: 60ch; }
.post-meta { margin-top: 16px; color: var(--muted); font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }

.post-body { margin-top: 32px; font-size: var(--fs-lg); line-height: 1.7; }
.post-body > p { max-width: 68ch; }
.post-body > p + p, .post-body > ul + p, .post-body > p + ul { margin-top: 16px; }
.post-body > h2 { margin-block: 56px 12px; font-size: var(--fs-2xl); line-height: 1.25; scroll-margin-top: 24px; }
.post-body > h3 { margin-block: 32px 8px; font-size: var(--fs-xl); line-height: 1.3; letter-spacing: 0; }
.post-body > ul { margin: 0; padding-inline-start: 20px; max-width: 68ch; }
.post-body > ul li + li { margin-top: 8px; }
.post-body li::marker { color: var(--muted); }

/* The summary box: the short answer, the score in squares, then who should pick which. */
.post-summary { margin-block: 0 40px; padding: 24px 28px; border-radius: var(--r-card); background: var(--surface); }
.post-summary h2 { font-size: var(--fs-xl); line-height: 1.3; letter-spacing: 0; }
.post-summary > p { margin-top: 8px; }
.post-score { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.post-score-line { font-weight: var(--fw-semibold); }
.post-pixels, .post-score-legend, .post-summary-points, .post-bars ol, .post-legend, .post-sources ul, .post-more ul { list-style: none; margin: 0; padding: 0; }
.post-pixels { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 12px; }
.post-pixel { display: inline-block; flex-shrink: 0; width: 20px; height: 20px; border-radius: 3px; background: var(--chart-other); }
.post-pixel-home { background: var(--chart-home); }
.post-pixel-even { background: transparent; box-shadow: inset 0 0 0 1.5px var(--muted); }
.post-score-legend { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 12px; color: var(--muted); font-size: var(--fs-sm); }
.post-score-legend li { display: inline-flex; align-items: center; gap: 8px; }
.post-score-legend .post-pixel, .post-edge .post-pixel { width: 12px; height: 12px; border-radius: 2px; }
.post-count { color: var(--text); font-weight: var(--fw-bold); font-variant-numeric: tabular-nums; }
.post-summary-points { display: grid; gap: 8px; margin-top: 20px; }
.post-summary-points li { position: relative; padding-inline-start: 20px; }
.post-summary-points li::before { content: ""; position: absolute; inset-inline-start: 2px; top: .62em; width: 6px; height: 6px; border-radius: 1px; background: var(--muted); }

/* The feature table. With more than two hosts it may use more width than the text column on a wide screen. */
.post-compare { margin-block: 32px 40px; overflow-x: auto; }
.post-compare table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); line-height: 1.5; }
.post-compare thead th { padding: 0 12px 10px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: var(--fs-xs); font-weight: var(--fw-semibold); text-align: start; vertical-align: bottom; }
.post-compare tbody :is(th, td) { padding: 14px 12px; border-bottom: 1px solid var(--line); text-align: start; vertical-align: top; }
.post-compare :is(th, td):first-child { padding-inline-start: 0; }
.post-compare :is(th, td):last-child { padding-inline-end: 0; }
.post-compare tbody th { width: 24%; font-weight: var(--fw-semibold); }
.post-edge { white-space: nowrap; font-weight: var(--fw-semibold); }
.post-edge .post-pixel { margin-inline-end: 8px; vertical-align: -1px; }
/* A point that is not open on Play Strawberry yet: quiet, and in no one's score (hoststrawberry 1289). */
.post-edge-coming { color: var(--muted); font-weight: var(--fw-regular); }
@media (min-width: 1040px) {
  .post-compare:not(.post-compare-2) { --wide: min(1000px, calc(100vw - 64px)); width: var(--wide); margin-inline: calc((100% - var(--wide)) / 2); }
}
@media (max-width: 640px) {
  .post-compare { overflow: visible; }
  .post-compare :is(table, tbody, tr, th, td) { display: block; }
  .post-compare thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .post-compare tbody tr { padding-block: 16px; border-bottom: 1px solid var(--line); }
  .post-compare tbody tr:first-child { border-top: 1px solid var(--line); }
  .post-compare tbody :is(th, td) { width: auto; padding: 0; border: 0; }
  .post-compare tbody th { margin-bottom: 8px; font-size: var(--fs-md); }
  .post-compare tbody td { display: grid; grid-template-columns: minmax(6.5rem, 32%) minmax(0, 1fr); gap: 12px; padding-block: 4px; }
  .post-compare tbody td::before { content: attr(data-label); color: var(--muted); font-size: var(--fs-xs); font-weight: var(--fw-semibold); line-height: 1.9; }
  .post-edge { white-space: normal; }
}

/* Charts: one axis from zero for every host; the numbers sit at the bar's end, the data under "Show the data". */
.post-chart { margin: 32px 0 40px; padding: 24px; border: 1px solid var(--line); border-radius: var(--r-card); }
.post-chart-title { margin-bottom: 20px; font-family: var(--font-display); font-weight: var(--fw-display); font-size: var(--fs-lg); line-height: 1.3; }
.post-bars ol { display: grid; gap: 16px; }
.post-bar-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "label value" "track track"; gap: 6px 12px; align-items: baseline; font-size: var(--fs-sm); }
.post-bar-label { grid-area: label; }
.post-bar-value { grid-area: value; font-weight: var(--fw-bold); font-variant-numeric: tabular-nums; text-align: end; }
.post-bar-none .post-bar-value { color: var(--muted); font-weight: var(--fw-regular); }
.post-bar-track { grid-area: track; display: block; border-radius: 4px; background: var(--chart-track); }
.post-grid line { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.post-bar-home { fill: var(--chart-home); }
.post-bar-other { fill: var(--chart-other); }
.post-axis { display: block; margin-top: 8px; overflow: visible; }
:is(.post-axis, .post-line-y) text { fill: var(--muted); font-family: var(--font-ui); font-size: var(--fs-2xs); font-variant-numeric: tabular-nums; }
@media (min-width: 641px) {
  .post-bar-row { grid-template-columns: 11rem minmax(0, 1fr) 9rem; grid-template-areas: "label track value"; align-items: center; }
  .post-axis { width: calc(100% - 20rem - 24px); margin-inline-start: calc(11rem + 12px); }
}
.post-chart-line svg { display: block; width: 100%; height: 220px; overflow: visible; }
.post-chart-line .post-line-x { height: auto; }
.post-line { position: relative; padding-inline-start: 3.25rem; }
.post-chart-line .post-line-y { position: absolute; inset-inline-start: 0; top: 0; width: 2.75rem; height: 220px; }
.post-line-x { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; color: var(--muted); font-size: var(--fs-2xs); font-variant-numeric: tabular-nums; }
.post-chart-line polyline { fill: none; stroke-width: 2.5; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.post-line-home { stroke: var(--chart-home); }
.post-line-other { stroke: var(--chart-other); }
.post-legend { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 16px; color: var(--muted); font-size: var(--fs-sm); }
.post-legend li { display: inline-flex; align-items: center; gap: 8px; }
.post-swatch { width: 16px; height: 4px; border-radius: 2px; background: var(--chart-other); }
.post-swatch-home { background: var(--chart-home); }
.post-chart-note { margin-top: 16px; color: var(--muted); font-size: var(--fs-xs); line-height: 1.5; }
.post-data { margin-top: 12px; font-size: var(--fs-xs); }
.post-data summary { display: inline-flex; align-items: center; min-height: 32px; color: var(--berry-text); font-size: var(--fs-sm); font-weight: var(--fw-semibold); cursor: pointer; border-radius: var(--r-md); }
.post-data-scroll { overflow-x: auto; margin-top: 8px; }
.post-data table { width: 100%; border-collapse: collapse; }
.post-data :is(th, td) { padding: 8px 12px 8px 0; border-bottom: 1px solid var(--line); text-align: start; font-variant-numeric: tabular-nums; }
.post-data thead th { color: var(--muted); font-weight: var(--fw-semibold); }
.post-data tbody th { font-weight: var(--fw-regular); }

/* Sources, gathered by host at the end. */
.post-sources { margin-top: 64px; padding-top: 32px; border-top: 1px solid var(--line); }
.post-sources h2 { font-size: var(--fs-2xl); line-height: 1.25; }
.post-sources-checked { margin-top: 4px; color: var(--muted); font-size: var(--fs-xs); }
.post-sources-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 24px 40px; margin-top: 20px; }
.post-sources h3 { margin-bottom: 8px; font-size: var(--fs-md); letter-spacing: 0; }
.post-sources li { font-size: var(--fs-sm); line-height: 1.5; }
.post-sources li + li { margin-top: 8px; }
.post-source-host { display: block; color: var(--muted); font-size: var(--fs-xs); }

.post-more { margin-top: 56px; }
.post-more h2 { font-size: var(--fs-xl); line-height: 1.3; letter-spacing: 0; }
.post-more ul { margin-top: 12px; }
.post-more li { border-top: 1px solid var(--line); }
.post-more li:last-child { border-bottom: 1px solid var(--line); }
.post-more a { display: flex; align-items: center; min-height: 48px; padding-block: 8px; font-size: var(--fs-md); }
.post-more a:hover { color: var(--berry-text); }

@media (max-width: 640px) {
  .post { padding-block: 24px 56px; }
  .post-summary { padding: 20px; }
  .post-chart { padding: 20px 16px; }
  .post-body > h2 { margin-top: 48px; }
}
