@font-face {
  font-family: 'Mona Sans';
  src: url('/fonts/MonaSans.woff2') format('woff2');
  font-weight: 200 900;
  font-display: swap;
  font-style: normal;
}

@font-face {
  font-family: 'Hubot Sans';
  src: url('/fonts/HubotSans.woff2') format('woff2');
  font-weight: 200 900;
  font-display: swap;
  font-style: normal;
}

/* ====== RESET & BASE ====== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  tab-size: 4;
  overflow-x: hidden;
  color-scheme: light dark;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-background);
  font-weight: 400;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: clip;
}

img, video, svg {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-base);
}

a:hover {
  color: var(--color-primary-hover);
}

button {
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  border: none;
  background: none;
  color: inherit;
}

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.3;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--color-text);
  text-wrap: balance;
}

h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}
h2 { font-size: clamp(1.25rem, 3vw, 1.875rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--color-focus, #2563eb);
  outline-offset: 2px;
  border-radius: 4px;
}

:focus:not(:focus-visible) {
  outline: none;
}

::selection {
  background: rgba(99, 102, 241, 0.2);
  color: var(--color-text);
}

/* ====== CSS CUSTOM PROPERTIES (TOKENS) ====== */
:root {
  --color-primary: #6366F1;
  --color-primary-hover: #4F46E5;
  --color-surface: #FFFFFF;
  --color-surface-alt: #F1F5F9;
  --color-background: #F8FAFC;
  --bg-rgb: 248, 250, 252;
  --color-text: #0F172A;
  --color-text-muted: #64748B;
  --color-border: #E2E8F0;
  --color-success: #10B981;
  --color-warning: #F59E0B;
  --color-danger: #EF4444;
  --color-focus: #2563eb;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);

  --font-display: 'Mona Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Hubot Sans', 'Mona Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-sans: var(--font-body);
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'SF Mono', monospace;

  --header-height: 64px;
  --max-width: 1280px;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-header: 300;
  --z-overlay: 400;
  --z-modal: 500;
  --z-toast: 600;
  --z-skip-link: 9999;

  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 300ms ease;
}

/* ====== DARK MODE ====== */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --color-surface: #1E293B;
    --color-surface-alt: #334155;
    --color-background: #0F172A;
    --bg-rgb: 15, 23, 42;
    --color-text: #F1F5F9;
    --color-text-muted: #94A3B8;
    --color-border: #334155;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 8px 28px rgba(0, 0, 0, 0.6);
  }
}

[data-theme="dark"] {
  --color-surface: #1E293B;
  --color-surface-alt: #334155;
  --color-background: #0F172A;
  --bg-rgb: 15, 23, 42;
  --color-text: #F1F5F9;
  --color-text-muted: #94A3B8;
  --color-border: #334155;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 8px 28px rgba(0, 0, 0, 0.6);
}

[data-theme="dark"] {
  color-scheme: dark;
}

[data-theme="light"] {
  color-scheme: light;
}

/* ====== LAYOUT ====== */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.page-content {
  padding-top: calc(var(--header-height) + 2rem);
  padding-bottom: 5rem;
  min-height: 100vh;
}

.two-col-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2.5rem;
  align-items: start;
}

.section {
  margin-bottom: 4rem;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.section-title {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--color-text);
}

.section-title .accent {
  color: var(--color-primary);
}

.section-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Bento grid */
.bento-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: auto;
}

.bento-grid .bento-large {
  grid-column: span 2;
}

/* Horizontal scroll row */
.scroll-row {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 0.75rem;
  scrollbar-width: thin;
  scrollbar-color: var(--color-border) transparent;
  -webkit-overflow-scrolling: touch;
}

.scroll-row::-webkit-scrollbar {
  height: 4px;
}

.scroll-row::-webkit-scrollbar-track {
  background: transparent;
}

.scroll-row::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 2px;
}

.scroll-row > * {
  flex: 0 0 280px;
}

/* Card grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.card-grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

/* Sidebar */
.sidebar {
  position: sticky;
  top: calc(var(--header-height) + 1.5rem);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* ====== HEADER & NAV ====== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-height);
  background-color: rgba(248, 250, 252, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  transition: background-color var(--transition-base), border-color var(--transition-base);
}

