/*
Theme Name: Getupps
Theme URI: https://getupps.ru/
Description: Витрина Android-приложений со ссылками в RuStore: подборки, карточки приложений [app], инструкции. Без jQuery.
Author: Редакция Getupps
Version: 1.0.0
Requires PHP: 7.4
Text Domain: getupps
*/

:root {
	--bg: #f3f5f9;
	--surface: #ffffff;
	--ink: #121826;
	--muted: #5a6376;
	--line: #e2e7ef;
	--blue: #1f5eff;
	--blue-deep: #1646c7;
	--blue-soft: #e8efff;
	--green: #0f9d63;
	--star: #f2a516;
	--radius: 16px;
	--font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.6 var(--font); overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-deep); text-decoration: underline; }
h1, h2, h3 { line-height: 1.22; margin: 0 0 .55em; font-weight: 700; letter-spacing: -.015em; }
p { margin: 0 0 1em; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); }
.skip { position: absolute; left: -999px; top: 6px; z-index: 50; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 6px; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* ---------- Шапка ---------- */
.top { position: sticky; top: 0; z-index: 30; background: rgba(255, 255, 255, .96); border-bottom: 1px solid var(--line); backdrop-filter: saturate(1.4) blur(8px); }
.top__row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 14px; align-items: center; padding-top: 10px; padding-bottom: 10px; }
.logo { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); font-weight: 800; font-size: 20px; letter-spacing: -.02em; }
.logo:hover { color: var(--ink); text-decoration: none; }
.logo__mark { width: 32px; height: 32px; border-radius: 10px; background: linear-gradient(145deg, #3a7bff, #1f5eff 55%, #0f9d63); display: grid; place-items: center; color: #fff; font-size: 17px; font-weight: 800; }
.top__search { grid-column: 1 / -1; }
.qs { display: flex; align-items: center; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 0 4px 0 12px; }
.qs:focus-within { border-color: var(--blue); background: #fff; }
.qs input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 16px; padding: 10px 6px; color: var(--ink); outline: none; }
.qs button { border: 0; background: var(--blue); color: #fff; font: inherit; font-size: 14px; font-weight: 600; border-radius: 9px; padding: 7px 12px; cursor: pointer; }
.qs__ico { width: 16px; height: 16px; flex: none; border: 2px solid var(--muted); border-radius: 50%; position: relative; }
.qs__ico::after { content: ""; position: absolute; width: 7px; height: 2px; background: var(--muted); right: -6px; bottom: -3px; transform: rotate(45deg); }

.chips { border-top: 1px solid var(--line); }
.chips ul { list-style: none; margin: 0; padding: 8px 0; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.chips ul::-webkit-scrollbar { display: none; }
.chips li { flex: none; }
.chips a { display: block; padding: 6px 13px; border-radius: 999px; background: var(--bg); color: var(--ink); font-size: 14.5px; font-weight: 500; white-space: nowrap; }
.chips a:hover { background: var(--blue-soft); color: var(--blue-deep); text-decoration: none; }
.chips .current-menu-item > a, .chips .current-cat > a { background: var(--ink); color: #fff; }

/* ---------- Секции ---------- */
.sec { padding-top: 26px; padding-bottom: 26px; }
.sec__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.sec__title { font-size: 22px; margin: 0; }
.sec__more { font-size: 15px; font-weight: 600; white-space: nowrap; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 18px; }

/* ---------- Иконки-плейсхолдеры ---------- */
.ico {
	--h: 220;
	width: 56px; height: 56px; flex: none; border-radius: 26%;
	display: grid; place-items: center; overflow: hidden;
	background: linear-gradient(150deg, hsl(var(--h) 85% 62%), hsl(calc(var(--h) + 35) 75% 45%));
	color: #fff; font-weight: 800; font-size: 24px; text-transform: uppercase;
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06);
}
.ico img { width: 100%; height: 100%; object-fit: cover; }
.ico--lg { width: 76px; height: 76px; font-size: 32px; }
.ico--sm { width: 40px; height: 40px; font-size: 17px; }

/* ---------- Главная: задачи ---------- */
.tasks { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); margin-top: 16px; }
.task { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); }
.task:hover { border-color: var(--blue); text-decoration: none; color: var(--ink); }
.task b { display: block; font-size: 16px; line-height: 1.3; }
.task small { display: block; font-size: 13.5px; color: var(--muted); }

/* ---------- Главная: подборки ---------- */
.intro { padding-top: 22px; padding-bottom: 6px; }
.intro__title { font-size: 26px; margin-bottom: 6px; }
.intro__text { color: var(--muted); max-width: 60ch; margin: 0; }
.collections { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.coll {
	--h: 220;
	position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 190px; padding: 18px;
	border-radius: 22px; overflow: hidden; color: #fff;
	background: linear-gradient(150deg, hsl(var(--h) 70% 50%), hsl(calc(var(--h) + 40) 65% 34%));
}
.coll:hover { color: #fff; text-decoration: none; transform: translateY(-2px); }
.coll { transition: transform .2s ease; }
.coll__img { position: absolute; inset: 0; }
.coll__img img { width: 100%; height: 100%; object-fit: cover; }
.coll__img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 16, 30, .05) 20%, rgba(10, 16, 30, .78)); }
.coll__label { position: relative; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .85; }
.coll__title { position: relative; font-size: 21px; margin: 6px 0 0; line-height: 1.25; }
.coll__stack { position: absolute; top: 16px; right: 16px; display: flex; }
.coll__stack span { width: 38px; height: 38px; border-radius: 26%; margin-left: -10px; border: 2px solid rgba(255, 255, 255, .85); background: rgba(255, 255, 255, .22); }
.coll__stack span:nth-child(2) { background: rgba(255, 255, 255, .34); }
.coll__stack span:nth-child(3) { background: rgba(255, 255, 255, .5); }

/* ---------- Список обзоров ---------- */
.rows { list-style: none; margin: 0; padding: 0; }
.row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row__title { display: block; font-weight: 600; color: var(--ink); font-size: 16.5px; line-height: 1.35; }
.row__title:hover { color: var(--blue); text-decoration: none; }
.row__meta { font-size: 13.5px; color: var(--muted); margin-top: 3px; }
.row__open { display: none; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 6px; background: var(--blue-soft); color: var(--blue-deep); font-size: 12.5px; font-weight: 600; margin-right: 6px; }

/* ---------- Категории ---------- */
.cats { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cat { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); min-width: 0; }
.cat:hover { border-color: var(--blue); text-decoration: none; color: var(--ink); }
.cat__name { font-weight: 600; font-size: 15px; line-height: 1.25; display: block; overflow: hidden; text-overflow: ellipsis; }
.cat__count { font-size: 13px; color: var(--muted); }

/* ---------- Как установить ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); counter-reset: st; }
.steps li { counter-increment: st; position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px 16px 16px 62px; }
.steps li::before { content: counter(st); position: absolute; left: 16px; top: 16px; width: 32px; height: 32px; border-radius: 10px; background: var(--blue); color: #fff; font-weight: 800; display: grid; place-items: center; }
.steps b { display: block; margin-bottom: 2px; }
.steps span { color: var(--muted); font-size: 15px; }

/* ---------- Сетка карточек ---------- */
.tiles { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.tile__img { display: block; aspect-ratio: 16 / 9; background: var(--bg); }
.tile__img img { width: 100%; height: 100%; object-fit: cover; }
.tile__ph { --h: 220; width: 100%; height: 100%; display: grid; place-items: center; background: linear-gradient(150deg, hsl(var(--h) 80% 94%), hsl(calc(var(--h) + 40) 70% 86%)); }
.tile__body { padding: 14px 16px 16px; }
.tile__title { font-size: 18px; margin: 6px 0 6px; }
.tile__title a { color: var(--ink); }
.tile__title a:hover { color: var(--blue); text-decoration: none; }
.tile__text { font-size: 15px; color: var(--muted); margin: 0; }

/* ---------- Архив/поиск ---------- */
.head { padding-top: 24px; padding-bottom: 6px; }
.head__title { font-size: 26px; margin: 0 0 6px; }
.head__desc { color: var(--muted); max-width: 65ch; }
.pagination { margin: 28px 0 0; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 6px; }
.pagination .page-numbers { padding: 8px 14px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); font-size: 15px; font-weight: 600; }
.pagination .current { background: var(--ink); color: #fff; border-color: var(--ink); }
.empty { padding: 30px 0; color: var(--muted); }

/* ---------- Статья ---------- */
.layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; padding-top: 22px; padding-bottom: 10px; }
.post-head__cat { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.post-head__title { font-size: 28px; margin: 8px 0 10px; }
.post-head__meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14px; color: var(--muted); margin-bottom: 18px; }
.post-figure { margin: 0 0 22px; }
.post-figure img { width: 100%; border-radius: 18px; }

.toc { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px 16px; margin-bottom: 22px; }
.toc summary { cursor: pointer; font-weight: 700; font-size: 15px; }
.toc ol { margin: 10px 0 4px; padding-left: 20px; font-size: 15px; }
.toc li { margin: 5px 0; }
.toc a { color: var(--ink); }
.toc a:hover { color: var(--blue); }

.inpick { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px 16px; margin-bottom: 22px; }
.inpick__title { font-weight: 700; font-size: 15px; margin: 0 0 6px; }
.inpick ol { list-style: none; margin: 0; padding: 0; counter-reset: ip; }
.inpick li { counter-increment: ip; display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 7px 0; border-top: 1px solid var(--line); font-size: 15px; }
.inpick li:first-child { border-top: 0; }
.inpick li::before { content: counter(ip); color: var(--muted); font-weight: 700; font-size: 13px; }
.inpick a { color: var(--ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inpick a:hover { color: var(--blue); }
.inpick__r { font-size: 13.5px; color: var(--muted); white-space: nowrap; }
.inpick__r::before { content: "★ "; color: var(--star); }

.content { font-size: 18px; line-height: 1.7; max-width: 70ch; }
.content h2 { font-size: 24px; margin: 1.7em 0 .6em; scroll-margin-top: 120px; }
.content h3 { font-size: 20px; margin: 1.4em 0 .5em; }
.content ul, .content ol { padding-left: 1.3em; margin: 0 0 1.1em; }
.content li { margin: .35em 0; }
.content li::marker { color: var(--blue); }
.content img { border-radius: 14px; }
.content figure { margin: 1.4em 0; }
.content figcaption { font-size: 14px; color: var(--muted); margin-top: 6px; }
.content blockquote { margin: 1.4em 0; padding: 14px 18px; border-radius: 14px; background: var(--blue-soft); }
.content blockquote p:last-child { margin: 0; }
.content table { width: 100%; border-collapse: collapse; font-size: 15.5px; margin: 1.3em 0; display: block; overflow-x: auto; background: var(--surface); border-radius: 12px; }
.content th, .content td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.content th { font-weight: 700; background: #f7f9fc; }
.content code { background: #eef1f6; padding: 1px 6px; border-radius: 6px; font-size: .9em; }
.content a { text-decoration: underline; text-underline-offset: 3px; word-break: break-word; }

/* ---------- Карточка приложения [app] ---------- */
.app { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 18px; margin: 22px 0; font-size: 16.5px; scroll-margin-top: 120px; }
.app__head { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.content .app__name, .app__name { font-size: 20px; margin: 0 0 2px; line-height: 1.25; }
.app__dev { margin: 0; font-size: 14px; color: var(--muted); }
.app__cat { display: inline-block; margin-top: 4px; }
.app__facts { list-style: none; margin: 0 0 14px; padding: 10px 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: center; }
.content .app__facts li { margin: 0; }
.app__facts li + li { border-left: 1px solid var(--line); }
.app__facts b { display: block; font-size: 16px; line-height: 1.3; }
.app__facts span { font-size: 12.5px; color: var(--muted); }
.app__stars { color: var(--star); letter-spacing: 1px; }
.app__desc { color: #2a3140; }
.app__desc p:last-child { margin-bottom: 0; }
.app__actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 14px; }
.app__btn, .content .app__btn {
	display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 12px;
	background: var(--blue); color: #fff; font-weight: 700; font-size: 15.5px; text-decoration: none;
}
.app__btn:hover, .content .app__btn:hover { background: var(--blue-deep); color: #fff; text-decoration: none; }
.app__btn::before { content: ""; width: 16px; height: 16px; border-radius: 4px; background: #fff; opacity: .9; clip-path: polygon(40% 0, 60% 0, 60% 55%, 80% 40%, 92% 52%, 50% 92%, 8% 52%, 20% 40%, 40% 55%); }
.app__note { font-size: 13px; color: var(--muted); }
.apps { counter-reset: app; }
.apps .app { counter-increment: app; }
.apps .app__name::before { content: counter(app) ". "; color: var(--blue); }

/* ---------- Оффер и слоты ---------- */
.offer { display: flex; flex-direction: column; gap: 12px; margin: 24px 0; padding: 18px; border-radius: 18px; background: #0f1a33; color: #e7ecf7; }
.offer__note { display: block; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: #9fb0d4; margin-bottom: 4px; }
.offer__title { font-weight: 700; font-size: 18px; margin: 0 0 4px; color: #fff; }
.offer__text { margin: 0; font-size: 15px; color: #c6d0e6; }
.offer__btn, .content .offer__btn { align-self: flex-start; padding: 11px 18px; border-radius: 12px; background: #fff; color: #0f1a33; font-weight: 700; font-size: 15px; white-space: nowrap; text-decoration: none; }
.offer__btn:hover { background: var(--blue-soft); color: #0f1a33; text-decoration: none; }
.slot-title { font-weight: 700; margin-bottom: 8px; }

/* ---------- Автор ---------- */
.authorbox { display: flex; gap: 14px; align-items: flex-start; margin: 30px 0 0; padding: 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); max-width: 70ch; }
.authorbox__name { font-weight: 700; margin: 0 0 2px; }
.authorbox__text { margin: 0; font-size: 15px; color: var(--muted); }

.aside-box { display: none; }

/* ---------- 404 ---------- */
.nf { padding-top: 50px; padding-bottom: 30px; text-align: center; }
.nf__code { font-size: 64px; font-weight: 800; color: var(--blue); line-height: 1; margin-bottom: 8px; }
.nf .qs { max-width: 480px; margin: 18px auto 0; background: #fff; }

/* ---------- Подвал ---------- */
.foot { margin-top: 40px; background: var(--surface); border-top: 1px solid var(--line); font-size: 15px; }
.foot__grid { display: grid; gap: 22px; grid-template-columns: minmax(0, 1fr); padding-top: 30px; padding-bottom: 20px; }
.foot__title { font-weight: 700; margin: 0 0 8px; font-size: 15px; }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { margin: 5px 0; }
.foot a { color: var(--muted); }
.foot a:hover { color: var(--blue); }
.foot__about { color: var(--muted); max-width: 44ch; margin: 8px 0 0; }
.foot__bottom { border-top: 1px solid var(--line); padding-top: 14px; padding-bottom: 20px; font-size: 13px; color: var(--muted); }

/* ---------- ≥561 ---------- */
@media (min-width: 561px) {
	.tasks { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.collections { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.cats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.offer { flex-direction: row; align-items: center; justify-content: space-between; }
	.offer__btn, .content .offer__btn { align-self: center; }
	.row { grid-template-columns: auto minmax(0, 1fr) auto; }
	.row__open { display: inline-block; padding: 6px 14px; border-radius: 999px; background: var(--blue-soft); color: var(--blue-deep); font-size: 14px; font-weight: 700; }
	.row__open:hover { text-decoration: none; background: var(--blue); color: #fff; }
	.post-head__title { font-size: 34px; }
	.app { padding: 22px; }
	.foot__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- ≥921 ---------- */
@media (min-width: 921px) {
	.top__row { grid-template-columns: auto minmax(0, 460px) 1fr; padding-top: 12px; padding-bottom: 12px; }
	.top__search { grid-column: auto; }
	.intro__title { font-size: 32px; }
	.collections { grid-template-columns: 1.4fr 1fr 1fr; }
	.collections .coll:first-child { grid-row: span 2; min-height: 100%; }
	.coll { min-height: 210px; }
	.coll:first-child .coll__title { font-size: 27px; }
	.cats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
	.home-cols { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 26px; align-items: start; }
	.layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; padding-top: 30px; }
	.post-head__title { font-size: 38px; }
	.toc--inline, .inpick--inline { display: none; }
	.aside-box { display: block; position: sticky; top: 130px; }
	.aside-box .toc, .aside-box .inpick { margin-bottom: 16px; }
	.aside-box .toc summary { pointer-events: none; list-style: none; }
	.aside-box .toc summary::-webkit-details-marker { display: none; }
	.foot__grid { grid-template-columns: 1.4fr 1fr 1fr; }
}

/* шаги установки в узкой колонке главной — всегда столбиком */
@media (min-width: 921px) {
	.home-cols .steps { grid-template-columns: minmax(0, 1fr); }
}

/* таблицы: на телефоне — горизонтальная прокрутка внутри, шире — обычная таблица на всю колонку */
@media (min-width: 561px) {
	.content table { display: table; }
}
.apps > br, .apps > p:empty { display: none; }
.app__facts .app__stars { color: var(--star); font-size: inherit; }
