@font-face {
  font-family: Archivo;
  src: url(../fonts/archivo-v1.woff2) format("woff2");
  font-weight: 900;
  font-display: swap;
}

@font-face {
  font-family: Inter;
  src: url(../fonts/inter-v1.woff2) format("woff2");
  font-weight: 400 800;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url(../fonts/jetbrains-mono-v1.woff2) format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --night: #0b1020;
  --panel: #121a2e;
  --tile: #1a2540;
  --line: #343f5d;
  --ink: #f6f7ff;
  --muted: #afbad4;
  --blue: #bcd0ff;
  --blue-strong: #8cb0ff;
  --pink: #ff84bb;
  --green: #91e7c6;
  --amber: #ffd291;
  --sans: Inter, system-ui, sans-serif;
  --display: Archivo, Inter, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --gutter: clamp(16px, 5vw, 72px);
  --radius: 16px;
  background: var(--night);
  accent-color: var(--blue-strong);
  scrollbar-color: #59698f var(--night);
  -webkit-text-size-adjust: 100%;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; color: var(--ink); font: 16px/1.55 var(--sans); }
::selection { color: var(--night); background: var(--pink); }
a { color: inherit; text-underline-offset: 0.25em; }
a:hover { color: var(--blue); }
button, input { font: inherit; color: inherit; }
input { caret-color: var(--blue); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }
[hidden] { display: none !important; }

.sr-only, .pick input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: fixed;
  z-index: 5;
  top: 10px;
  left: var(--gutter);
  transform: translateY(-150%);
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--blue);
  color: var(--night);
  font-weight: 700;
}

.skip:focus { transform: none; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.wrap { width: min(100% - 2 * var(--gutter), 1280px); margin-inline: auto; }

.bar {
  position: relative;
  z-index: 2;
  border-bottom: 1px solid #303852;
  background: var(--night);
}

.bar-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 68px;
  gap: 24px;
}

.home, .bar .jump a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
}