[data-theme="dark"] .site-header {
  background-color: rgba(15, 23, 42, 0.88);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .site-header {
    background-color: rgba(15, 23, 42, 0.88);
  }
}

.header-inner {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 2rem;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-text);
  text-decoration: none;
  flex-shrink: 0;
  margin-right: 0.5rem;
  line-height: 1;
}

.site-logo:hover {
  color: var(--color-primary);
}

.site-logo svg {
  width: 32px;
  height: 32px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-muted);
  transition: color var(--transition-fast), background-color var(--transition-fast);
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--color-text);
  background-color: var(--color-surface-alt);
}

/* Header search */
.header-search {
  position: relative;
  flex-shrink: 0;
}

.header-search-input {
  width: 160px;
  padding: 0.5rem 0.875rem 0.5rem 2.25rem;
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  color: var(--color-text);
  transition: width var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}

.header-search-input:focus {
  outline: none;
  width: 240px;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.header-search-input::placeholder {
  color: var(--color-text-muted);
}

.header-search-icon {
  position: absolute;
  left: 0.625rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
  pointer-events: none;
  width: 16px;
  height: 16px;
}

/* Header actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  transition: color var(--transition-fast), background-color var(--transition-fast);
}

.icon-btn:hover {
  color: var(--color-text);
  background-color: var(--color-surface-alt);
}

.icon-btn svg {
  width: 20px;
  height: 20px;
}

/* Mobile hamburger */
.hamburger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  padding: 8px;
}

.hamburger-btn span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-text);
  border-radius: 1px;
  transition: transform var(--transition-base), opacity var(--transition-base);
}

/* Mobile nav overlay */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: var(--color-background);
  padding: calc(var(--header-height) + 1rem) 1.5rem 2rem;
  flex-direction: column;
  gap: 0.5rem;
  overflow-y: auto;
}

.mobile-nav.is-open {
  display: flex;
}

.mobile-nav a {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-text);
}

.mobile-nav a:hover {
  background: var(--color-surface-alt);
}

/* ====== CARDS ====== */
.listing-card {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  text-decoration: none;
  color: inherit;
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.listing-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-primary);
  color: inherit;
  text-decoration: none;
}

.listing-card--large .card-name {
  font-size: 1.125rem;
}

.card-header {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  margin-bottom: 0.75rem;
}

.card-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--color-surface-alt);
}

.card-icon-placeholder {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-hover) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.card-meta {
  flex: 1;
  min-width: 0;
}

.card-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.125rem;
}

.card-publisher {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-description {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 1rem;
  flex: 1;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: auto;
}

.card-downloads {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Blog card */
.blog-card {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.blog-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: inherit;
  text-decoration: none;
}

.blog-card__image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--color-surface-alt);
}

.blog-card__image-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--color-surface-alt) 0%, var(--color-border) 100%);
}

.blog-card__body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-card__tags {
  display: flex;
  gap: 0.375rem;
  flex-wrap: wrap;
  margin-bottom: 0.625rem;
}

.blog-card__title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.4;
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card__excerpt {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
  margin-bottom: 1rem;
}

.blog-card__footer {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-top: auto;
}

.author-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--color-surface-alt);
  flex-shrink: 0;
}

.author-avatar-placeholder {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-hover));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 600;
  flex-shrink: 0;
}

.blog-card__byline {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.blog-card__byline strong {
  color: var(--color-text);
  font-weight: 500;
}

/* Skeleton loader */
.skeleton {
  border-radius: var(--radius-sm);
  background: linear-gradient(
    90deg,
    var(--color-surface-alt) 25%,
    var(--color-border) 50%,
    var(--color-surface-alt) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.6s ease-in-out infinite;
}

@keyframes skeleton-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ====== LISTING DETAIL ====== */
.listing-hero {
  display: flex;
  align-items: flex-start;
  gap: 1.75rem;
  padding: 2rem 0 2.5rem;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 2rem;
}

.listing-icon {
  width: 96px;
  height: 96px;
  border-radius: var(--radius-lg);
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: var(--shadow-md);
  background: var(--color-surface-alt);
}

.listing-icon-placeholder {
  width: 96px;
  height: 96px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-hover));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  flex-shrink: 0;
  box-shadow: var(--shadow-md);
}

.listing-hero-info {
  flex: 1;
  min-width: 0;
}

.listing-name {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  margin-bottom: 0.375rem;
}

