/* The CPU catalog (cpus.html): a filter panel beside a grid of flip cards, at most five across. Card sizes use container units (cqw)
   so the whole card scales with its width. AMD cards are dark with AMD orange; Intel cards are light with Intel blue. */
.cpus { --acc: var(--orange-ink); display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; max-width: 120rem; margin: 0 auto; padding: 5.5rem var(--margin, 1rem) 4rem; }
@media (max-width: 860px) { .cpus { padding-top: 1rem; } }
@media (min-width: 900px) { .cpus { grid-template-columns: 16rem minmax(0, 1fr); align-items: start; } .cpus-side { position: sticky; top: 5rem; max-height: calc(100vh - 6rem); overflow: auto; } }
.cpus-panel { background: var(--beige-soft); border: 1px solid var(--hairline); border-radius: .75rem; padding: .9rem 1rem; }
.cpus-head { display: flex; justify-content: space-between; align-items: flex-start; }
.cpus-head h1 { font-size: 1.6rem; font-weight: 800; line-height: 1.1; margin: 0; }
.cpus-count { color: var(--text-faint); font-size: .85rem; margin: .15rem 0 0; }
.cpus button.link { background: none; border: 0; color: var(--acc); font: inherit; font-size: .85rem; cursor: pointer; padding: .2rem 0; }
.cpus-sort { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: .5rem 0 .75rem; font-size: .9rem; }
.cpus-sort select, .cpus-sort button { background: var(--white); color: var(--text); border: 1px solid var(--hairline-strong); border-radius: .5rem; padding: .45rem .6rem; font: inherit; font-size: .9rem; }
.cpus-sort select { flex: 1; min-width: 0; }
.cpus-sort button { cursor: pointer; }
.cpus fieldset { border: 0; border-top: 1px solid var(--hairline); margin: 0; padding: .7rem 0; min-width: 0; }
.cpus legend { padding: 0; font-size: .75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); margin-bottom: .4rem; }
.cpus fieldset > label { display: flex; align-items: center; gap: .5rem; font-size: .9rem; padding: .15rem 0; cursor: pointer; }
.cpus fieldset > label[hidden] { display: none; } /* the flex rule above would otherwise override [hidden], so Show more / Show less did nothing */
.cpus fieldset > label span { flex: 1; }
.cpus fieldset > label small { color: var(--text-faint); font-size: .75rem; }
.cpus input[type=checkbox] { accent-color: var(--orange); }
.cpus-range-v { display: flex; justify-content: space-between; color: var(--acc); font-size: .85rem; margin-bottom: .25rem; }
/* one track, two handles: two range inputs stacked, only their thumbs take the pointer */
.dual { position: relative; height: 22px; }
.dual i { position: absolute; top: 9px; height: 4px; border-radius: 2px; }
.dual .trk { left: 9px; right: 9px; background: var(--hairline-strong); }
.dual .fill { background: var(--acc); }
.dual input { position: absolute; left: 0; top: 0; width: 100%; height: 22px; margin: 0; background: none; pointer-events: none; -webkit-appearance: none; appearance: none; }
.dual input::-webkit-slider-runnable-track { background: none; height: 22px; }
.dual input::-webkit-slider-thumb { -webkit-appearance: none; pointer-events: auto; width: 18px; height: 18px; margin-top: 2px; border-radius: 50%; background: var(--acc); border: 2px solid var(--white); cursor: pointer; box-sizing: border-box; }
.dual input::-moz-range-thumb { pointer-events: auto; width: 18px; height: 18px; box-sizing: border-box; border-radius: 50%; background: var(--acc); border: 2px solid var(--white); cursor: pointer; }
.dual input::-moz-range-track { background: none; }
.cpus-empty { color: var(--text-faint); padding: 2.5rem 0; }

