/* The comparison's pages, over site.css: the hub and every product's page, which share this sheet. Where you
   are, the setting a page needs first, the fair paragraph and its sources, the two fences, the table, the statuses,
   the cards, the products and the foot's first line. Logical properties only; classes start with cmp-. */

/* Where you are, and the setting a page needs first */
.cmp-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 22rem); gap: clamp(2rem, 5vw, 4rem); align-items: end; }
.cmp-hero:not(:has(.cmp-setting, .cmp-drawn)) { grid-template-columns: minmax(0, 1fr); }
/* The top's empty half, drawn in marker with the felt-tip's sunflower (product.js's DRAWN): the hub's balance,
   a product's two windows. On a wide window only. */
.cmp-drawn { display: none; align-self: center; inline-size: 100%; block-size: auto; aspect-ratio: 360 / 300; overflow: visible; fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.cmp-drawn path, .cmp-drawn circle { vector-effect: non-scaling-stroke; }
.cmp-drawn .is-paper { fill: var(--room); }
.cmp-drawn .is-felt { stroke: var(--felt-line); stroke-width: 3.2; }
.cmp-drawn .is-tilde { stroke: var(--felt); stroke-width: 4.5; }
:dir(rtl) .cmp-drawn { scale: -1 1; }
@media (min-width: 64rem) {
  .cmp-drawn { display: block; }
}
@media (max-width: 64rem) {
  .cmp-hero:not(:has(.cmp-setting)) { grid-template-columns: minmax(0, 1fr); }
}
.cmp-crumbs { color: var(--ink-soft); font-size: 0.875rem; }
.cmp-crumbs :is(ol, li) { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem; }
.cmp-crumbs [aria-current] { color: var(--ink); }
.cmp-setting { display: flex; flex-direction: column; gap: 0.7rem; padding: 1.25rem; border: 1px solid var(--line); border-radius: var(--site-pane); background: var(--site-side); min-inline-size: 0; }
.site .cmp-setting-head { margin: 0; font: inherit; font-weight: 600; }
.cmp-setting p:last-child { color: var(--ink-soft); font-size: 0.875rem; }
.cmp-setting pre { background: var(--room); overflow-wrap: break-word; }

/* The other product, fairly */
.cmp-fair { display: flex; flex-direction: column; gap: 1rem; max-inline-size: 46rem; }
.cmp-fair > p { font-size: 1.1rem; text-wrap: pretty; }

/* The page a fact is read from, by number, as an answer's sources are: its name above it under the pointer, its footnote a click away */
.cmp-cite { display: inline-grid; place-items: center; min-inline-size: 1.7em; block-size: 1.7em; margin-inline: 0.25em; padding-inline: 0.2em; border: 1px solid oklch(from var(--flame) l c h / 0.55); border-radius: 999px; background: oklch(from var(--flame) l c h / 0.12); color: var(--ink); font-size: 0.72em; font-weight: 650; line-height: 1; vertical-align: 0.15em; }
.site a.cmp-cite { color: var(--ink); text-decoration: none; }
.site a.cmp-cite:is(:hover, :focus-visible) { background: oklch(from var(--flame) l c h / 0.3); }
.cmp-cite-tip { display: none; }
.cmp-cite-tip small { display: block; color: var(--ink-soft); font-size: 0.75rem; }
/* The pointer crosses from the number to the tip without losing it; Escape hides it until the pointer or the keys leave the number. */
.cmp-cite-tip::before { content: ''; position: absolute; z-index: -1; inset: -0.75rem 0; }
.site a.cmp-cite.is-quiet .cmp-cite-tip { display: none; }
@supports (position-area: block-start) {
  a.cmp-cite:is(:hover, :focus-visible) { anchor-name: --cmp-cite; }
  a.cmp-cite:is(:hover, :focus-visible) .cmp-cite-tip { display: block; position: fixed; position-anchor: --cmp-cite; position-area: block-start; position-try-fallbacks: flip-block; z-index: 3; inline-size: max-content; max-inline-size: min(20rem, 100vw - 2rem); margin: 0.35rem; padding: 0.5rem 0.7rem; border: 1px solid var(--line-strong); border-radius: 0.8rem; background: var(--room-2); box-shadow: 0 1rem 2rem -1rem oklch(0 0 0 / 0.6); font-size: 0.8125rem; font-weight: 500; line-height: 1.35; text-align: start; }
}

/* The footnotes, at the end of the main part and looking like the foot's first lines: what was checked and when, then each page cited, the one a number led to lit */
.cmp-notes { display: flex; flex-direction: column; gap: 0.75rem; padding: 2rem var(--site-edge) 1.5rem; border-block-start: 1px solid var(--line); background: var(--site-side); color: var(--ink-soft); font-size: 0.8125rem; line-height: 1.45; }
.cmp-notes ol { columns: 18rem; column-gap: 2rem; margin: 0; padding: 0; list-style: none; }
.cmp-notes li { display: flex; align-items: baseline; gap: 0.45rem; margin-inline-start: -0.3rem; padding: 0.15rem 0.3rem; border-radius: 0.4rem; break-inside: avoid; }
.cmp-notes li:target { background: oklch(from var(--flame) l c h / 0.2); color: var(--ink); }
.cmp-notes li .cmp-cite { flex: none; inline-size: 1.2rem; min-inline-size: 0; block-size: 1.2rem; margin: 0; padding: 0; font-size: 0.625rem; vertical-align: baseline; }

/* Two ways to give an AI hands */
.cmp-fences { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
.cmp-fence { display: flex; flex-direction: column; gap: 0.9rem; margin: 0; min-inline-size: 0; }
.cmp-fence figcaption { color: var(--ink-soft); font-size: 0.95rem; }
.cmp-computer { display: flex; flex-direction: column; gap: 0.9rem; padding: 1.1rem; border: 1px solid var(--line-strong); border-radius: var(--site-pane); background: var(--room); flex: 1; }
.cmp-label { color: var(--ink-soft); font-size: 0.75rem; font-weight: 600; }
.cmp-inside { position: relative; display: flex; flex-direction: column; gap: 0.6rem; padding: 0.9rem; border: 2px solid transparent; border-radius: 0.9rem; background: oklch(from var(--flame) l c h / 0.08); }
/* The perimeter, drawn round by the felt-tip pen; what's out of reach struck through by hand. */
.cmp-loop { position: absolute; inset: -0.4rem; inline-size: calc(100% + 0.8rem); block-size: calc(100% + 0.8rem); overflow: visible; fill: none; stroke: var(--felt-line); stroke-width: 3; stroke-linecap: round; pointer-events: none; }
.cmp-loop path { vector-effect: non-scaling-stroke; }
.cmp-inside > :not(svg) { position: relative; }
.cmp-outside { display: flex; flex-direction: column; gap: 0.6rem; padding: 0.9rem; border: 1px dashed var(--line-strong); border-radius: 0.9rem; color: var(--ink-soft); }
.cmp-fences ul { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.cmp-fences li { padding: 0.25rem 0.7rem; border-radius: 999px; background: var(--room-2); font-size: 0.875rem; }
.cmp-inside li.is-jean { background: var(--site-fill); color: var(--site-on-fill); font-weight: 600; }
.cmp-outside li { background: transparent; border: 1px dashed var(--line-strong); }
.cmp-outside svg.felt-strike { stroke: var(--ink-soft); stroke-width: 1.6; }
.cmp-shell { align-self: flex-start; padding: 0.35rem 0.8rem; border-radius: 0.6rem; background: var(--site-fill); color: var(--site-on-fill); font-weight: 600; font-size: 0.9rem; }
.cmp-computer.is-open ul li { border: 1px solid var(--line-strong); }

/* Side by side */
.cmp-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--site-pane); background: var(--room); }
.cmp-scroll:focus-visible { outline: 2px solid var(--flame); outline-offset: 2px; }
.cmp-table { inline-size: 100%; min-inline-size: 40rem; table-layout: fixed; border-collapse: collapse; font-size: 0.9375rem; line-height: 1.45; }
.cmp-table.is-kinds { min-inline-size: 64rem; font-size: 0.875rem; }
.cmp-table :is(th, td) { padding: 0.9rem 1rem; border-block-start: 1px solid var(--line); text-align: start; vertical-align: top; }
.cmp-table thead :is(th, td) { border-block-start: 0; background: var(--site-side); vertical-align: bottom; }
.cmp-table thead th { font-weight: 600; }
.cmp-table thead th small { display: block; color: var(--ink-soft); font-weight: 400; font-size: 0.8125rem; }
.cmp-table thead th.is-jean { font: 700 1.15rem/1.2 var(--display); }
.cmp-table tbody th { font-weight: 600; }
.cmp-table thead td { inline-size: 12rem; }
.cmp-table.is-kinds thead td { inline-size: 9rem; }
.cmp-table td.is-jean { background: oklch(from var(--flame) l c h / 0.1); }
.cmp-table td > p { margin-block-end: 0.5rem; }
.cmp-col { display: none; }

/* What Jean's side is: built, with a key, by design, built and on a computer */
.cmp-status { display: inline-block; white-space: nowrap; padding: 0.1rem 0.6rem; border-radius: 999px; font-size: 0.75rem; font-weight: 600; line-height: 1.5; }
.cmp-status.is-built { background: var(--site-fill); color: var(--site-on-fill); }
.cmp-status.is-key { box-shadow: inset 0 0 0 1.5px var(--flame); color: var(--ink); }
.cmp-status.is-design { box-shadow: inset 0 0 0 1px var(--ink); color: var(--ink); }
.cmp-status.is-computer { box-shadow: inset 0 0 0 1.5px var(--site-fill); color: var(--ink); }

/* Where the other does better, and the catch */
.cmp-better li::before { content: '+' / ''; color: var(--flame); font-weight: 700; }

/* Ways, cards and products */
.cmp-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.cmp-cards.is-four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cmp-cards li { display: flex; flex-direction: column; align-items: flex-start; gap: 0.6rem; padding: 1.25rem; border: 1px solid var(--line); border-radius: var(--site-pane); background: var(--room); }
.cmp-cards .icon { inline-size: 1.5rem; block-size: 1.5rem; color: var(--flame); }
.cmp-cards p { flex: 1; color: var(--ink-soft); font-size: 0.95rem; }
.cmp-strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 1.5rem; padding: 1.1rem 1.25rem; border-radius: var(--site-pane); background: var(--room-2); }
.cmp-strip p { flex: 1 1 20rem; }
.cmp-products { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(12rem, 100%), 1fr)); gap: 1rem; }
.site .cmp-products a { display: flex; flex-direction: column; gap: 0.6rem; block-size: 100%; padding: 1.25rem; border: 1px solid var(--line-strong); border-radius: var(--site-pane); background: var(--room); color: var(--ink); text-decoration: none; }
.cmp-products a:hover { border-color: var(--ink); }
.cmp-products h3 { font: 700 1.35rem/1.2 var(--display); }
.cmp-products span { color: var(--ink-soft); font-size: 0.95rem; }
.cmp-products .cmp-go { margin-block-start: auto; color: var(--ink); font-weight: 600; }