.listing-publisher-link {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
}

.listing-publisher-link a {
  color: var(--color-primary);
  font-weight: 500;
}

.listing-meta-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.listing-cta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* CTA button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9375rem;
  transition: all var(--transition-base);
  cursor: pointer;
  text-decoration: none;
  border: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover {
  background: var(--color-primary-hover);
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.45);
  transform: translateY(-1px);
  color: #fff;
}

.btn-success {
  background: var(--color-success);
  color: #fff;
  font-size: 1.0625rem;
  padding: 0.75rem 1.75rem;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
}

.btn-success:hover {
  background: #059669;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.45);
  transform: translateY(-1px);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}

.btn-ghost:hover {
  background: var(--color-surface-alt);
  color: var(--color-text);
  border-color: var(--color-text-muted);
}

.btn-sm {
  padding: 0.375rem 0.875rem;
  font-size: 0.875rem;
}

.download-meta {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* Tabs */
.tabs {
  border-bottom: 2px solid var(--color-border);
  display: flex;
  gap: 0;
  margin-bottom: 2rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar { display: none; }

.tab-btn {
  padding: 0.75rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--transition-fast), border-color var(--transition-fast);
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}

.tab-btn:hover {
  color: var(--color-text);
}

.tab-btn.is-active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

.tab-panel {
  display: none;
}

.tab-panel.is-active {
  display: block;
}

/* Quick info sidebar card */
.info-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.info-card-title {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.875rem;
}

.info-row:last-child {
  border-bottom: none;
}

.info-label {
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.info-value {
  color: var(--color-text);
  font-weight: 500;
  text-align: right;
}

/* Screenshots gallery */
.screenshots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
}

.screenshot-thumb {
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 16 / 10;
  cursor: pointer;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  border: 1px solid var(--color-border);
}

.screenshot-thumb:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-md);
}

.screenshot-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Reviews */
.review-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.review-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.review-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.review-author {
  font-weight: 600;
  font-size: 0.9375rem;
}

.review-date {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-left: auto;
}

.review-body {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* Version history */
.version-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.version-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 1rem 1.5rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--color-border);
}

.version-item:last-child {
  border-bottom: none;
}

.version-number {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-primary);
}

.version-date {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.version-changelog {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* ====== BLOG ====== */
.blog-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 3rem;
  align-items: start;
}

.article-body {
  max-width: 720px;
}

.article-body h2 {
  margin: 2rem 0 0.75rem;
}

.article-body h3 {
  margin: 1.5rem 0 0.5rem;
}

.article-body p {
  margin-bottom: 1.25rem;
  color: var(--color-text);
  line-height: 1.8;
  font-size: 1.0625rem;
}

.article-body ul,
.article-body ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.article-body ul {
  list-style: disc;
}

.article-body ol {
  list-style: decimal;
}

.article-body li {
  margin-bottom: 0.5rem;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--color-text);
}

.article-body blockquote {
  border-left: 4px solid var(--color-primary);
  padding: 0.75rem 1.25rem;
  margin: 1.5rem 0;
  background: var(--color-surface-alt);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--color-text-muted);
}

.article-body pre {
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.6;
}

.article-body code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--color-surface-alt);
  padding: 0.15em 0.4em;
  border-radius: 3px;
  color: var(--color-primary);
}

.article-body pre code {
  background: none;
  padding: 0;
  color: var(--color-text);
}

.article-body figure {
  margin: 2rem 0;
}

.article-body figure img {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  width: 100%;
}

.article-body figcaption {
  text-align: center;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-top: 0.625rem;
  font-style: italic;
}

.article-body hr {
  border: none;
  border-top: 2px solid var(--color-border);
  margin: 2.5rem 0;
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.9375rem;
}

.article-body th,
.article-body td {
  padding: 0.625rem 0.875rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.article-body th {
  font-weight: 600;
  background: var(--color-surface-alt);
}

.article-warning {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.article-warning__icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

/* Featured image */
.featured-image {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin-bottom: 2rem;
  box-shadow: var(--shadow-md);
}

/* Author card */
.author-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--color-surface-alt);
  border-radius: var(--radius-md);
  margin: 2.5rem 0;
}

.author-card__avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.author-card__name {
  font-weight: 600;
}

