/* TesterCoder — product showcase. One family (Archivo): expanded widths for display, normal for reading.
   The page stays quiet so the apps' own colours and screenshots carry it. */
:root {
  --bg: #f4f6fa;
  --card: #ffffff;
  --ink: #0f1533;
  --body: #2b3352;
  --muted: #5d6685;
  --line: #dde2ec;
  --cobalt: #2440e6;
  --sun: #ffd43b;
  --sun-ink: #3a2e00;
  --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(--bg);
  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: 8px; }
.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding-left: var(--gutter); padding-right: 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; }
main { flex: 1; }

/* ---------- Top bar ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 76px; }
.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 svg { flex: none; }
.kbd-search { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--muted); font-size: 14px; text-decoration: none; }
.kbd-search:hover { color: var(--ink); border-color: #c5ccdb; }
kbd { font: 600 12px Archivo, sans-serif; padding: 1px 6px; border-radius: 5px; background: #eceff5; color: var(--muted); }

/* ---------- Intro ---------- */
.intro { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 40px; padding-top: clamp(16px, 4vw, 40px); padding-bottom: 28px; }
.intro h1 { flex: 1 1 520px; margin: 0; font-weight: 800; font-stretch: var(--wide); font-size: clamp(32px, 4.6vw, 60px); line-height: 1; letter-spacing: -0.035em; max-width: 16ch; }
.intro p { flex: 0 1 40ch; margin: 0 0 6px; max-width: 40ch; color: var(--body); font-size: 17px; }
.sun { background: var(--sun); color: var(--sun-ink); font-weight: 800; padding: 0 6px; border-radius: 6px; }

/* ---------- Showcase ---------- */
.show {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  min-height: 500px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 28px;
  overflow: hidden;
}
.show-copy { display: flex; flex-direction: column; padding: clamp(24px, 3.4vw, 48px); gap: 20px; }
.show-head { display: flex; align-items: center; gap: 16px; }
.show-head > div { min-width: 0; }
.show-head img { width: 72px; height: 72px; border-radius: 18px; flex: none; filter: drop-shadow(0 6px 12px rgba(15,21,51,.16)); }
.show-head h2 { margin: 0; font-weight: 800; font-stretch: var(--wide); font-size: clamp(30px, 3.2vw, 42px); line-height: 1; letter-spacing: -0.035em; }
.show-platform { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.show-tagline { margin: 0; font-size: clamp(19px, 1.7vw, 23px); line-height: 1.35; color: var(--ink); font-weight: 500; letter-spacing: -0.01em; max-width: 30ch; }
.show-highlights { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.show-highlights li { display: flex; gap: 10px; color: var(--body); font-size: 15.5px; line-height: 1.45; }
.show-highlights svg { margin-top: 2px; color: var(--cobalt); stroke-width: 2.6; }
.show-actions { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-top: 8px; }
.show-pro { display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 999px; background: var(--sun); color: var(--sun-ink); font-weight: 700; font-size: 13px; transform: rotate(-3deg); }

.stage { position: relative; overflow: hidden; min-height: 320px; }
.stage::before { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 90% at 0% 0%, rgba(255,255,255,.7), transparent 60%); pointer-events: none; }
.stage .shot {
  position: absolute;
  left: 9%;
  top: 11%;
  width: 104%;
  max-width: none;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(15,21,51,.08), 0 30px 60px -12px rgba(15,21,51,.35);
}
.stage .shot-2 { left: 54%; top: 52%; width: 62%; box-shadow: 0 2px 4px rgba(15,21,51,.1), 0 24px 48px -10px rgba(15,21,51,.45); }
.stage .big-icon { position: absolute; left: 50%; top: 50%; width: min(240px, 46%); transform: translate(-50%, -50%) rotate(-6deg); border-radius: 22%; filter: drop-shadow(0 30px 40px rgba(15,21,51,.3)); }
.stage .ring { position: absolute; left: 50%; top: 50%; border-radius: 50%; border: 1.5px solid rgba(15,21,51,.08); transform: translate(-50%, -50%); }
.fade-in { animation: fade .32s ease-out; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } }
.big-icon.fade-in { animation-name: fade-icon; }
@keyframes fade-icon { from { opacity: 0; transform: translate(-50%, -46%) rotate(-6deg); } }
@media (prefers-reduced-motion: reduce) { .fade-in { animation: none; } }

