/* =========================================================
   Fetch — design tokens
   ========================================================= */
:root {
	--fc-primary: #4f46e5;
	--fc-primary-dark: #4338ca;
	--fc-primary-soft: #eef2ff;
	--fc-download: #16a34a;
	--fc-download-dark: #15803d;
	--fc-bg: #f8f9fb;
	--fc-surface: #ffffff;
	--fc-text: #16181d;
	--fc-text-muted: #6b7280;
	--fc-border: #e8eaee;
	--fc-star: #f59e0b;
	--fc-radius-sm: 8px;
	--fc-radius: 12px;
	--fc-radius-lg: 18px;
	--fc-shadow: 0 1px 2px rgba(16,24,40,.04), 0 1px 3px rgba(16,24,40,.06);
	--fc-shadow-md: 0 4px 10px rgba(16,24,40,.06);
	--fc-shadow-lg: 0 12px 28px rgba(16,24,40,.10);
	--fc-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--fc-space-1: 4px;
	--fc-space-2: 8px;
	--fc-space-3: 12px;
	--fc-space-4: 16px;
	--fc-space-5: 24px;
	--fc-space-6: 32px;
	--fc-space-7: 48px;
	--fc-space-8: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: var(--fc-font);
	background: var(--fc-bg);
	color: var(--fc-text);
	font-size: 15px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--fc-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-weight: 800; letter-spacing: -0.015em; line-height: 1.22; margin: 0 0 .5em; color: var(--fc-text); }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }
table { border-collapse: collapse; width: 100%; }

.fetch-container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* =========================================================
   Header
   ========================================================= */
.fetch-header { background: var(--fc-surface); border-bottom: 1px solid var(--fc-border); position: sticky; top: 0; z-index: 100; }
.fetch-header-row { display: flex; align-items: center; gap: 32px; padding: 16px 24px; }

.fetch-logo { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }
.fetch-logo-mark {
	width: 30px; height: 30px; border-radius: 8px; background: var(--fc-primary); color: #fff;
	display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px; flex-shrink: 0;
}
.fetch-logo-text { font-size: 18px; font-weight: 800; color: var(--fc-text); }

.fetch-primary-nav { flex-shrink: 0; }
#fetch-primary-menu { display: flex; gap: 26px; }
#fetch-primary-menu a { color: var(--fc-text); font-weight: 600; font-size: 14px; }
#fetch-primary-menu a:hover { color: var(--fc-primary); text-decoration: none; }

.fetch-search-wrap { flex: 1; max-width: 380px; margin-left: auto; }
.fetch-search-form { position: relative; display: flex; align-items: center; }
.fetch-search-icon { position: absolute; left: 14px; color: var(--fc-text-muted); pointer-events: none; }
.fetch-search-input {
	width: 100%; padding: 9px 14px 9px 40px; border: 1px solid var(--fc-border);
	border-radius: 999px; background: var(--fc-bg); font-size: 14px; color: var(--fc-text);
}
.fetch-search-input:focus { outline: none; border-color: var(--fc-primary); background: var(--fc-surface); box-shadow: 0 0 0 3px var(--fc-primary-soft); }
.fetch-search-suggestions {
	position: absolute; top: calc(100% + 8px); left: 0; right: 0; background: var(--fc-surface);
	border: 1px solid var(--fc-border); border-radius: var(--fc-radius); box-shadow: var(--fc-shadow-lg); z-index: 50; overflow: hidden;
}
.fetch-search-suggestions a { display: flex; align-items: center; gap: 10px; padding: 9px 14px; color: var(--fc-text); font-size: 13.5px; }
.fetch-search-suggestions a:hover { background: var(--fc-bg); text-decoration: none; }
.fetch-search-suggestions img { width: 26px; height: 26px; border-radius: 6px; object-fit: cover; }

.fetch-nav-toggle { display: none; background: none; border: none; flex-direction: column; gap: 4px; padding: 6px; margin-left: auto; }
.fetch-nav-toggle span { width: 20px; height: 2px; background: var(--fc-text); display: block; border-radius: 2px; }

.fetch-ad { text-align: center; padding: 8px 0; background: var(--fc-surface); border-bottom: 1px solid var(--fc-border); }

/* =========================================================
   Breadcrumbs
   ========================================================= */
