/* TesterCoder — one family (Archivo), widths do the work: expanded for display, normal for reading. */
:root {
  --cobalt: #2440e6;
  --cobalt-deep: #1a2fb8;
  --ink: #0f1533;
  --paper: #eef1f7;
  --card: #ffffff;
  --line: #d9deea;
  --muted: #5a6382;
  --sun: #ffd43b;
  --sun-ink: #3a2e00;
  --ok: #128c5e;
  --radius: 18px;
  --wide: 125%;
  --gutter: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.55 Archivo, system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
[hidden] { display: none !important; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 2px; border-radius: 6px; }
.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Top band ---------- */
.band { background: var(--cobalt); color: #fff; position: relative; overflow: hidden; }
.band :focus-visible { outline-color: var(--sun); }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-stretch: var(--wide); font-size: 19px; letter-spacing: -0.01em; }
.brand img { width: 30px; height: 30px; }
.kbd-search { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px; border: 1px solid rgba(255,255,255,.35); background: transparent; color: #fff; font-size: 14px; }
.kbd-search:hover { background: rgba(255,255,255,.12); }
kbd { font: 600 12px Archivo, sans-serif; padding: 1px 6px; border-radius: 5px; background: rgba(255,255,255,.18); }

.hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 32px 48px; padding: clamp(40px, 7vw, 88px) 0 clamp(56px, 8vw, 104px); }
.hero h1 {
  margin: 0;
  max-width: 13ch;
  font-weight: 800;
  font-stretch: var(--wide);
  font-size: clamp(40px, 6.2vw, 96px);
  line-height: 0.94;
  letter-spacing: -0.035em;
}
.hero p { margin: 0; max-width: 46ch; font-size: clamp(17px, 1.6vw, 20px); line-height: 1.5; color: rgba(255,255,255,.86); }

/* The one loud thing: a price sticker slapped on the band. */
.sticker {
  grid-column: 2;
  grid-row: 1 / span 2;
  margin-right: clamp(0px, 3vw, 48px);
  width: clamp(150px, 17vw, 208px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--sun);
  color: var(--sun-ink);
  display: grid;
  place-content: center;
  text-align: center;
  transform: rotate(-11deg);
  box-shadow: 0 14px 0 -4px var(--cobalt-deep);
  animation: slap .55s cubic-bezier(.2, 1.4, .4, 1) .25s both;
}
.sticker b { display: block; font-weight: 900; font-stretch: var(--wide); font-size: clamp(38px, 4.4vw, 56px); line-height: 1; letter-spacing: -0.04em; }
.sticker span { display: block; margin-top: 6px; font-weight: 600; font-size: clamp(13px, 1.2vw, 15px); line-height: 1.25; }
@keyframes slap { from { opacity: 0; transform: rotate(-30deg) scale(1.5); } }
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; }
  .sticker { grid-column: 1; grid-row: auto; margin: 4px 0 0; width: 140px; }
}
@media (prefers-reduced-motion: reduce) { .sticker { animation: none; } }