.crumbs { display: flex; align-items: center; gap: 10px; justify-self: start; min-width: 0; }
.crumbs .site { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.crumbs .site:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.crumbs .sep { color: #4a5470; font-size: 15px; }
.home { gap: 10px; font-size: 15px; font-weight: 750; white-space: nowrap; }
.home svg { flex: none; width: 24px; height: 24px; color: var(--blue); }
.bar .jump { display: flex; gap: 28px; }
.bar .jump a { color: var(--muted); font-size: 14px; font-weight: 600; }
.bar .jump a:hover { color: var(--ink); }

.live {
  display: inline-flex;
  align-items: center;
  justify-self: end;
  gap: 8px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.live i {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
}

.live.on i { background: var(--green); }
.live.err i { background: var(--amber); }

.sky {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #231b3a;
}

.scene, .scene::after { position: absolute; inset: 0; }
.scene {
  z-index: -1;
  background:
    radial-gradient(ellipse at 75% 55%, #b86277, transparent 62%),
    #201c3b url("./coastal-dusk.webp") 70% 57% / cover no-repeat;
  background-blend-mode: soft-light, normal;
  transition: filter 750ms cubic-bezier(.16, 1, .3, 1);
}

.scene::after {
  content: "";
  background:
    linear-gradient(0deg, var(--night) 0%, #0b102061 31%, transparent 62%),
    linear-gradient(90deg, #11132bee 4%, #171631b5 39%, #15132e30 70%, transparent 100%);
}

.live-in .scene { filter: brightness(1.1) saturate(1.1); }

.hero {
  position: relative;
  padding-block: clamp(44px, 4.3vw, 60px) clamp(86px, 6.5vw, 102px);
}

/* Box art on the right of the scene, tilted like it's leaning on the skyline. */
.cover {
  position: absolute;
  right: clamp(8px, 4vw, 72px);
  top: clamp(26px, 3vw, 44px);
  width: clamp(170px, 16vw, 236px);
  height: auto;
  border-radius: 6px;
  transform: rotate(4deg);
  box-shadow: 0 2px 0 #ffffff26 inset, 0 28px 60px #05071acc, 0 6px 18px #05071a99;
}
@media (min-width: 641px) {
  .hero { padding-right: calc(clamp(170px, 16vw, 236px) + clamp(8px, 4vw, 72px) + 28px); }
}

.hero h1 {
  max-width: 720px;
  margin: 0;
  font: 900 clamp(29px, 3.7vw, 53px)/1.02 var(--display);
  letter-spacing: -.04em;
  text-wrap: balance;
}

.title-art {
  display: block;
  width: min(100%, 680px);
  height: auto;
  margin-bottom: 14px;
}

.hero-description {
  margin: 21px 0 0;
  color: #e1def1;
  font-size: clamp(15px, 1.4vw, 19px);
}

.verdict {
  position: relative;
  width: fit-content;
  max-width: min(100%, 560px);
  margin-top: 20px;
  padding: 13px 17px 13px 36px;
  border: 1px solid #687196;
  border-radius: 12px;
  background: #12192f;
  color: var(--muted);
}

.verdict::before {
  content: "";
  position: absolute;
  top: 20px;
  left: 16px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.verdict[data-state="in"] { color: var(--green); }
.verdict[data-state="unverified"] { color: var(--amber); }
.verdict strong { display: block; color: var(--ink); font-size: 16px; line-height: 1.45; }
.verdict p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.verdict a { color: var(--blue); font-weight: 700; white-space: nowrap; }

.tracker { position: relative; margin-top: -64px; }
.controls {
  display: grid;
  grid-template-columns: minmax(0, 1.85fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(20px, 3vw, 40px);
  padding: clamp(18px, 2.2vw, 28px);
  border: 1px solid #46516e;
  border-radius: 22px;
  background: var(--panel);
  box-shadow: 0 20px 36px -24px #000b;
}

.controls fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.controls legend, .controls h2 {
  margin: 0 0 12px;
  padding: 0;
  font: 700 16px/1.35 var(--sans);
}

.pick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.pick label { position: relative; min-width: 0; cursor: pointer; }
.model-tile {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 12px 11px 10px;
  border: 1px solid #435274;
  border-radius: 12px;
  background: var(--tile);
  transition: background .2s, border-color .2s, box-shadow .2s;
}

.pick label:hover .model-tile { background: #233252; border-color: #7b91bc; }

.pick input:checked + .model-tile {
  border-color: var(--blue);
  background: #263657;
  box-shadow: inset 0 0 0 1px var(--blue);
}

.pick input:focus-visible + .model-tile { outline: 2px solid var(--blue); outline-offset: 4px; }
.model-tile b { margin-top: 8px; font-size: 15px; }
.model-tile small { color: var(--muted); font-size: 12px; }
.model-tile .has { color: var(--green); }

.console-photo {
  position: relative;
  display: block;
  width: 64px;
  height: 56px;
  margin: 2px auto 0;
}

.console-photo img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 4px #060a1799);
}

.all-models img {
  top: 3%;
  width: 75%;
  height: 94%;
}
.all-models img:first-child { right: auto; }
.all-models img:last-child { left: auto; }

.opts {
  display: flex;
  flex-wrap: wrap;
  column-gap: 18px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}

.opts label { display: flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; }
.opts input { width: 17px; height: 17px; margin: 0; }
.control-side { min-width: 0; padding-left: clamp(20px, 3vw, 40px); border-left: 1px solid var(--line); }
.postal-row { display: flex; gap: 8px; }

.near input {
  flex: 1;
  min-width: 0;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid #566583;
  border-radius: 10px;
  background: var(--night);
  text-transform: uppercase;
}

.near input::placeholder { color: var(--muted); text-transform: none; opacity: 1; }
.where, .alert p { margin: 7px 0 0; color: var(--muted); font-size: 13px; }
.where.err { color: var(--amber); }
.alert { margin-top: 15px; }
.alert svg { width: 18px; height: 18px; flex: none; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  gap: 8px;
  padding: 8px 15px;
  border: 1px solid #59698a;
  border-radius: 10px;
  background: var(--tile);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s, border-color .2s;
}

.btn:hover { border-color: var(--blue-strong); background: #263657; color: var(--ink); }
.btn.primary { width: 100%; border-color: var(--blue); background: var(--blue); color: #111b34; }
.btn.primary:hover { background: #d8e3ff; }
.btn[aria-pressed="true"] { border-color: #80d3b5; background: #1e433f; color: var(--green); }
.btn[aria-pressed="true"]:hover { background: #29534e; }

.block { margin-top: clamp(38px, 4.4vw, 60px); }
#controls, .block { scroll-margin-top: 20px; }

.block h2 {
  margin: 0 0 8px;
  font: 900 clamp(27px, 3vw, 39px)/1.12 var(--display);
  letter-spacing: -.035em;
}

.results-heading a { display: none; }
.lede { max-width: 68ch; margin: 0 0 19px; color: var(--muted); }
.hits { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }

.hit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px 20px;
  padding: 14px 17px;
  border: 1px solid #3d615b;
  border-radius: var(--radius);
  background: #132628;
  overflow-wrap: anywhere;
}

.hit h3 { margin: 0; font-size: 17px; line-height: 1.3; }
.hit .meta { margin: 4px 0 0; color: #bfd5da; font-size: 14px; }
.hit .meta b { color: var(--green); }
.hit .go { border-color: var(--green); background: var(--green); color: #0b2822; }
.hit .go:hover { background: #b5f4de; }

.empty {
  padding: 17px 19px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--muted);
}

.empty strong { display: block; margin-bottom: 4px; color: var(--ink); }
.more { margin-top: 10px; }

.tbl {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 12px 16px; border-top: 1px solid var(--line); text-align: left; vertical-align: top; }
thead th { border-top: 0; color: var(--muted); font-size: 13px; white-space: nowrap; }
tbody tr.group th { background: var(--tile); font-weight: 750; }
.src { margin-left: 10px; color: var(--muted); font-size: 13px; font-weight: 400; }
td.prod a { font-weight: 700; text-decoration: none; }
td.prod a:hover { text-decoration: underline; }
td small, .pill + .where-list { display: block; margin-top: 3px; }
.linkout td { vertical-align: middle; }
.linkout .btn { min-height: 44px; }
.retailer-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.nearby-stock { display: inline-flex; align-items: center; min-height: 44px; color: var(--blue); font-weight: 600; }
.copy-item { margin-left: 4px; padding: 2px 8px; min-height: 28px; border: 1px solid var(--line); border-radius: 6px; background: transparent; color: var(--blue); font: inherit; font-weight: 600; cursor: pointer; }
.copy-item:hover { border-color: var(--blue); }
.tbl-note { max-width: 75ch; margin: 12px 0 0; color: var(--muted); font-size: 14px; }
.where-list { margin: 0; padding: 0; color: var(--muted); list-style: none; }
td small, .muted { color: var(--muted); }
td .why { color: var(--amber); }

.pill {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  background: #25314b;
  color: #d4dcf0;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.pill.in { background: #20463e; color: var(--green); }
.pill.unk, .pill.tp { background: #473622; color: var(--amber); }
.pill.pre { background: #2c3963; color: var(--blue); }

.how {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 36px;
  color: var(--muted);
  font-size: 15px;
}

.how p { max-width: 68ch; margin: 0; }
.how strong { color: var(--ink); }

footer {
  margin-top: clamp(46px, 7vw, 90px);
  padding-block: 24px 36px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 28px; }
footer p { max-width: 72ch; margin: 0; }

@media (max-width: 910px) {
  .controls { grid-template-columns: minmax(0, 1fr); }
  .control-side { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding: 16px 0 0; border: 0; border-top: 1px solid var(--line); }
  .alert { margin-top: 34px; }
}

@media (max-width: 640px) {
  .bar-inner { grid-template-columns: 1fr auto; min-height: 60px; gap: 12px; }
  .bar .jump { display: none; }
  .crumbs { gap: 7px; }
  .crumbs .site { font-size: 13px; }
  .home { font-size: 14px; }
  .home svg { display: none; }
  .home .long { display: none; }
  .home span { overflow: hidden; text-overflow: ellipsis; }
  .crumbs { overflow: hidden; }
  .crumbs, .home { min-width: 0; }
  .live { font-size: 12px; }
  .hero { padding-block: 42px 94px; }
  /* Phones: a small cover beside "Your PS5 isn't", so the stock verdict stays near the top. */
  .cover { right: 0; top: calc(42px + (100vw - 2 * var(--gutter)) * .1847 + 20px); width: 92px; border-radius: 4px; transform: rotate(4deg); box-shadow: 0 14px 30px #05071acc; }
  .hero h1 span, .hero-description { display: block; max-width: calc(100% - 108px); }
  .hero h1 { font-size: clamp(28px, 7vw, 44px); }
  .scene { background-position: 68% 57%; }
  .scene::after {
    background:
      linear-gradient(0deg, var(--night), #0b10203d 66%, transparent),
      linear-gradient(90deg, #11132bed, #1716318c 68%, #15132e38);
  }
  .tracker { margin-top: -54px; }
  .controls { gap: 12px; border-radius: var(--radius); }
  .control-side { grid-template-columns: 1fr; gap: 14px; }
  .alert { margin: 0; }
  .model-tile { padding: 8px; }
  .model-tile small { font-size: 11px; }
  .hit { grid-template-columns: minmax(0, 1fr); }
  .hit .go { justify-self: start; }
  .results-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; column-gap: 12px; }
  .results-heading a { display: inline-flex; align-items: center; min-height: 44px; color: var(--blue); font-size: 13px; }
  .how { grid-template-columns: 1fr; }

  table, tbody, tr, th, td { display: block; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  tbody tr { border-top: 1px solid var(--line); padding: 10px 14px; }
  tbody tr:first-child { border: 0; }
  tbody tr.group { padding: 0; }
  tbody tr.group th { border: 0; padding: 12px 14px; }
  .src { display: block; margin: 2px 0 0; }
  td { border: 0; padding: 3px 0; overflow-wrap: anywhere; }
  td[data-h]:not(.prod)::before { content: attr(data-h); display: block; color: var(--muted); font: 600 12px/1.5 var(--sans); }
  td[data-h="Price"], td[data-h="Online"], td[data-h="In stores"] { display: inline-block; margin-right: 14px; vertical-align: top; }
  .linkout .btn { margin-top: 4px; }
}

@media (max-width: 410px) {
  .pick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .model-tile { display: grid; grid-template: 1fr 1fr / 38px minmax(0, 1fr); align-items: center; column-gap: 5px; }
  .model-tile b { align-self: end; margin-top: 0; }
  .model-tile small { align-self: start; }
  .console-photo { grid-row: 1 / 3; width: 38px; height: 42px; margin: 0; }
  .opts { column-gap: 10px; font-size: 12px; }
}

@media (max-width: 360px) {
  .home { font-size: 13px; }
  .crumbs .site { font-size: 12px; }
  .live { gap: 5px; font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}

/* Alerts with no live check to watch */
.alert.off .btn { opacity: .55; cursor: not-allowed; }