.cpus-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) { .cpus-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .cpus-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.cc { perspective: 1400px; aspect-ratio: 4 / 7; container-type: inline-size; --base: #0f0f11; --ink: #f4f4f5; --sub: #a1a1aa; --accent: #ff5a1f; --btn: #1c1c20; --btn-text: #ff8a4c; --line: rgba(255, 90, 31, .35); }
.cc.intel { --base: #f5f8fc; --ink: #0b1b2e; --sub: #5b6b7d; --accent: #0068b5; --btn: #0b1b2e; --btn-text: #4cc8ff; --line: rgba(0, 104, 181, .22); }
.cc-flip { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .55s cubic-bezier(.2, .8, .2, 1); cursor: pointer; }
.cc.flipped .cc-flip { transform: rotateY(180deg); }
.cc-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.cc-back { transform: rotateY(180deg); }
.cc-card { position: absolute; left: 4%; right: 2%; top: 15%; bottom: 4%; border-radius: 6cqw; background: var(--base); color: var(--ink); overflow: hidden; box-shadow: 0 14px 30px rgba(0, 0, 0, .35); }
.cc.amd .cc-card { box-shadow: 0 14px 30px rgba(0, 0, 0, .55), inset 0 0 0 1px rgba(255, 255, 255, .06); }
.cc-tier { position: absolute; left: 9%; top: 5%; max-width: 33%; font-weight: 800; font-size: 6.8cqw; white-space: nowrap; line-height: 1.05; color: var(--accent); }
.cc-tier.long { font-size: 5.8cqw; white-space: normal; }
.cc-info { position: absolute; left: 9%; right: 8%; top: 67%; }
.cc-model { font-weight: 800; font-size: 10cqw; line-height: 1.05; color: var(--accent); }
.cc-blurb { margin: 1.6cqw 0 0; font-size: 4.8cqw; line-height: 1.35; color: var(--sub); max-width: none; }
.cc-add { position: absolute; left: 0; right: 0; bottom: 0; height: 8.6%; border: 0; border-radius: 0 0 6cqw 6cqw; background: var(--accent); color: #fff; font: 800 5.2cqw var(--font); letter-spacing: .08em; cursor: pointer; padding: 0; }
.cc-add.added { background: var(--btn); color: var(--btn-text); }
.cc-add:disabled { background: var(--btn); color: var(--sub); cursor: not-allowed; font-size: 3.8cqw; letter-spacing: .02em; font-weight: 700; }
.cc-panel { position: absolute; left: 35%; right: 2%; top: 1%; bottom: 11%; clip-path: url(#cc-clip); overflow: hidden; }
.cc-panel canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.cc-price { position: absolute; top: 17%; right: 10%; text-align: right; color: #fff; text-shadow: 0 1px 6px rgba(0, 0, 0, .45); font-weight: 800; font-size: 11cqw; line-height: 1; }
.cc-img { position: absolute; left: 6%; top: 23%; width: 90%; height: 44%; object-fit: contain; filter: drop-shadow(0 4cqw 5cqw rgba(0, 0, 0, .45)); }
.cc-back .cc-card { padding: 7cqw; display: flex; flex-direction: column; gap: 3cqw; box-sizing: border-box; }
.cc-bt { font-weight: 800; font-size: 7cqw; line-height: 1.05; color: var(--accent); }
.cc-bm { font-size: 6.6cqw; line-height: 1.05; color: var(--accent); }
.cc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 3cqw; }
.cc-head > div:first-child { min-width: 0; }
.cc-rate { flex: none; display: grid; justify-items: end; gap: .6cqw; font-size: 3.6cqw; line-height: 1.1; color: var(--sub); text-align: right; } /* top right, beside the name */
.cc-rate b { color: var(--accent); font-weight: 400; letter-spacing: .05em; }
.cc-chips { display: flex; flex-wrap: wrap; gap: 1.6cqw; }
.cc-chips span { font-size: 4cqw; color: var(--ink); border: 1px solid var(--line); border-radius: 6px; padding: 2px 7px; }
.cc-stores { margin-top: auto; display: grid; gap: 1.6cqw; flex: 0 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; } /* every store reachable: the list takes the space left and scrolls past it */
.cc-stores a { display: flex; align-items: center; justify-content: space-between; height: 8.5cqw; padding: 0 3.4cqw; border-radius: 2.2cqw; text-decoration: none; font-size: 3.6cqw; }
.cc-stores a span:first-child { font-weight: 700; }
.cc-stores a span:last-child { font-weight: 800; }
@media (prefers-reduced-motion: reduce) { .cc-flip { transition: none; } }
/* phones: the filter groups fold away behind a Filters button, so the cards are not pushed down the page */
.cpus-toggle { display: none; }
@media (max-width: 899px) { .cpus-toggle { display: block; } .cpus-side:not(.open) fieldset { display: none; } }
/* the Sort by menu (sort-menu.js): a button with its chevron centered on the right, and a dark list under it */
.sort-menu { position: relative; flex: 1; min-width: 0; }
.cpus-sort .sort-btn { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: .5rem; text-align: left; background: var(--white); color: var(--text); border: 1px solid var(--hairline-strong); border-radius: .6rem; padding: .5rem .65rem .5rem .75rem; font: inherit; font-size: .9rem; line-height: 1.2; cursor: pointer; transition: border-color .15s, background-color .15s; }
.cpus-sort .sort-btn:hover { border-color: var(--text-muted); }
.cpus-sort .sort-btn:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
.sort-menu.open .sort-btn { border-color: var(--acc); }
.cpus-sort .sort-btn svg { width: .8rem; height: .8rem; flex: none; transition: transform .18s ease; }
.sort-menu.open .sort-btn svg { transform: rotate(180deg); }
.sort-list { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + .35rem); margin: 0; padding: .3rem; list-style: none; background: #141416; border: 1px solid var(--hairline-strong); border-radius: .6rem; box-shadow: 0 12px 32px rgba(0, 0, 0, .55); max-height: 18rem; overflow: auto; animation: sort-in .14s ease-out; }
.sort-list:focus { outline: none; }
.sort-list li { display: flex; align-items: center; justify-content: space-between; padding: .45rem .6rem; border-radius: .4rem; font-size: .9rem; color: var(--text); cursor: pointer; }
.sort-list li.on { background: rgba(255, 255, 255, .08); }
.sort-list li[aria-selected="true"] { color: var(--acc); font-weight: 700; }
.sort-list li[aria-selected="true"]::after { content: ""; width: .7rem; height: .4rem; border: solid currentColor; border-width: 0 0 2px 2px; transform: translateY(-.1rem) rotate(-45deg); }
@keyframes sort-in { from { opacity: 0; transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { .sort-list { animation: none; } .sort-btn svg { transition: none; } }
.cpus-note { margin: 2rem 0 0; font-size: .8rem; color: var(--text-faint); text-align: center; } /* Amazon Associates disclosure */
/* the catalogs' search box: filters by name, model and maker as you type, with the filters; Ctrl+K or / focuses it */
.cat-search { width: 100%; box-sizing: border-box; margin: .6rem 0 0; padding: .55rem .75rem; border: 1px solid var(--hairline-strong); border-radius: .6rem; background: var(--white); color: var(--text); font: inherit; font-size: .9rem; }
.cat-search::placeholder { color: var(--text-faint); }
.cat-search:focus-visible { outline: 2px solid var(--acc, currentColor); outline-offset: 2px; }
@media (max-width: 1000px) { .cat-search { font-size: 16px; min-height: 44px; } }