/* ---------- Toolbar ---------- */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 28px 0 20px; }
.cats { display: inline-flex; padding: 4px; gap: 2px; background: #e1e6f0; border-radius: 999px; }
.cats button { border: 0; background: transparent; padding: 7px 16px; border-radius: 999px; font-weight: 600; font-size: 14px; color: var(--muted); }
.cats button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(15,21,51,.12); }
.search { flex: 1 1 240px; display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 0 14px; height: 42px; color: var(--muted); }
.search:focus-within { border-color: var(--cobalt); box-shadow: 0 0 0 3px rgba(36,64,230,.16); }
.search input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; color: var(--ink); font-size: 15px; }
.search input::placeholder { color: #8a92ad; }
.tools-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.sort { height: 42px; padding: 0 34px 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%235a6382' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 14px center; appearance: none; -webkit-appearance: none; font-size: 14px; font-weight: 500; }
.views { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; background: var(--card); padding: 3px; }
.views button { border: 0; background: transparent; width: 34px; height: 34px; border-radius: 999px; display: grid; place-items: center; color: var(--muted); }
.views button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.count { margin: 0 0 16px; color: var(--muted); font-size: 14px; }

/* ---------- Grid: four boxes on a shelf ---------- */
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 900px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .grid { grid-template-columns: 1fr; } }

.box { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; cursor: pointer; transition: border-color .15s; }
.box:hover { border-color: var(--ink); }
.box-face { position: relative; height: 150px; display: flex; align-items: flex-end; padding: 18px; }
.box-face img { width: 76px; height: 76px; border-radius: 18px; filter: drop-shadow(0 8px 14px rgba(15,21,51,.18)); }
.pro-tag { position: absolute; top: 14px; right: 14px; padding: 4px 10px; border-radius: 999px; background: var(--sun); color: var(--sun-ink); font-weight: 700; font-size: 12px; transform: rotate(4deg); }
.box-body { flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 18px 18px 20px; }
.box h3 { margin: 0; font-weight: 800; font-stretch: 112%; font-size: 21px; line-height: 1.15; letter-spacing: -0.02em; }
.box .tagline { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.5; flex: 1; }
.box .platform { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.box .price { display: block; margin-top: 2px; }
.box-foot { display: flex; margin-top: 12px; }
.price { font-size: 13px; font-weight: 600; color: var(--ink); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 999px; padding: 9px 16px; font-weight: 700; font-size: 14px; text-decoration: none; white-space: nowrap; }
.btn-get { background: var(--ink); color: #fff; }
.btn-get:hover { background: var(--cobalt); }
.btn-soon { background: transparent; color: var(--muted); border: 1.5px dashed #b6bdd1; padding: 7.5px 14px; cursor: default; }
.btn-ghost { background: #e6eaf3; color: var(--ink); }
.btn-ghost:hover { background: #dbe0ec; }
.btn-pro { background: var(--sun); color: var(--sun-ink); }
.btn-pro:hover { filter: brightness(.96); }

/* ---------- List ---------- */
.list { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.row { display: grid; grid-template-columns: 52px minmax(0, 1fr) 190px 120px auto; align-items: center; gap: 16px; padding: 14px 18px; border-top: 1px solid var(--line); cursor: pointer; }
.row:first-child { border-top: 0; }
.row:hover { background: #f6f8fc; }
.row-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; }
.row-icon img { width: 40px; height: 40px; border-radius: 10px; }
.row h3 { margin: 0; font-weight: 800; font-stretch: 112%; font-size: 17px; letter-spacing: -0.015em; }
.row p { margin: 2px 0 0; color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .meta { font-size: 13px; color: var(--muted); }
@media (max-width: 900px) { .row { grid-template-columns: 52px minmax(0, 1fr) auto; } .row .meta { display: none; } }
@media (max-width: 480px) { .row .btn span { display: none; } .row .btn { padding: 9px 11px; } }

.empty { text-align: center; color: var(--muted); padding: 56px 0; }
.empty button { margin-top: 12px; }

main { flex: 1; padding-bottom: 72px; }

/* ---------- Detail sheet ---------- */
.sheet-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(15,21,51,.55); display: none; align-items: center; justify-content: center; padding: 16px; }
.sheet-backdrop.open { display: flex; }
.sheet { width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; background: var(--card); border-radius: 22px; box-shadow: 0 30px 80px rgba(15,21,51,.35); animation: rise .22s ease-out; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
@media (prefers-reduced-motion: reduce) { .sheet { animation: none; } }
.sheet-face { position: relative; padding: 26px 26px 22px; display: flex; gap: 18px; align-items: flex-end; }
.sheet-face img { width: 80px; height: 80px; border-radius: 20px; filter: drop-shadow(0 8px 14px rgba(15,21,51,.18)); }
.sheet-face h2 { margin: 0; font-weight: 800; font-stretch: var(--wide); font-size: 28px; line-height: 1.05; letter-spacing: -0.03em; }
.sheet-face p { margin: 6px 0 0; font-size: 15px; color: #2b3352; line-height: 1.45; }
.sheet-close { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border: 0; border-radius: 999px; background: rgba(255,255,255,.75); display: grid; place-items: center; color: var(--ink); }
.sheet-body { padding: 22px 26px 26px; display: flex; flex-direction: column; gap: 18px; }
.sheet-body > p { margin: 0; color: #2b3352; }
.shots { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.shots img { border-radius: 10px; border: 1px solid var(--line); }
.specs { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 20px; padding: 16px 18px; border-radius: 14px; background: var(--paper); }
.specs div { min-width: 0; }
.specs dt { font-size: 12.5px; color: var(--muted); }
.specs dd { margin: 2px 0 0; font-weight: 600; font-size: 14.5px; }
.pro-box { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 18px; border-radius: 14px; background: #fff6cc; border: 1px solid #f2dc7a; }
.pro-box strong { display: block; font-weight: 800; font-stretch: 112%; font-size: 17px; }
.pro-box p { margin: 2px 0 0; font-size: 14px; color: #5b4c0c; }
.pro-box .later { font-size: 13px; font-weight: 700; color: #7a6510; white-space: nowrap; }
.notes { margin: 0; font-size: 13.5px; color: var(--muted); }
.sheet-actions { display: flex; justify-content: flex-end; gap: 10px; }

/* ---------- Footer ---------- */
footer { background: var(--ink); color: #c9cfe3; padding: 56px 0 40px; }
footer :focus-visible { outline-color: var(--sun); }
.foot { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.foot .brand { color: #fff; }
.foot p { margin: 14px 0 0; max-width: 34ch; font-size: 15px; }
.foot h4 { margin: 0 0 12px; color: #fff; font-size: 15px; font-weight: 700; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 15px; }
.foot a { text-decoration: none; }
.foot a:hover { color: #fff; text-decoration: underline; }
.copy { margin-top: 44px; font-size: 13px; color: #8d96b6; }
@media (max-width: 720px) { .foot { grid-template-columns: 1fr 1fr; } .foot > :first-child { grid-column: 1 / -1; } }

/* ---------- Legal ---------- */
.legal-band .hero { display: block; padding: 32px 0 56px; }
.legal-band h1 { font-size: clamp(38px, 6vw, 72px); max-width: none; }
.legal-band .updated { margin-top: 16px; font-size: 15px; color: rgba(255,255,255,.75); }
.legal { display: grid; grid-template-columns: 220px minmax(0, 68ch); gap: 48px; padding-top: 48px; }
.legal nav { position: sticky; top: 24px; align-self: start; display: grid; gap: 4px; }
.legal nav a { text-decoration: none; padding: 7px 12px; border-radius: 10px; color: var(--muted); font-weight: 600; font-size: 15px; }
.legal nav a:hover { background: #e1e6f0; color: var(--ink); }
.legal article h2 { margin: 0 0 12px; font-weight: 800; font-stretch: 112%; font-size: 26px; letter-spacing: -0.02em; scroll-margin-top: 24px; }
.legal article section { padding-bottom: 36px; margin-bottom: 36px; border-bottom: 1px solid var(--line); }
.legal article section:last-child { border-bottom: 0; }
.legal article h3 { margin: 20px 0 6px; font-size: 17px; }
.legal article p, .legal article li { color: #2b3352; font-size: 16px; line-height: 1.65; }
.legal article a { color: var(--cobalt); }
.legal article code { font-size: 14px; background: #e1e6f0; padding: 1px 6px; border-radius: 6px; word-break: break-all; }
@media (max-width: 820px) { .legal { grid-template-columns: 1fr; gap: 16px; padding-top: 24px; } .legal nav { position: static; display: flex; flex-wrap: wrap; } }
@media (max-width: 560px) { .kbd-search kbd { display: none; } .box-face { height: 124px; } }
