/* Comparisons (/compare/<slug>/ and /compare/) and the "Compared with" box on reviews.
   Built on the listing page styles: the README window with orange-bar H2s, the editions table
   (sticky first column, sideways scroll with the Swipe/Scroll hint), the highlights list. */

/* Title header: the archive heading band (.page-head, template-parts/page-head), centred: one
   column per app (icon over name) with an orange "vs" between, level with the icons, then the
   "Compared by" line as the subtitle. No kicker; the breadcrumb sits above the band (header.php). The band
   uses the shared hero's padding; /compare/ itself is the plain shared hero (theme.css). */
.page-head.page-head--cmp{padding:28px 0 24px}
.page-head--cmp{text-align:center}
.page-head--cmp .page-head__inner{display:block}
.page-head--cmp .page-head__inner > div:first-child{display:flex;flex-direction:column;align-items:center;max-width:none}
.cmp-hero__title{--cmp-icon:88px;--cmp-col:clamp(120px,15vw,210px);--cmp-name:clamp(28px,3.2vw,46px);display:flex;justify-content:center;align-items:flex-start;gap:clamp(12px,2vw,28px);max-width:100%}
.page-head--cmp .cmp-hero__title{font-family:var(--f-display);font-weight:800;font-size:var(--cmp-name);line-height:1.08;letter-spacing:-.025em;margin:0}
.cmp-hero__title--long{--cmp-col:clamp(140px,17vw,240px);--cmp-name:clamp(22px,2.3vw,32px)}
.cmp-hero__title--xlong{--cmp-col:clamp(150px,19vw,270px);--cmp-name:clamp(17px,1.6vw,23px)}
.page-head--cmp div.cmp-hero__title{margin:0 0 20px}
.cmp-hero__app{display:flex;flex-direction:column;align-items:center;gap:16px;width:var(--cmp-col);min-width:0}
.cmp-hero__icon{display:block}
.cmp-hero__title .appicon--lg{width:var(--cmp-icon);height:var(--cmp-icon)}
.cmp-hero__name{display:block;max-width:100%;text-wrap:balance;overflow-wrap:normal;hyphens:none}
/* Long titles keep their emergency wrap; short product names retain whole words. */
.cmp-hero__title--long .cmp-hero__name,.cmp-hero__title--xlong .cmp-hero__name{overflow-wrap:anywhere}
/* Upright bold monospace, about half the name size (23px with short names on desktop, never under 18px; 16px on phones), in the kickers' orange (--accent-ink). */
.cmp-hero__vs{display:flex;align-items:center;height:var(--cmp-icon);flex:none;font-family:var(--f-mono);font-style:normal;font-size:max(18px,calc(var(--cmp-name) * .5));font-weight:700;letter-spacing:.02em;line-height:1;color:var(--accent-ink);white-space:pre}
.page-head--cmp .cmp-hero__heading{font-size:clamp(28px,3vw,40px);line-height:1.12;letter-spacing:-.02em;max-width:24em;text-wrap:balance}
.page-head--cmp .section__lede{max-width:none;margin-top:18px}
.cmp-hero__meta{margin:0}
.cmp-hero__meta span[aria-hidden]{margin:0 4px}
.cmp-hero__meta a{color:var(--ink)}

/* Below the band: the intro with the contents box to its right (below it on phones). */
.cmp-layout{grid-template-columns:minmax(0,1fr)}
/* links.css sets .sw-hero padding-top later, so this needs both classes. */
.sw-hero.cmp-hero{grid-column:1;grid-row:1;padding:32px 0 28px}
.cmp-hero__lead{display:grid;grid-template-columns:minmax(0,1fr) minmax(260px,320px);gap:36px;align-items:start}
.cmp-hero__intro{max-width:46em;font-size:18px;line-height:1.6;color:var(--ink-2)}
.cmp-hero__intro p{margin:0 0 .9em}
.cmp-hero__intro p:last-child{margin-bottom:0}
.cmp-hero__intro a{color:var(--ink)}
.cmp-hero__lead .toc{max-width:none;margin:4px 0 0}
.cmp-body{grid-row:auto}

/* The README window runs the full width; text blocks keep a reading measure. */
/* No window frame on comparisons: the sections sit on the page at full width. */
.sw-readme.cmp-readme{background:transparent;padding:0}
.sw-readme .cmp-content{max-width:none}
.cmp-content > p{max-width:46em}
.cmp-content h2{scroll-margin-top:110px}
.cmp-lede{margin:0 0 14px;color:var(--ink-2)}
.cmp-note{margin:12px 0 0;font-size:14.5px;line-height:1.55;color:var(--ink-2)}
/* How we tested / the Format legend: footnotes under their table, in the body font, a reading
   measure, 10px below the table and 30px above the next section heading. Scoped under
   .sw-readme .cmp-content to beat .entry-content p and the theme's h2 margin. */