.fetch-breadcrumbs { padding: 18px 0 0; font-size: 13px; color: var(--fc-text-muted); }
.fetch-breadcrumbs a { color: var(--fc-text-muted); }
.fetch-breadcrumbs a:hover { color: var(--fc-primary); }
.fetch-crumb-sep { margin: 0 7px; opacity: .5; }

/* =========================================================
   Homepage hero
   ========================================================= */
.fetch-hero { text-align: center; padding: 72px 24px 48px; max-width: 720px; margin: 0 auto; }
.fetch-hero h1 { font-size: clamp(30px, 4.2vw, 44px); margin-bottom: .4em; }
.fetch-hero p { color: var(--fc-text-muted); font-size: 16.5px; margin-bottom: 30px; }
.fetch-hero-search { max-width: 520px; margin: 0 auto; }
.fetch-hero-search .fetch-search-input { padding: 15px 20px 15px 46px; font-size: 15px; box-shadow: var(--fc-shadow-md); border-radius: 14px; }
.fetch-hero-search .fetch-search-icon { left: 18px; }

/* =========================================================
   Category chips (homepage)
   ========================================================= */
.fetch-chip-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.fetch-chip {
	display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px;
	background: var(--fc-surface); border: 1px solid var(--fc-border); color: var(--fc-text); font-size: 13.5px; font-weight: 600;
	transition: border-color .15s, color .15s, background .15s;
}
.fetch-chip:hover { border-color: var(--fc-primary); color: var(--fc-primary); background: var(--fc-primary-soft); text-decoration: none; }
.fetch-chip-count { font-size: 11.5px; color: var(--fc-text-muted); background: var(--fc-bg); border-radius: 999px; padding: 1px 7px; }
.fetch-chip:hover .fetch-chip-count { color: var(--fc-primary); background: #fff; }

/* =========================================================
   Sections
   ========================================================= */
.fetch-section { max-width: 1180px; margin: 0 auto; padding: 40px 24px; }
.fetch-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.fetch-section-head h2 { margin-bottom: 0; font-size: 21px; }
.fetch-section-sub { color: var(--fc-text-muted); font-size: 13.5px; margin: 0; }
.fetch-see-all { font-size: 13.5px; font-weight: 700; white-space: nowrap; }
.fetch-empty { color: var(--fc-text-muted); font-style: italic; grid-column: 1 / -1; }

/* =========================================================
   App grid & cards — the one repeating pattern across the site
   ========================================================= */
.fetch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }

.fetch-card {
	display: flex; gap: 13px; background: var(--fc-surface); border: 1px solid var(--fc-border);
	border-radius: var(--fc-radius); padding: 16px; color: var(--fc-text);
	transition: box-shadow .15s ease, transform .15s ease, border-color .15s ease;
}
.fetch-card:hover { box-shadow: var(--fc-shadow-lg); transform: translateY(-2px); border-color: transparent; text-decoration: none; }
.fetch-card-icon img, .fetch-icon-fallback { width: 54px; height: 54px; border-radius: 13px; object-fit: cover; flex-shrink: 0; }
.fetch-icon-fallback {
	display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--fc-primary), var(--fc-primary-dark));
	color: #fff; font-weight: 800; font-size: 21px;
}
.fetch-card-body { min-width: 0; }
.fetch-card-title { font-size: 14.5px; font-weight: 700; margin: 0 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fetch-card-cat { font-size: 11.5px; color: var(--fc-text-muted); display: block; margin-bottom: 5px; }
.fetch-card-rating { display: flex; align-items: center; gap: 5px; margin-bottom: 4px; }
.fetch-card-meta { font-size: 11.5px; color: var(--fc-text-muted); }

/* Star ratings */
.fetch-stars { display: inline-flex; gap: 1px; }
.fs-star { width: 14px; height: 14px; display: inline-block; position: relative; }
.fs-star::before { content: "★"; color: var(--fc-star); font-size: 14px; line-height: 1; position: absolute; inset: 0; }
.fs-empty::before { color: var(--fc-border); }
.fs-half::before { background: linear-gradient(90deg, var(--fc-star) 50%, var(--fc-border) 50%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.fs-num { font-size: 12px; font-weight: 700; color: var(--fc-text); }
.fs-count { font-size: 12px; color: var(--fc-text-muted); }
.fetch-dot { color: var(--fc-text-muted); }
.fetch-downloads-count { font-size: 13px; color: var(--fc-text-muted); }

/* =========================================================
   Archive / taxonomy / search header
   ========================================================= */
.fetch-archive-head { max-width: 1180px; margin: 0 auto; padding: 32px 24px 0; }
.fetch-archive-desc { color: var(--fc-text-muted); }
.fetch-sort-bar { display: flex; align-items: center; gap: 8px; margin: 18px 0; flex-wrap: wrap; }
.fetch-sort-label { font-size: 13px; color: var(--fc-text-muted); margin-right: 4px; }
.fetch-sort-link { font-size: 13px; font-weight: 600; padding: 7px 14px; border-radius: 999px; color: var(--fc-text-muted); border: 1px solid var(--fc-border); background: var(--fc-surface); }
.fetch-sort-link.active, .fetch-sort-link:hover { color: #fff; background: var(--fc-primary); border-color: var(--fc-primary); text-decoration: none; }

.fetch-content-area { max-width: 1180px; margin: 0 auto; padding: 24px 24px 64px; display: grid; grid-template-columns: 1fr 300px; gap: 32px; align-items: start; }
.fetch-main-col { min-width: 0; }

.fetch-pagination { display: flex; gap: 6px; margin-top: 28px; flex-wrap: wrap; }
.fetch-pagination .page-numbers { padding: 9px 14px; border: 1px solid var(--fc-border); border-radius: var(--fc-radius-sm); background: var(--fc-surface); font-size: 13px; font-weight: 600; }
.fetch-pagination .page-numbers.current { background: var(--fc-primary); color: #fff; border-color: var(--fc-primary); }
.fetch-pagination a.page-numbers:hover { border-color: var(--fc-primary); color: var(--fc-primary); text-decoration: none; }

/* =========================================================
   Single App Page
   ========================================================= */
.fetch-app-header {
	display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center;
	background: var(--fc-surface); border: 1px solid var(--fc-border); border-radius: var(--fc-radius-lg);
	padding: 28px; margin: 24px auto 0; max-width: 1180px;
}
.fetch-app-icon img, .fetch-icon-lg { width: 96px; height: 96px; border-radius: 22px; object-fit: cover; }
.fetch-icon-lg { display: flex; align-items: center; justify-content: center; font-size: 36px; }
.fetch-app-headline h1 { font-size: 27px; margin-bottom: 10px; }
.fetch-app-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.fetch-badge { font-size: 12px; font-weight: 700; padding: 5px 11px; border-radius: 999px; background: var(--fc-primary-soft); color: var(--fc-primary); }
.fetch-badge-platform { background: #ecfdf3; color: var(--fc-download-dark); }
.fetch-badge-license { background: var(--fc-bg); color: var(--fc-text-muted); }
.fetch-app-rating-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13.5px; }

.fetch-app-download-block { text-align: center; min-width: 210px; }
.fetch-download-btn {
	background: var(--fc-download); color: #fff; border: none; font-weight: 800; font-size: 16px;
	padding: 15px 30px; border-radius: 12px; width: 100%; transition: background .15s, transform .15s, box-shadow .15s;
	box-shadow: var(--fc-shadow-md);
}
.fetch-download-btn:hover { background: var(--fc-download-dark); transform: translateY(-1px); box-shadow: var(--fc-shadow-lg); }
.fetch-download-sub { margin-top: 9px; font-size: 12px; color: var(--fc-text-muted); display: flex; gap: 10px; justify-content: center; }
.fetch-old-versions-link { display: block; margin-top: 9px; font-size: 12px; }

.fetch-app-body-grid { max-width: 1180px; margin: 24px auto 64px; padding: 0 24px; display: grid; grid-template-columns: 1fr 300px; gap: 32px; align-items: start; }

.fetch-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--fc-border); margin-bottom: 24px; }
.fetch-tab { background: none; border: none; padding: 13px 18px; font-weight: 700; font-size: 14px; color: var(--fc-text-muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.fetch-tab:hover { color: var(--fc-text); }
.fetch-tab.active { color: var(--fc-primary); border-bottom-color: var(--fc-primary); }
.fetch-tab-panel { display: none; }
.fetch-tab-panel.active { display: block; }

.fetch-screenshots { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 10px; margin-bottom: 24px; }
.fetch-screenshot-link { flex-shrink: 0; border-radius: var(--fc-radius); overflow: hidden; border: 1px solid var(--fc-border); }
.fetch-screenshot-link img { width: 280px; height: 168px; object-fit: cover; }

.fetch-app-description { background: var(--fc-surface); border: 1px solid var(--fc-border); border-radius: var(--fc-radius-lg); padding: 26px; line-height: 1.75; }
.fetch-app-description p:first-child { margin-top: 0; }
.fetch-app-description p:last-child { margin-bottom: 0; }

.fetch-proscons-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 18px; }
.fetch-pros, .fetch-cons { background: var(--fc-surface); border: 1px solid var(--fc-border); border-radius: var(--fc-radius); padding: 18px 20px; }
.fetch-pros h3 { color: var(--fc-download-dark); font-size: 14px; }
.fetch-cons h3 { color: #c0392b; font-size: 14px; }
.fetch-pros ul, .fetch-cons ul { display: flex; flex-direction: column; gap: 9px; }
.fetch-pros li, .fetch-cons li { font-size: 14px; padding-left: 22px; position: relative; }
.fetch-pros li::before { content: "✓"; position: absolute; left: 0; color: var(--fc-download-dark); font-weight: 800; }
.fetch-cons li::before { content: "✕"; position: absolute; left: 0; color: #c0392b; font-weight: 800; }

.fetch-rate-widget { margin-top: 26px; background: var(--fc-surface); border: 1px solid var(--fc-border); border-radius: var(--fc-radius); padding: 20px; text-align: center; }
.fetch-rate-widget h3 { font-size: 15px; }
.fetch-rate-stars { display: flex; justify-content: center; gap: 4px; font-size: 27px; }
.fr-star { background: none; border: none; color: var(--fc-border); transition: color .1s, transform .1s; line-height: 1; }
.fr-star:hover, .fr-star.active { color: var(--fc-star); transform: scale(1.12); }
.fetch-rate-feedback { font-size: 13px; color: var(--fc-text-muted); min-height: 18px; margin: 10px 0 0; }

.fetch-oldversions-table { width: 100%; background: var(--fc-surface); border: 1px solid var(--fc-border); border-radius: var(--fc-radius); overflow: hidden; }
.fetch-oldversions-table th, .fetch-oldversions-table td { padding: 13px 18px; text-align: left; border-bottom: 1px solid var(--fc-border); font-size: 14px; }
.fetch-oldversions-table tr:last-child td { border-bottom: none; }
.fetch-oldversions-table th { background: var(--fc-bg); font-size: 11.5px; text-transform: uppercase; letter-spacing: .03em; color: var(--fc-text-muted); }
.fetch-oldversion-dl { font-weight: 700; }

/* Sidebar */
.fetch-info-box { background: var(--fc-surface); border: 1px solid var(--fc-border); border-radius: var(--fc-radius); padding: 20px; margin-bottom: 18px; }
.fetch-info-box h3 { font-size: 14px; margin-bottom: 14px; }
.fetch-info-table th, .fetch-info-table td { text-align: left; padding: 8px 0; border-bottom: 1px dashed var(--fc-border); font-size: 13px; }
.fetch-info-table th { color: var(--fc-text-muted); font-weight: 600; width: 42%; }
.fetch-info-table tr:last-child th, .fetch-info-table tr:last-child td { border-bottom: none; }

.fetch-plain-list li { padding: 7px 0; border-bottom: 1px dashed var(--fc-border); font-size: 13px; }
.fetch-plain-list li:last-child { border-bottom: none; }

.fetch-related-list li { border-bottom: 1px dashed var(--fc-border); }
.fetch-related-list li:last-child { border-bottom: none; }
.fetch-related-list a { display: flex; align-items: center; gap: 11px; color: var(--fc-text); font-size: 13px; font-weight: 600; padding: 9px 0; }
.fetch-related-list a:hover { color: var(--fc-primary); text-decoration: none; }
.fetch-related-list img { width: 36px; height: 36px; border-radius: 9px; object-fit: cover; }

/* Download modal */
.fetch-download-modal { position: fixed; inset: 0; background: rgba(15,17,24,.6); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.fetch-download-modal[hidden] { display: none; }
.fetch-download-modal-inner { background: var(--fc-surface); border-radius: var(--fc-radius-lg); padding: 36px 44px; text-align: center; }
.fetch-download-countdown { font-size: 46px; font-weight: 800; color: var(--fc-download); margin: 10px 0; }
.fetch-download-modal-note { font-size: 13px; color: var(--fc-text-muted); }

/* =========================================================
   Comments
   ========================================================= */
.fetch-comments { margin-top: 6px; }
.fetch-comments-title { font-size: 16px; }
.fetch-comment-list { display: flex; flex-direction: column; gap: 14px; }
.fetch-comment-list .comment-body { background: var(--fc-surface); border: 1px solid var(--fc-border); border-radius: var(--fc-radius); padding: 15px 18px; }
.comment-form-comment textarea { width: 100%; border: 1px solid var(--fc-border); border-radius: var(--fc-radius-sm); padding: 11px; font-family: inherit; font-size: 14px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"] {
	border: 1px solid var(--fc-border); border-radius: var(--fc-radius-sm); padding: 9px 12px; font-family: inherit; font-size: 14px;
}

/* =========================================================
   Footer
   ========================================================= */
.fetch-footer { background: #14151b; color: #b8bcc8; margin-top: 56px; }
.fetch-footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; padding: 48px 24px; }
.fetch-footer .fetch-logo-text { color: #fff; }
.fetch-footer-about p { font-size: 13px; color: #888ea3; margin-top: 12px; line-height: 1.6; }
.fetch-footer-col .widget-title, .fetch-footer-col h4 { color: #fff; font-size: 13.5px; margin-bottom: 14px; }
.fetch-footer-col a { color: #9498ab; font-size: 13px; }
.fetch-footer-col a:hover { color: #fff; }
.fetch-footer-menu { display: flex; flex-direction: column; gap: 9px; }
.fetch-footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding: 18px 24px; font-size: 12px; color: #71758a; }
.fetch-footer-bottom p { margin: 0; }

/* =========================================================
   Misc pages
   ========================================================= */
.fetch-empty-state { max-width: 560px; margin: 72px auto; text-align: center; }
.fetch-empty-state h1, .fetch-empty-state h2 { font-size: 22px; }
.fetch-empty-state p { color: var(--fc-text-muted); margin-bottom: 24px; }
.fetch-page-content { max-width: 780px; margin: 32px auto; background: var(--fc-surface); padding: 36px; border-radius: var(--fc-radius-lg); border: 1px solid var(--fc-border); }
.fetch-post { background: var(--fc-surface); border: 1px solid var(--fc-border); border-radius: var(--fc-radius); padding: 20px; margin-bottom: 16px; }
.fetch-post-title { font-size: 17px; margin: 12px 0 6px; }
.fetch-post-meta { font-size: 12.5px; color: var(--fc-text-muted); margin-bottom: 8px; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 900px) {
	.fetch-content-area, .fetch-app-body-grid { grid-template-columns: 1fr; }
	.fetch-app-header { grid-template-columns: auto 1fr; }
	.fetch-app-download-block { grid-column: 1 / -1; margin-top: 12px; }
	.fetch-footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
	.fetch-header-row { flex-wrap: wrap; gap: 14px; }
	.fetch-primary-nav { order: 3; flex-basis: 100%; }
	#fetch-primary-menu { display: none; flex-direction: column; gap: 4px; }
	#fetch-primary-menu.is-open { display: flex; }
	#fetch-primary-menu a { display: block; padding: 8px 0; }
	.fetch-search-wrap { max-width: none; flex: 1; margin-left: 0; }
	.fetch-nav-toggle { display: flex; }

	.fetch-app-header { grid-template-columns: 1fr; text-align: center; padding: 24px; }
	.fetch-app-icon { margin: 0 auto; }
	.fetch-app-badges, .fetch-app-rating-row { justify-content: center; }
	.fetch-proscons-grid { grid-template-columns: 1fr; }
	.fetch-oldversions-table { display: block; overflow-x: auto; }
}

@media (max-width: 520px) {
	.fetch-hero { padding: 52px 20px 40px; }
	.fetch-footer-grid { grid-template-columns: 1fr; }
	.fetch-grid { grid-template-columns: 1fr 1fr; }
}
