:root {
  --latest-ink: #11162f;
  --latest-muted: #626b89;
  --latest-line: #e5e7f1;
  --latest-violet: #6830e8;
  --latest-violet-soft: #f2edff;
  --latest-green: #159760;
  --latest-green-soft: #e9f9f1;
}

* { box-sizing: border-box; }

html { background: #fff; }

body.latest-body {
  margin: 0;
  min-width: 320px;
  color: var(--latest-ink);
  background: #fff;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.latest-body > main { min-height: calc(100vh - 72px); }

.latest-body .skip-link {
  position: fixed;
  z-index: 30;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  color: #fff;
  background: var(--latest-violet);
  border-radius: 8px;
  transform: translateY(-160%);
}

.latest-body .skip-link:focus { transform: translateY(0); }

.latest-page {
  display: grid;
  grid-template-columns: 296px minmax(0, 1fr);
  min-height: calc(100vh - 72px);
}

.latest-filters {
  min-width: 0;
  padding: 44px 27px 36px 45px;
  border-right: 1px solid var(--latest-line);
  background: #fff;
}

.latest-filters header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 0 18px;
  border-bottom: 1px solid var(--latest-line);
}

.latest-filters h2,
.latest-filters legend,
.latest-category-filter > label {
  margin: 0;
  color: var(--latest-ink);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

.latest-filters header a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--latest-violet);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

.latest-filters header a span { font-size: 18px; line-height: 1; }

.latest-filters fieldset {
  display: grid;
  gap: 12px;
  min-width: 0;
  margin: 0;
  padding: 20px 0;
  border: 0;
  border-bottom: 1px solid var(--latest-line);
}

.latest-filters fieldset:last-of-type { border-bottom: 0; }

.latest-filters legend { margin-bottom: 13px; padding: 0; }

.latest-filters fieldset label {
  display: flex;
  align-items: center;
  gap: 9px;
  width: fit-content;
  color: #252d4d;
  font-size: 13px;
  line-height: 1.25;
  cursor: pointer;
}

.latest-filters input[type="radio"],
.latest-filters input[type="checkbox"] {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  margin: 0;
  accent-color: var(--latest-violet);
  cursor: pointer;
}

.latest-category-filter { padding: 18px 0 2px; }

.latest-category-filter > label { display: block; margin-bottom: 11px; }

.latest-category-filter > div {
  display: flex;
  height: 42px;
  overflow: hidden;
  border: 1px solid #dfe2ee;
  border-radius: 7px;
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.latest-category-filter > div:focus-within {
  border-color: #8d66ef;
  box-shadow: 0 0 0 3px rgba(104, 48, 232, .12);
}

.latest-category-filter input {
  min-width: 0;
  flex: 1;
  padding: 0 0 0 12px;
  color: var(--latest-ink);
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 12px;
}

.latest-category-filter input::placeholder { color: #8088a4; opacity: 1; }

.latest-category-filter button {
  display: grid;
  width: 42px;
  flex: 0 0 42px;
  place-items: center;
  padding: 0;
  color: #525c7e;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.latest-category-filter svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }

.latest-filter-submit {
  width: 100%;
  min-height: 41px;
  margin-top: 11px;
  padding: 8px 12px;
  color: var(--latest-violet);
  border: 1px solid #8d5df2;
  border-radius: 7px;
  background: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: color .15s ease, background .15s ease, box-shadow .15s ease;
}

.latest-filter-submit:hover { color: #fff; background: var(--latest-violet); }

.latest-content {
  min-width: 0;
  padding: 23px 46px 27px 39px;
}

.latest-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #5e6785;
  font-size: 12px;
  line-height: 1.4;
}

.latest-breadcrumb a { color: inherit; text-decoration: none; }
.latest-breadcrumb strong { color: var(--latest-violet); font-weight: 600; }
.latest-breadcrumb span { color: #a2a8ba; font-size: 18px; line-height: .8; }

.latest-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin: 12px 0 25px 6px;
}

.latest-heading h1 {
  margin: 0;
  color: #0e142d;
  font-size: clamp(27px, 2vw, 31px);
  font-weight: 750;
  letter-spacing: -.035em;
  line-height: 1.05;
}

.latest-heading p {
  margin: 8px 0 0;
  color: #535d7c;
  font-size: 13px;
  line-height: 1.45;
}

.latest-heading label {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  color: #65708e;
  font-size: 12px;
}

.latest-heading select {
  min-width: 180px;
  height: 42px;
  padding: 0 36px 0 14px;
  color: #27304f;
  border: 1px solid #dfe2ed;
  border-radius: 7px;
  outline: none;
  background: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.latest-heading select:focus-visible,
.latest-pagination a:focus-visible,
.latest-card a:focus-visible,
.latest-card button:focus-visible,
.latest-filter-submit:focus-visible {
  outline: 3px solid rgba(104, 48, 232, .25);
  outline-offset: 2px;
}

.latest-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 17px;
}

.latest-card {
  position: relative;
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) 105px 45px;
  align-items: center;
  gap: 16px;
  min-height: 151px;
  padding: 36px 15px 16px 25px;
  overflow: hidden;
  border: 1px solid #e0e3ed;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 2px 5px rgba(27, 34, 64, .025);
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.latest-card:hover {
  border-color: #d2c5f4;
  box-shadow: 0 8px 24px rgba(47, 35, 92, .08);
  transform: translateY(-1px);
}

.latest-new-badge {
  position: absolute;
  top: 11px;
  left: 14px;
  padding: 4px 9px;
  color: var(--latest-violet);
  border: 1px solid #d7c8ff;
  border-radius: 8px;
  background: #fbf9ff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}
.latest-new-badge--testers { border-color: #cbb9fa; background: #f5f0ff; color: #5f2bd5; }

.latest-app-logo {
  display: grid;
  width: 82px;
  height: 82px;
  overflow: hidden;
  place-items: center;
  color: #fff;
  border-radius: 17px;
  background: linear-gradient(145deg, #251253, #0d0921);
  text-decoration: none;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.15);
}

.latest-app-logo img { width: 100%; height: 100%; object-fit: cover; }
.latest-app-logo > span { font-size: 34px; font-weight: 800; }
.latest-app-logo--2 { background: linear-gradient(145deg, #5bc4ff, #2856df); }
.latest-app-logo--3 { background: linear-gradient(145deg, #ffdf45, #ffb719); color: #111; }
.latest-app-logo--4 { background: linear-gradient(145deg, #2bd3b2, #129a7e); }
.latest-app-logo--5 { background: linear-gradient(145deg, #ff50b5, #ea278d); }
.latest-app-logo--6 { background: linear-gradient(145deg, #4f95ff, #2765dd); }
.latest-app-logo--7 { background: linear-gradient(145deg, #2a2a2a, #070707); }
.latest-app-logo--8 { background: linear-gradient(145deg, #ff6b2e, #ff391b); }

.latest-app-copy { min-width: 0; align-self: center; }

.latest-app-copy h2 {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 16px;
  font-weight: 750;
  letter-spacing: -.015em;
  line-height: 1.2;
}

.latest-app-copy h2 a {
  min-width: 0;
  overflow: hidden;
  color: var(--latest-ink);
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.latest-app-copy h2 svg {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  color: var(--latest-violet);
  fill: currentColor;
}

.latest-app-copy h2 svg path { fill: none; stroke: #fff; stroke-width: 1.8; }

.latest-app-copy > p {
  display: -webkit-box;
  min-height: 39px;
  margin: 7px 0 8px;
  overflow: hidden;
  color: #505a78;
  font-size: 13px;
  line-height: 1.48;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.latest-app-copy > div { display: flex; flex-wrap: wrap; gap: 7px; }

.latest-app-copy > div span {
  max-width: 155px;
  padding: 4px 11px;
  overflow: hidden;
  color: var(--latest-violet);
  border-radius: 999px;
  background: var(--latest-violet-soft);
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.latest-app-copy > div .latest-price-tag { color: var(--latest-green); background: var(--latest-green-soft); }

.latest-added {
  align-self: start;
  margin: 3px 0 0;
  color: #7b84a0;
  font-size: 11px;
  line-height: 1.45;
  text-align: right;
}

.latest-added strong { color: inherit; font-weight: 500; }

.latest-favorite-form { margin: 0; align-self: end; }

.latest-favorite-form button,
.latest-favorite-link {
  display: grid;
  width: 39px;
  height: 39px;
  place-items: center;
  padding: 0;
  color: var(--latest-violet);
  border: 1px solid #dfe1ec;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 2px 5px rgba(34, 38, 70, .06);
  cursor: pointer;
}

.latest-favorite-form button[aria-pressed="true"] { color: #fff; border-color: var(--latest-violet); background: var(--latest-violet); }
.latest-favorite-form svg, .latest-favorite-link svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; }

.latest-empty {
  display: grid;
  min-height: 420px;
  place-items: center;
  align-content: center;
  padding: 40px;
  color: var(--latest-muted);
  border: 1px solid var(--latest-line);
  border-radius: 13px;
  text-align: center;
}

.latest-empty span { color: var(--latest-violet); font-size: 38px; }
.latest-empty h2 { margin: 10px 0 4px; color: var(--latest-ink); font-size: 20px; }
.latest-empty p { max-width: 520px; margin: 0 0 18px; font-size: 14px; }
.latest-empty a { color: var(--latest-violet); font-size: 13px; font-weight: 700; }

.latest-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 47px;
  padding-top: 14px;
}

.latest-pagination a,
.latest-pagination span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #4c5675;
  border: 1px solid #dfe2ed;
  border-radius: 7px;
  background: #fff;
  font-size: 12px;
  text-decoration: none;
}

.latest-pagination a[aria-current="page"] { color: #fff; border-color: var(--latest-violet); background: linear-gradient(135deg, #7948ed, #5221ce); }
.latest-pagination a[aria-disabled="true"] { color: #abb0c0; pointer-events: none; }
.latest-pagination span { border-color: transparent; }

@media (max-width: 1300px) {
  .latest-page { grid-template-columns: 260px minmax(0, 1fr); }
  .latest-filters { padding-left: 28px; }
  .latest-content { padding-right: 28px; padding-left: 28px; }
  .latest-card { grid-template-columns: 72px minmax(0, 1fr) 78px 40px; gap: 12px; padding-left: 18px; }
  .latest-app-logo { width: 72px; height: 72px; border-radius: 15px; }
}

@media (max-width: 1040px) {
  .latest-grid { grid-template-columns: 1fr; }
  .latest-card { grid-template-columns: 82px minmax(0, 1fr) 105px 45px; padding-left: 24px; }
  .latest-app-logo { width: 82px; height: 82px; }
}

@media (max-width: 760px) {
  .latest-body > main, .latest-page { min-height: calc(100vh - 64px); }
  .latest-page { display: block; }
  .latest-filters { padding: 22px 20px; border-right: 0; border-bottom: 1px solid var(--latest-line); }
  .latest-filters fieldset { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .latest-filters legend { grid-column: 1 / -1; }
  .latest-content { padding: 22px 16px 30px; }
  .latest-heading { align-items: flex-start; margin-left: 0; }
  .latest-heading label { align-items: flex-start; flex-direction: column; gap: 5px; }
  .latest-heading select { min-width: 155px; }
}

@media (max-width: 560px) {
  .latest-heading { flex-direction: column; }
  .latest-heading label, .latest-heading select { width: 100%; }
  .latest-card { grid-template-columns: 64px minmax(0, 1fr) 40px; gap: 12px; min-height: 142px; padding: 37px 13px 14px; }
  .latest-app-logo { width: 64px; height: 64px; border-radius: 13px; }
  .latest-added { display: none; }
  .latest-favorite-form, .latest-favorite-link { align-self: end; }
  .latest-app-copy h2 { font-size: 15px; }
  .latest-app-copy > p { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .latest-card, .latest-filter-submit, .latest-category-filter > div { transition: none; }
}