.author-card__bio {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

/* Blog sidebar */
.blog-sidebar {
  position: sticky;
  top: calc(var(--header-height) + 1.5rem);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sidebar-widget {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}

.widget-title {
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--color-border);
}

/* Tag cloud */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Post meta */
.post-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-bottom: 2rem;
}

.post-meta__item {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

/* ====== FORMS ====== */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 0.375rem;
}

.form-control {
  display: block;
  width: 100%;
  padding: 0.625rem 0.875rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  font-size: 0.9375rem;
}

.form-control:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.form-control::placeholder {
  color: var(--color-text-muted);
}

textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

.form-hint {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-top: 0.25rem;
}

.form-error {
  font-size: 0.8125rem;
  color: var(--color-danger);
  margin-top: 0.25rem;
}

/* Search page */
.search-hero {
  padding: 3rem 0 2.5rem;
  text-align: center;
}

.search-bar {
  position: relative;
  max-width: 640px;
  margin: 1.5rem auto 0;
}

.search-input {
  width: 100%;
  padding: 0.875rem 1rem 0.875rem 3rem;
  font-size: 1.0625rem;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  color: var(--color-text);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.search-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
  pointer-events: none;
}

/* Filter bar */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 1rem 0;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-border);
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.875rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1.5px solid var(--color-border);
  color: var(--color-text-muted);
  background: var(--color-surface);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.filter-pill:hover,
.filter-pill.is-active {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: rgba(99, 102, 241, 0.08);
}

.filter-sort {
  margin-left: auto;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
}

.empty-state__icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.empty-state__title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.empty-state__body {
  color: var(--color-text-muted);
  max-width: 400px;
  margin: 0 auto 1.5rem;
}

/* ====== PAGINATION ====== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
  text-decoration: none;
}

.pagination a {
  color: var(--color-text-muted);
  border-color: var(--color-border);
  background: var(--color-surface);
}

.pagination a:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: rgba(99, 102, 241, 0.05);
}

.pagination .current {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
  font-weight: 600;
}

.pagination .ellipsis {
  color: var(--color-text-muted);
  border-color: transparent;
  background: transparent;
}

.pagination .disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* ====== DOWNLOAD INTERSTITIAL ====== */
.download-page {
  min-height: calc(100vh - var(--header-height));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.download-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 3rem 2.5rem;
  max-width: 520px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.download-card__icon {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-lg);
  margin: 0 auto 1.5rem;
  object-fit: cover;
}

.download-card__title {
  font-size: 1.375rem;
  font-weight: 700;
  margin-bottom: 0.375rem;
}

.download-card__version {
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  margin-bottom: 0.25rem;
}

.download-card__size {
  color: var(--color-text-muted);
  font-size: 0.875rem;
  margin-bottom: 2rem;
}

.download-message {
  font-size: 1rem;
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.download-countdown {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-success);
  margin-bottom: 1.5rem;
}