.switcher { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.switcher button { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid transparent; border-radius: 14px; background: transparent; text-align: left; min-width: 0; }
.switcher button:hover { background: #e9ecf3; }
.switcher button[aria-pressed="true"] { background: var(--card); border-color: var(--line); box-shadow: 0 1px 2px rgba(15,21,51,.06); }
.switcher img { width: 36px; height: 36px; border-radius: 9px; flex: none; }
.switcher strong { display: block; font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.switcher small { display: block; font-size: 12.5px; color: var(--muted); }
.switcher span { min-width: 0; }

/* ---------- Catalogue ---------- */
.catalogue { padding-top: 72px; padding-bottom: 88px; }
.catalogue-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; }
.catalogue-head h2 { margin: 0; font-weight: 800; font-stretch: var(--wide); font-size: clamp(26px, 2.6vw, 34px); letter-spacing: -0.03em; }
.count { margin: 0; color: var(--muted); font-size: 14px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 20px 0 22px; }
.cats { display: inline-flex; padding: 4px; gap: 2px; background: #e4e8f0; 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='%235d6685' 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; }

/* Four to a row */
.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 { position: relative; 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-shadow .15s; }
.box:hover { border-color: #c2c9da; box-shadow: 0 14px 30px -18px rgba(15,21,51,.35); }
.box-face { position: relative; height: 168px; overflow: hidden; }
.box-face .face-icon { position: absolute; left: 18px; bottom: 16px; z-index: 1; width: 64px; height: 64px; border-radius: 16px; filter: drop-shadow(0 6px 12px rgba(15,21,51,.2)); }
.box-face .face-shot { position: absolute; left: 30%; top: 18px; width: 112%; max-width: none; border-radius: 8px; box-shadow: 0 16px 30px -10px rgba(15,21,51,.35); }
.pro-tag { position: absolute; top: 14px; right: 14px; z-index: 2; 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; font-weight: 600; color: var(--ink); }
.box-foot { display: flex; margin-top: 12px; }

.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-lg { padding: 13px 22px; font-size: 15.5px; }
.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-lg.btn-soon { padding: 11.5px 20px; }
.btn-ghost { background: #e6eaf3; color: var(--ink); }
.show-actions .btn-ghost { padding: 13px 20px; font-size: 15.5px; }
.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 130px 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: #f7f8fc; }
.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; }

/* ---------- 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: 600px; max-height: 92vh; overflow-y: auto; background: var(--card); border-radius: 22px; box-shadow: 0 30px 80px rgba(15,21,51,.35); animation: fade .22s ease-out; }
@media (prefers-reduced-motion: reduce) { .sheet { animation: none; } }
.sheet-face { position: relative; padding: 26px 64px 22px 26px; display: flex; gap: 18px; align-items: flex-end; }
.sheet-face img { width: 80px; height: 80px; border-radius: 20px; flex: none; 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: var(--body); 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,.8); 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: var(--body); }
.shots { display: grid; gap: 10px; }
.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(--bg); }
.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; }
.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: 44px 0 0; font-size: 13px; color: #8d96b6; }

/* ---------- Legal ---------- */
.legal-head { padding-top: clamp(16px, 4vw, 40px); padding-bottom: 8px; }
.legal-head h1 { margin: 0; font-weight: 800; font-stretch: var(--wide); font-size: clamp(36px, 5vw, 64px); line-height: 1; letter-spacing: -0.035em; }
.legal-head p { margin: 14px 0 0; color: var(--muted); }
.legal { display: grid; grid-template-columns: 220px minmax(0, 68ch); gap: 48px; padding-top: 40px; padding-bottom: 80px; }
.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: #e4e8f0; color: var(--ink); }
.legal article { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: clamp(22px, 3vw, 40px); }
.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: 32px; margin-bottom: 32px; border-bottom: 1px solid var(--line); }
.legal article section:last-child { border-bottom: 0; padding-bottom: 0; margin-bottom: 0; }
.legal article h3 { margin: 20px 0 6px; font-size: 17px; }
.legal article p, .legal article li { color: var(--body); font-size: 16px; line-height: 1.65; }
.legal article a { color: var(--cobalt); }
.legal article code { font-size: 14px; background: #eceff5; padding: 1px 6px; border-radius: 6px; word-break: break-all; }

/* ---------- Smaller screens ---------- */
@media (max-width: 980px) {
  .show { grid-template-columns: 1fr; min-height: 0; }
  .stage { order: -1; height: clamp(240px, 52vw, 420px); }
  .switcher { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@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: 720px) { .foot { grid-template-columns: 1fr 1fr; } .foot > :first-child { grid-column: 1 / -1; } }
@media (max-width: 560px) {
  .kbd-search kbd { display: none; }
  .box-face { height: 140px; }
  .switcher small { display: none; }
  .switcher button { padding: 8px; gap: 8px; }
  .switcher img { width: 30px; height: 30px; }
  .switcher strong { font-size: 14px; }
  .show-head { gap: 12px; }
  .show-head img { width: 56px; height: 56px; border-radius: 14px; }
  .show-head h2 { font-size: 26px; font-stretch: 112%; }
}