.sw-readme .cmp-content .cmp-note{max-width:none;margin:10px 0 0;padding:0;font-family:var(--f-sans);font-size:13.5px;line-height:1.55;color:var(--ink-2);background:none;border:0;box-shadow:none}
.sw-readme .cmp-content .cmp-note strong{font-weight:700;color:var(--ink)}
.sw-readme .cmp-content .cmp-note + h2{margin-top:30px}
/* The page's closing Bottom line runs the full content width, like the tables. */
.sw-readme .cmp-content .cmp-final{max-width:none}
.sw-readme .cmp-content .cmp-final p{max-width:none}
.sw-readme .cmp-content .cmp-final p:last-child{margin-bottom:0}
.cmp-content .table-wrap{margin:0}
.cmp-content .specs__list,.cmp-content .highlights__list{padding:0;margin:0}
.cmp-content .specs__list li,.cmp-content .highlights__list li{margin-bottom:0}
.cmp-content .highlights__list li::marker{content:none}

/* App cards: one per app, side by side, stacked on phones. */
.cmp-cards{display:grid;grid-template-columns:repeat(var(--cmp-cols,3),minmax(0,1fr));gap:22px;list-style:none;margin:0;padding:0}
.cmp-content .cmp-cards{padding:0;margin:0}
.cmp-card{position:relative;display:flex;flex-direction:column;gap:0;margin:0;padding:12px 12px 6px;background:var(--white);border:2px solid var(--ink);border-radius:var(--radius);box-shadow:var(--shadow-hard-sm)}
.cmp-cards .cmp-card{margin:0}
.cmp-card--winner{background:var(--paper)}
/* Our pick: an amber band set diagonally across the card's top-right corner, clipped to the card. */
.cmp-card .cmp-card__ribbon{position:absolute;top:0;right:0;z-index:1;width:112px;height:112px;margin:0;overflow:hidden;border-top-right-radius:var(--radius);pointer-events:none}
.cmp-card__ribbon span{position:absolute;top:26px;right:-38px;width:160px;padding:6px 0;transform:rotate(45deg);background:#f2b705;color:var(--ink);font-family:var(--f-mono);font-size:13px;font-weight:700;line-height:1.2;letter-spacing:.1em;text-align:center;text-transform:uppercase;box-shadow:0 2px 0 var(--shadow-color)}
.cmp-card__head{padding-right:72px}
/* Spacing between the card parts (the card's flex gap is 0): the screenshot gets 6px above, Best for 12px above it,
   and the review link sits 6px under Best for (no push to the card bottom).
   The <p> rules need .cmp-card in front: theme.css's .entry-content p{margin:0 0 1.1em} outranks a single class. */
.cmp-card__shot{margin:6px 0 0}
.cmp-card__zoom{display:block;border:1px solid var(--ink-3);border-radius:var(--radius);overflow:hidden;background:var(--paper-2);cursor:zoom-in}
.cmp-card__zoom img{display:block;width:100%;height:auto;aspect-ratio:16 / 10;object-fit:cover;object-position:top left}
.cmp-card__zoom:focus-visible{outline:3px solid var(--accent);outline-offset:2px}
.cmp-card__head{display:flex;align-items:center;gap:12px}
.cmp-content .cmp-card__title{margin:0;font-size:22px;line-height:1.2}
.cmp-card__title .ver{margin-left:6px;font-size:12px;vertical-align:middle}
.cmp-card .cmp-card__badges{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin:9px 0 0}
.cmp-card .cmp-card__best{margin:12px 0 0;font-size:15px;line-height:1.5;color:var(--ink-2)}
.cmp-card .cmp-card__more{margin:6px 0 0;font-size:15px}

/* Tables: the editions look plus .cmp-table (theme.css, shared with editor tables); cells hold the review's own badges and lists. */
.cmp-table__cell{font-size:14.5px;color:var(--ink)}
.cmp-table__cell small{font-size:12px;font-weight:500;color:var(--ink-3)}
.cmp-table__cell .specs__fair-reason{display:block;margin-top:8px;padding-top:8px;border-top:1px solid var(--rule-soft);font-size:12.5px;line-height:1.45;color:var(--ink-2)}
.cmp-table--props th[scope="row"]{min-width:170px}
.cmp-table__untested{color:var(--ink-3);font-weight:500}
.cmp-format__state{display:block;font-family:var(--f-mono);font-size:13px;font-weight:600;color:var(--ink)}
/* Tested / Not tested: a small mono tag (green tint when we tested it), any note on its own line below. */
.cmp-table .cmp-format__tested{display:inline-block;margin-top:5px;padding:1px 6px;font-family:var(--f-mono);font-size:10.5px;font-weight:700;line-height:1.5;letter-spacing:.08em;text-transform:uppercase;white-space:nowrap;border:1px solid var(--ink-3);border-radius:3px;background:var(--paper-2);color:var(--ink-2)}
.cmp-table .cmp-format__tested--yes{background:#e2f1e8;border-color:var(--green-deep);color:var(--green-deep)}
.cmp-table .cmp-format__note{display:block;margin-top:4px;font-size:12.5px;line-height:1.4;color:var(--ink-2)}
.cmp-format--none .cmp-format__state,.cmp-format--unknown .cmp-format__state{color:var(--ink-3);font-weight:500}
.cmp-format--create .cmp-format__state{color:var(--accent-ink)}

/* Highlights and bottom lines: the highlights sit in a fixed-height scroll box with retro
   scrollbars, so every column's Bottom line starts at the same height (subgrid rows). */
.cmp-columns{display:grid;grid-template-columns:repeat(var(--cmp-cols,3),minmax(0,1fr));grid-template-rows:auto auto auto;column-gap:22px}
.cmp-col{display:grid;grid-row:span 3;grid-template-rows:subgrid;row-gap:12px;padding:16px;background:var(--white);border:2px solid var(--ink);border-radius:var(--radius)}
.cmp-content .cmp-col__title{margin:0;font-size:20px;line-height:1.25}
.sw-readme .cmp-content .cmp-col__title{margin:0}
/* A fixed 160px box in every column (140px on phones), not stretched by the subgrid row, so the Bottom lines line up. */
.cmp-col .cmp-col__scroll{align-self:start;box-sizing:border-box;height:13.5em;max-height:none}
.cmp-col__scroll{position:relative;overflow-y:auto;padding:10px 12px;background:var(--paper);border:1.5px solid var(--ink);border-radius:var(--radius)}
/* Retro scrollbar: cream track with an ink edge, square ink thumb, square arrow buttons. Chrome 121+
   ignores ::-webkit-scrollbar when scrollbar-color/-width are set, so those stay auto except in Firefox. */
.cmp-col__scroll::-webkit-scrollbar{width:16px}
.cmp-col__scroll::-webkit-scrollbar-track{background:var(--paper);border-left:1.5px solid var(--ink)}
.cmp-col__scroll::-webkit-scrollbar-thumb{background:var(--ink-2);border:2px solid var(--ink);border-radius:0;box-shadow:inset 0 0 0 1.5px var(--paper-2)}
.cmp-col__scroll::-webkit-scrollbar-button:single-button{display:block;width:16px;height:16px;background-color:var(--paper-2);border:1.5px solid var(--ink);border-radius:0;background-repeat:no-repeat;background-position:center;background-size:8px 4px}
.cmp-col__scroll::-webkit-scrollbar-button:single-button:vertical:decrement{background-image:conic-gradient(from 135deg at 50% 0,var(--ink) 90deg,transparent 0)}
.cmp-col__scroll::-webkit-scrollbar-button:single-button:vertical:increment{background-image:conic-gradient(from -45deg at 50% 100%,var(--ink) 90deg,transparent 0)}
.cmp-col__scroll::-webkit-scrollbar-button:vertical:start:increment,.cmp-col__scroll::-webkit-scrollbar-button:vertical:end:decrement{display:none}
.cmp-col__scroll{scrollbar-color:auto;scrollbar-width:auto}
@supports (-moz-appearance:none){.cmp-col__scroll{scrollbar-color:var(--ink) var(--paper)}}
.cmp-col__scroll:focus-visible{outline:3px solid var(--accent);outline-offset:2px}
.cmp-col__scroll .highlights__list{font-size:15px}
.cmp-col__empty{margin:0;font-size:15px;color:var(--ink-3)}
/* Bottom line: 18px under the scroll box with a thin rule, the label as a small ink tag. */
.sw-readme .cmp-content .cmp-col__bottom{margin-top:2px;padding-top:0;border-top:0}
.cmp-col__bottom{font-size:15.5px;line-height:1.55;color:var(--ink-2)}
.sw-readme .cmp-content .cmp-col__bottom h4{display:block;margin:0 0 4px;padding:0;font-family:var(--f-sans);font-size:15.5px;font-weight:700;line-height:1.4;letter-spacing:normal;text-transform:none;color:var(--ink);background:none;border:0;border-radius:0}
.sw-readme .cmp-content .cmp-col__bottom p{margin:0 0 .8em}
.sw-readme .cmp-content .cmp-col__bottom p:last-child{margin-bottom:0}

@media(max-width:860px){
  .cmp-hero__lead{grid-template-columns:minmax(0,1fr);gap:22px}
  .cmp-hero__lead .toc{margin:0}
  .cmp-cards,.cmp-columns{grid-template-columns:minmax(0,1fr);row-gap:18px}
  .cmp-col{grid-row:auto;grid-template-rows:none}
  .cmp-col .cmp-col__scroll{height:10em}
  .cmp-card__zoom img{aspect-ratio:16 / 9}
}
@media(max-width:600px){
  .sw-hero.cmp-hero{padding:24px 0 20px}
  .cmp-hero__title{--cmp-icon:60px;--cmp-name:clamp(18px,5.4vw,26px);gap:clamp(4px,1.5vw,8px);width:100%}
  .cmp-hero__title--long{--cmp-name:clamp(18px,4.8vw,23px)}
  .cmp-hero__title--xlong{--cmp-name:clamp(16px,4.2vw,20px)}
  .cmp-hero__title--2 .cmp-hero__app{width:auto;flex:0 1 9.5em}
  .cmp-hero__app{width:auto;flex:1 1 0;min-width:min-content;gap:10px}
  .cmp-hero__title--long .cmp-hero__app,.cmp-hero__title--xlong .cmp-hero__app{min-width:0}
  .cmp-hero__vs{font-size:16px}
  .page-head.page-head--cmp{padding:22px 0 18px}
  .page-head--cmp div.cmp-hero__title{margin-bottom:18px}
  .page-head--cmp .cmp-hero__heading{font-size:clamp(24px,6.4vw,28px)}
  .page-head--cmp .section__lede{margin-top:14px}
  .cmp-hero__title .appicon--lg{border-radius:12px;font-size:22px}
  /* Four apps: two rows of two; the middle "vs" is where the rows break (hidden, still read). */
  .cmp-hero__title--4{position:relative;display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);row-gap:18px;--cmp-icon:56px}
  .cmp-hero__title--4 .cmp-hero__vs--mid{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%)}
  .cmp-hero__intro{font-size:16.5px}
  .cmp-col{padding:12px}
  .cmp-card{padding:9px 9px 5px}
  .cmp-content .cmp-card__title{font-size:20px}
  .cmp-card .cmp-card__ribbon{width:94px;height:94px}
  /* Table badges wrap inside their cell on phones. */
  .cmp-table .verdict-link{display:inline-flex;align-items:center;flex-wrap:wrap;gap:4px;max-width:100%;white-space:normal}
  .cmp-table .verdict-tag{box-sizing:border-box;max-width:100%;padding:3px 6px;font-size:10px;line-height:1.2;letter-spacing:.05em;text-align:center;white-space:normal;overflow-wrap:anywhere}
  .cmp-table .specs__score{flex-wrap:wrap;max-width:100%}
  .cmp-table .cmp-format__tested{white-space:normal}
  .cmp-card__ribbon span{top:21px;right:-33px;width:136px;padding:5px 0;font-size:11.5px}
  .cmp-card__head{padding-right:60px}
  .cmp-table--props th[scope="row"]{min-width:120px}
}

/* /compare/ index. */
.cmp-index{padding-top:36px;padding-bottom:64px}
.cmp-index__list{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:24px;list-style:none;margin:0;padding:0}
.cmp-index__body{display:flex;flex-direction:column;gap:10px;padding:18px 20px 20px}
.cmp-index__icons{display:flex;gap:8px}
.cmp-index__title{margin:0;font-size:22px;line-height:1.2}
.cmp-index__meta{margin:0;font-family:var(--f-mono);font-size:12.5px;color:var(--ink-3)}
.cmp-index__lede{margin:0;font-size:15px;line-height:1.5;color:var(--ink-2)}
@media(max-width:600px){.cmp-index__list{grid-template-columns:minmax(0,1fr)}}

/* "Compared with" box on a review, after the contents. */
.sw-compared{margin:22px 0 0}
.sw-compared .highlights__list li::before{content:"\2194"}