/* The last Try */
.cmp-end .site-cta { position: relative; justify-content: center; }
.cmp-end .felt-point { position: absolute; inset-inline-end: calc(100% + 0.5rem); inset-block-start: -1.5rem; inline-size: 5rem; block-size: 3.3rem; }

/* A phone, or any narrow window: one column */
@media (max-width: 60rem) {
  .cmp-cards.is-four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 52rem) {
  .cmp-hero, .cmp-fences, .cmp-cards, .cmp-cards.is-four { grid-template-columns: minmax(0, 1fr); }
  .cmp-table thead td, .cmp-table.is-kinds thead td { inline-size: 8rem; }
}
/* A phone: the heads first, each kind with the products it stands for, then a row at a time, each side saying whose it is */
@media (max-width: 40rem) {
  .cmp-scroll { overflow: visible; border: 0; background: none; }
  .cmp-table, .cmp-table.is-kinds, .cmp-table :is(thead, tbody, tr, th, td) { display: block; min-inline-size: 0; }
  .cmp-table thead { margin-block-end: 1rem; }
  .cmp-table thead td { display: none; }
  .cmp-table thead th + th { border-block-start: 1px solid var(--line); }
  .cmp-table tr + tr { margin-block-start: 1rem; }
  .cmp-table tr { border: 1px solid var(--line); border-radius: var(--site-pane); background: var(--room); overflow: hidden; }
  .cmp-table tbody th { border-block-start: 0; background: var(--site-side); font-size: 1rem; }
  .cmp-col { display: block; margin-block-end: 0.25rem; color: var(--ink-soft); font-size: 0.75rem; font-weight: 600; }
  .cmp-end .felt-point { display: none; }
  .cmp-table td.is-jean .cmp-col { color: var(--ink); }
}
@media (forced-colors: active) {
  .cmp-status, .cmp-inside { border: 1px solid CanvasText; }
  .cmp-drawn, .cmp-loop { display: none; }
  .cmp-outside li { text-decoration: line-through; }
}