/* Progress bar */
.download-progress {
  width: 100%;
  height: 6px;
  background: var(--color-surface-alt);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.download-progress__bar {
  height: 100%;
  background: linear-gradient(90deg, var(--color-success), #34D399);
  border-radius: 3px;
  animation: progress-fill 5s linear forwards;
}

@keyframes progress-fill {
  from { width: 0%; }
  to   { width: 100%; }
}

.download-fallback {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-top: 1rem;
}

/* Ad placeholder */
.ad-placeholder {
  background: var(--color-surface-alt);
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.8125rem;
  margin: 1.5rem 0;
}

/* ====== FOOTER ====== */
.site-footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: 3.5rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.footer-brand .site-logo {
  margin-bottom: 0.875rem;
}

.footer-brand p {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: 0;
}

.footer-heading {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--color-primary);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  flex-wrap: wrap;
}

.footer-credit a {
  color: var(--color-text-muted);
}

.footer-credit a:hover {
  color: var(--color-primary);
}

/* ====== UTILITIES ====== */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.truncate {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.text-muted { color: var(--color-text-muted); }
.text-primary { color: var(--color-primary); }
.text-success { color: var(--color-success); }
.text-warning { color: var(--color-warning); }
.text-danger { color: var(--color-danger); }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.8125rem; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-8 { margin-bottom: 2rem; }

/* Platform pills */
.platform-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.platform-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.625rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.platform-pill--windows  { background: #EFF6FF; color: #1D4ED8; }
.platform-pill--macos    { background: #F1F5F9; color: #475569; }
.platform-pill--linux    { background: #FFF7ED; color: #C2410C; }
.platform-pill--android  { background: #ECFDF5; color: #047857; }
.platform-pill--ios      { background: #F0F9FF; color: #0369A1; }
.platform-pill--web      { background: #F5F3FF; color: #6D28D9; }
.platform-pill--other    { background: var(--color-surface-alt); color: var(--color-text-muted); }

[data-theme="dark"] .platform-pill--windows  { background: #1E3A5F; color: #93C5FD; }
[data-theme="dark"] .platform-pill--macos    { background: #2D3A4A; color: #94A3B8; }
[data-theme="dark"] .platform-pill--linux    { background: #431407; color: #FDBA74; }
[data-theme="dark"] .platform-pill--android  { background: #064E3B; color: #6EE7B7; }
[data-theme="dark"] .platform-pill--ios      { background: #0C4A6E; color: #7DD3FC; }
[data-theme="dark"] .platform-pill--web      { background: #2E1065; color: #C4B5FD; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .platform-pill--windows  { background: #1E3A5F; color: #93C5FD; }
  :root:not([data-theme="light"]) .platform-pill--macos    { background: #2D3A4A; color: #94A3B8; }
  :root:not([data-theme="light"]) .platform-pill--linux    { background: #431407; color: #FDBA74; }
  :root:not([data-theme="light"]) .platform-pill--android  { background: #064E3B; color: #6EE7B7; }
  :root:not([data-theme="light"]) .platform-pill--ios      { background: #0C4A6E; color: #7DD3FC; }
  :root:not([data-theme="light"]) .platform-pill--web      { background: #2E1065; color: #C4B5FD; }
}

/* Tag pill */
.tag-pill {
  display: inline-flex;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 500;
  background: var(--color-surface-alt);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.tag-pill:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: rgba(99, 102, 241, 0.08);
}

/* Verified badge */
.verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(16, 185, 129, 0.1);
  color: var(--color-success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Star rating */
.star-rating {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0;
}

.star-rating__stars {
  position: relative;
  display: inline-block;
  font-size: 1rem;
  line-height: 1;
  letter-spacing: 2px;
  color: var(--color-border);
}

.star-rating__stars::before {
  content: "★★★★★";
}

.star-rating__fill {
  position: absolute;
  top: 0;
  left: 0;
  overflow: hidden;
  white-space: nowrap;
  color: var(--color-warning);
}

.star-rating__fill::before {
  content: "★★★★★";
}

.star-rating__score {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text);
}

.star-rating__count {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

/* Breadcrumbs */
.breadcrumbs,
.breadcrumb {
  margin-bottom: 1.5rem;
}

.breadcrumbs__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  list-style: none;
  padding: 0;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.breadcrumbs__item {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.breadcrumbs__item + .breadcrumbs__item::before {
  content: '/';
  margin-right: 0.25rem;
  color: var(--color-text-muted);
  opacity: 0.5;
}

.breadcrumbs__item a {
  color: var(--color-text-muted);
  text-decoration: none;
}

.breadcrumbs__item a:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

.breadcrumbs__item [aria-current="page"] {
  color: var(--color-text);
  font-weight: 500;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}

.lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox__img {
  max-width: 92vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.8);
}

.lightbox__close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  cursor: pointer;
  transition: background var(--transition-fast);
  backdrop-filter: blur(4px);
}

.lightbox__close:hover {
  background: rgba(255, 255, 255, 0.25);
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition-fast);
  backdrop-filter: blur(4px);
}

.lightbox__nav:hover {
  background: rgba(255, 255, 255, 0.25);
}

.lightbox__prev { left: 1.25rem; }
.lightbox__next { right: 1.25rem; }

/* Hero section */
.hero {
  text-align: center;
  padding: 5rem 1rem 4rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% -20%, rgba(99, 102, 241, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.35rem 0.875rem;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.1);
  color: var(--color-primary);
  font-size: 0.875rem;
  font-weight: 600;
  border: 1px solid rgba(99, 102, 241, 0.2);
  margin-bottom: 1.25rem;
}

.hero__title {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
  color: var(--color-text);
}

.hero__title .gradient-text {
  background: linear-gradient(135deg, var(--color-primary), #8B5CF6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--color-text-muted);
  max-width: 560px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

/* Publisher header */
.publisher-header {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 2rem;
}

.publisher-logo {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-md);
  object-fit: cover;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.publisher-name {
  font-size: 1.625rem;
  font-weight: 700;
  margin-bottom: 0.375rem;
}

.publisher-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
}

/* ====== RESPONSIVE ====== */

/* Tablet — ≤ 1024px */
@media (max-width: 1024px) {
  .two-col-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    order: -1;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .bento-grid .bento-large {
    grid-column: span 2;
  }

  .blog-layout {
    grid-template-columns: 1fr;
  }

  .blog-sidebar {
    position: static;
    order: -1;
  }

  .card-grid--3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile — ≤ 768px */
@media (max-width: 768px) {
  :root {
    --header-height: 56px;
  }

  .site-nav {
    display: none;
  }

  .header-search-input {
    width: 140px;
  }

  .header-search-input:focus {
    width: 180px;
  }

  .hamburger-btn {
    display: flex;
  }

  .container {
    padding: 0 1rem;
  }

  .hero {
    padding: 3.5rem 1rem 3rem;
  }

  .hero__title {
    font-size: 1.875rem;
  }

  .bento-grid {
    grid-template-columns: 1fr;
  }

  .bento-grid .bento-large {
    grid-column: span 1;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .card-grid--3 {
    grid-template-columns: 1fr;
  }

  .listing-hero {
    flex-direction: column;
    gap: 1.25rem;
  }

  .listing-icon,
  .listing-icon-placeholder {
    width: 72px;
    height: 72px;
  }

  .tabs {
    gap: 0;
  }

  .tab-btn {
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .version-item {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .download-card {
    padding: 2rem 1.5rem;
  }

  .filter-sort {
    margin-left: 0;
    width: 100%;
  }
}

/* Very small — ≤ 480px */
@media (max-width: 480px) {
  .listing-cta {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-success {
    text-align: center;
    justify-content: center;
  }

  .scroll-row > * {
    flex: 0 0 240px;
  }
}

@view-transition {
  navigation: auto;
}

::view-transition-old(root) {
  animation: fade-out 150ms ease-out;
}

::view-transition-new(root) {
  animation: fade-in 200ms ease-in;
}

@keyframes fade-out {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

code,
pre,
.checksum,
.version-number {
  font-family: var(--font-mono);
}

.site-title,
.listing-card__title,
.category-title,
.hero__title,
.section-title,
.download-card__title,
.card-name,
.publisher-name,
.blog-card__title {
  font-family: var(--font-display);
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  padding: 0.75rem 1.5rem;
  background: var(--color-primary);
  color: #fff;
  font-weight: 600;
  border-radius: 0 0 8px 8px;
  z-index: var(--z-skip-link);
  transition: top 200ms ease;
}

.skip-link:focus {
  top: 0;
}

a,
button,
input,
select,
textarea,
[role="button"],
[role="link"],
[role="tab"] {
  min-height: 44px;
  min-width: 44px;
}

p a,
li a,
td a,
.prose a {
  min-height: unset;
  min-width: unset;
}

.nav-links a + a,
.tag-list a + a,
.pagination a + a {
  margin-left: 4px;
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.listing-card__title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.listing-description,
.blog-content,
.review-body,
.comment-body {
  overflow-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
}

.download-card__checksum code {
  display: block;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: thin;
  max-width: 100%;
}

.author-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 200px;
}

.author-name {
  display: inline-block;
  vertical-align: bottom;
}

img,
video,
iframe,
embed,
object {
  max-width: 100%;
  height: auto;
}

.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.listing-grid,
.blog-grid,
.category-grid {
  min-width: 0;
}

.listing-grid > *,
.blog-grid > *,
.category-grid > * {
  min-width: 0;
  overflow: hidden;
}

pre {
  overflow-x: auto;
  max-width: 100%;
  scrollbar-width: thin;
}

.badge--info { background: #dbeafe; color: #1e40af; }
.badge--success { background: #dcfce7; color: #166534; }
.badge--warning { background: #fef3c7; color: #92400e; }
.badge--danger { background: #fee2e2; color: #991b1b; }
.badge--neutral { background: #f1f5f9; color: #334155; }

.listing-grid:empty::after,
.blog-grid:empty::after,
.search-results:empty::after {
  content: 'No items found.';
  display: block;
  text-align: center;
  padding: 3rem 1rem;
  color: var(--color-text-muted);
  font-size: 1.1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  background: rgba(var(--bg-rgb), 0.85);
  border-bottom: 0.5px solid var(--color-border);
}

.page-content {
  padding-top: 2rem;
}

[id] {
  scroll-margin-top: calc(var(--header-height, 64px) + 1rem);
}

.listing-card {
  view-transition-name: var(--vt-name);
}

.download-card {
  view-transition-name: download-card;
}

.listing-card:nth-child(n+10) {
  content-visibility: auto;
  contain-intrinsic-size: auto 120px;
}

.listing-grid {
  container-type: inline-size;
}

@container (max-width: 500px) {
  .listing-card {
    flex-direction: column;
  }

  .listing-card .card-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .listing-card .card-icon,
  .listing-card .card-icon-placeholder {
    width: 48px;
    height: 48px;
  }
}

@container (min-width: 501px) {
  .listing-card .card-header {
    flex-direction: row;
    align-items: center;
    gap: 1rem;
  }
}

@supports (animation-timeline: view()) {
  .listing-card,
  .blog-card,
  .category-card {
    animation: scroll-fade-in linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 30%;
  }

  @keyframes scroll-fade-in {
    from {
      opacity: 0;
      translate: 0 20px;
    }
    to {
      opacity: 1;
      translate: 0 0;
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation: none;
  }

  .listing-card,
  .blog-card,
  .category-card {
    animation: none;
    opacity: 1;
  }
}

/* Editor.js rendered content */
.editorjs-content {
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--color-text);
  max-width: 720px;
}

.editorjs-content > * + * {
  margin-top: 1.25rem;
}

.editorjs-header {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-top: 2rem;
  scroll-margin-top: calc(var(--header-height, 64px) + 1rem);
}

.editorjs-paragraph {
  overflow-wrap: break-word;
}

.editorjs-list {
  padding-left: 1.5rem;
}

.editorjs-list li + li {
  margin-top: 0.5rem;
}

.editorjs-image {
  margin: 2rem 0;
}

.editorjs-image img {
  border-radius: 8px;
  width: 100%;
}

.editorjs-image--bordered img {
  border: 1px solid var(--color-border);
}

.editorjs-image--stretched {
  margin-left: -2rem;
  margin-right: -2rem;
}

.editorjs-image figcaption {
  text-align: center;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-top: 0.5rem;
}

.editorjs-code {
  background: var(--color-code-bg, #1e1e2e);
  color: var(--color-code-text, #cdd6f4);
  padding: 1.25rem;
  border-radius: 8px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.6;
}

.editorjs-quote {
  border-left: 4px solid var(--color-primary);
  padding: 1rem 1.5rem;
  font-style: italic;
  background: var(--color-surface);
  border-radius: 0 8px 8px 0;
}

.editorjs-quote cite {
  display: block;
  margin-top: 0.5rem;
  font-style: normal;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.editorjs-warning {
  background: var(--color-warning-bg, #fef3c7);
  border: 1px solid var(--color-warning-border, #f59e0b);
  border-radius: 8px;
  padding: 1rem 1.25rem;
}

.editorjs-warning strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--color-warning-text, #92400e);
}

.editorjs-delimiter {
  border: none;
  text-align: center;
  margin: 2.5rem 0;
}

.editorjs-delimiter::before {
  content: '• • •';
  font-size: 1.5rem;
  letter-spacing: 1em;
  color: var(--color-text-muted);
}

.editorjs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.editorjs-table th,
.editorjs-table td {
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--color-border);
  text-align: left;
}

.editorjs-table th {
  font-weight: 600;
  background: var(--color-surface);
}

.editorjs-embed {
  margin: 2rem 0;
}

.editorjs-embed iframe {
  max-width: 100%;
  border-radius: 8px;
  border: 1px solid var(--color-border);
}

.editorjs-embed__caption {
  margin-top: 0.75rem;
  color: var(--color-text-muted);
  font-size: 0.875rem;
  text-align: center;
}

@media (max-width: 640px) {
  .editorjs-image--stretched {
    margin-left: 0;
    margin-right: 0;
  }
}
