/**
 * DroidPress 2.0 — main stylesheet.
 * Mobile-first, CSS-variable driven, light + dark mode.
 * Colour variables (--dp-primary etc.) are injected inline from the
 * Customizer (inc/customizer.php) so admins can rebrand without code.
 */

/* ========================================================= Variables */
:root {
	--dp-primary: #01875f;
	--dp-primary-rgb: 1, 135, 95;
	--dp-secondary: #0f3d2e;
	--dp-font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

	--dp-bg: #f6f8f7;
	--dp-surface: #ffffff;
	--dp-surface-2: #eef2f0;
	--dp-text: #1c2320;
	--dp-text-soft: #5c6660;
	--dp-border: #e2e7e4;
	--dp-star: #f5a623;
	--dp-danger: #c0392b;
	--dp-radius: 14px;
	--dp-radius-sm: 9px;
	--dp-shadow: 0 1px 3px rgba(16, 24, 20, 0.06), 0 6px 18px rgba(16, 24, 20, 0.05);
	--dp-shadow-lift: 0 4px 10px rgba(16, 24, 20, 0.08), 0 12px 32px rgba(16, 24, 20, 0.1);
	--dp-header-h: 64px;
}

html.dp-dark {
	--dp-bg: #101513;
	--dp-surface: #1a201d;
	--dp-surface-2: #232b27;
	--dp-text: #e8edea;
	--dp-text-soft: #9aa59f;
	--dp-border: #2c3531;
	--dp-shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 6px 18px rgba(0, 0, 0, 0.3);
	--dp-shadow-lift: 0 4px 10px rgba(0, 0, 0, 0.45), 0 12px 32px rgba(0, 0, 0, 0.4);
}

/* ============================================================ Reset */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

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

body {
	margin: 0;
	font-family: var(--dp-font);
	font-size: 16px;
	line-height: 1.6;
	color: var(--dp-text);
	background: var(--dp-bg);
	-webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }
figure { margin: 0; }
a { color: var(--dp-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; cursor: pointer; }
code { background: var(--dp-surface-2); padding: 0.1em 0.4em; border-radius: 5px; font-size: 0.9em; word-break: break-all; }
table { border-collapse: collapse; width: 100%; }

h1, h2, h3, h4 { line-height: 1.25; color: var(--dp-text); margin: 0 0 0.5em; overflow-wrap: break-word; }

/* Accessibility helpers */
.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	clip-path: inset(50%);
	overflow: hidden;
	white-space: nowrap;
}
.dp-skip-link:focus {
	position: fixed !important;
	top: 8px; left: 8px;
	width: auto; height: auto;
	clip-path: none;
	background: var(--dp-primary);
	color: #fff;
	padding: 10px 16px;
	border-radius: var(--dp-radius-sm);
	z-index: 9999;
}
:focus-visible { outline: 2px solid var(--dp-primary); outline-offset: 2px; }

.dp-container { max-width: 1200px; margin: 0 auto; padding-inline: 16px; }
.dp-container--narrow { max-width: 680px; }
.dp-muted { color: var(--dp-text-soft); }

/* =========================================================== Buttons */
.dp-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background: var(--dp-primary);
	color: #fff;
	border: 1px solid transparent;
	border-radius: 999px;
	padding: 10px 22px;
	font-weight: 600;
	font-size: 0.95rem;
	line-height: 1.3;
	transition: filter 0.15s ease, transform 0.15s ease;
}
.dp-btn:hover { filter: brightness(1.08); text-decoration: none; color: #fff; transform: translateY(-1px); }
.dp-btn--small { padding: 6px 14px; font-size: 0.85rem; }
.dp-btn--big { padding: 14px 32px; font-size: 1.05rem; }
.dp-btn--ghost {
	background: transparent;
	color: var(--dp-primary);
	border-color: rgba(var(--dp-primary-rgb), 0.45);
}
.dp-btn--ghost:hover { color: var(--dp-primary); background: rgba(var(--dp-primary-rgb), 0.08); }
.dp-btn--mod { background: var(--dp-secondary); }
.dp-btn--card { width: 100%; margin-top: auto; }
.button-link { background: none; border: 0; padding: 0; color: var(--dp-primary); }

/* ============================================================ Header */
.dp-header {
	background: var(--dp-surface);
	border-bottom: 1px solid var(--dp-border);
}
.dp-header--sticky { position: sticky; top: 0; z-index: 900; }
.dp-header-inner {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: var(--dp-header-h);
	padding-block: 8px;
	flex-wrap: wrap;
}
.dp-branding { display: flex; align-items: center; }
.dp-site-title {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--dp-text);
}
.dp-site-title:hover { text-decoration: none; }
.dp-logo-mark { color: var(--dp-primary); display: inline-flex; }
.custom-logo { max-height: 44px; width: auto; }

/* Built-in logo (used when no logo is uploaded in the Customizer).
   Light/dark variants swap automatically with the colour scheme. */
.dp-site-logo { display: inline-flex; align-items: center; }
.dp-site-logo img { height: 40px; width: auto; display: block; }
html.dp-dark .dp-logo-light { display: none; }
html:not(.dp-dark) .dp-logo-dark { display: none; }

.dp-header-search { flex: 1 1 240px; min-width: 180px; }
.dp-header--center .dp-header-inner { justify-content: center; }
.dp-header--center .dp-header-search { flex: 0 1 420px; }

.dp-header-actions { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; }
.dp-icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px; height: 40px;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--dp-text-soft);
}
.dp-icon-btn:hover { background: var(--dp-surface-2); color: var(--dp-text); }
html:not(.dp-dark) .dp-icon-moon { display: none; }
html.dp-dark .dp-icon-sun { display: none; }

/* ------------------------------------------- Day / night switch */
.dp-theme-switch {
	border: 0;
	background: none;
	padding: 4px;
	line-height: 0;
	border-radius: 999px;
}
.dp-switch-track {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: space-between;
	width: 58px;
	height: 30px;
	padding: 0 7px;
	border-radius: 999px;
	background: var(--dp-surface-2);
	border: 1px solid var(--dp-border);
	transition: background 0.25s ease, border-color 0.25s ease;
}
.dp-theme-switch:hover .dp-switch-track { border-color: var(--dp-primary); }
.dp-switch-icon {
	position: relative;
	z-index: 2;
	display: inline-flex;
	transition: color 0.25s ease, opacity 0.25s ease;
}
.dp-switch-sun { color: #f5a623; }
.dp-switch-moon { color: var(--dp-text-soft); opacity: 0.55; }

/* Sliding knob — sits over the sun in day mode, the moon in night mode. */
.dp-switch-knob {
	position: absolute;
	z-index: 1;
	top: 3px;
	inset-inline-start: 3px;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var(--dp-surface);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
	transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1), background 0.25s ease;
}
html.dp-dark .dp-switch-track { background: var(--dp-secondary); border-color: transparent; }
html.dp-dark .dp-switch-knob { transform: translateX(28px); background: var(--dp-primary); }
[dir="rtl"] html.dp-dark .dp-switch-knob,
html.dp-dark [dir="rtl"] .dp-switch-knob { transform: translateX(-28px); }
html.dp-dark .dp-switch-sun { opacity: 0.5; color: var(--dp-text-soft); }
html.dp-dark .dp-switch-moon { opacity: 1; color: #fff; }

/* ================================================ Navigation (stylish) */
.dp-nav { background: var(--dp-surface); border-top: 1px solid var(--dp-border); }
.dp-nav-inner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.dp-nav-inner > ul { flex: 1; min-width: 0; }

/* Language switcher (flag select) */
.dp-lang-switch { margin-inline-start: auto; }
.dp-lang-switch select {
	appearance: none;
	-webkit-appearance: none;
	background: var(--dp-surface-2);
	color: var(--dp-text);
	border: 1px solid var(--dp-border);
	border-radius: 999px;
	padding: 7px 30px 7px 14px;
	font-size: 0.88rem;
	font-weight: 600;
	cursor: pointer;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%235c6660' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
}
[dir="rtl"] .dp-lang-switch select { padding: 7px 14px 7px 30px; background-position: left 12px center; }
.dp-lang-switch select:hover { border-color: var(--dp-primary); }
@media (max-width: 782px) {
	.dp-lang-switch { margin: 6px 0 10px; padding-inline: 4px; }
	.dp-lang-switch select { width: 100%; }
}
.dp-nav-list { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; flex-wrap: wrap; }
.dp-nav-list a {
	display: block;
	position: relative;
	padding: 12px 16px;
	color: var(--dp-text-soft);
	font-weight: 600;
	font-size: 0.95rem;
	border-radius: var(--dp-radius-sm) var(--dp-radius-sm) 0 0;
	transition: color 0.15s ease, background 0.15s ease;
}
.dp-nav-icon {
	display: inline-block;
	vertical-align: -3px;
	margin-inline-end: 7px;
	line-height: 0;
}

/* Animated green underline that slides in */
.dp-nav-list > li > a::before {
	content: "";
	position: absolute;
	inset-inline: 14px;
	bottom: 6px;
	height: 3px;
	border-radius: 3px;
	background: linear-gradient(90deg, var(--dp-primary), rgba(var(--dp-primary-rgb), 0.45));
	transform: scaleX(0);
	transform-origin: 0 50%;
	transition: transform 0.22s ease;
}
.dp-nav-list > li > a:hover::before,
.dp-nav-list > li.current-menu-item > a::before,
.dp-nav-list > li.current_page_item > a::before,
.dp-nav-list > li.current-menu-ancestor > a::before { transform: scaleX(1); }
.dp-nav-list a:hover { color: var(--dp-primary); text-decoration: none; background: rgba(var(--dp-primary-rgb), 0.05); }
.dp-nav-list li.current-menu-item > a,
.dp-nav-list li.current_page_item > a,
.dp-nav-list li.current-menu-ancestor > a { color: var(--dp-primary); }

/* Primary navigation is flat — no dropdown caret. */
.dp-nav .sub-menu { display: none !important; }

/* Sticky header lifts with a shadow once the page scrolls */
.dp-header--sticky.is-scrolled { box-shadow: 0 6px 22px rgba(16, 24, 20, 0.1); }
html.dp-dark .dp-header--sticky.is-scrolled { box-shadow: 0 6px 22px rgba(0, 0, 0, 0.5); }

@media (max-width: 782px) {
	.dp-nav { display: none; }
	.dp-nav.is-open { display: block; animation: dp-nav-in 0.22s ease; }
	@keyframes dp-nav-in {
		from { opacity: 0; transform: translateY(-8px); }
		to { opacity: 1; transform: none; }
	}
	.dp-nav-list { flex-direction: column; gap: 0; padding-block: 6px; }
	.dp-nav-list > li { border-bottom: 1px solid var(--dp-border); }
	.dp-nav-list > li:last-child { border-bottom: 0; }
	.dp-nav-list a { border-radius: var(--dp-radius-sm); }
	.dp-nav-list > li > a::before { display: none; }
	.dp-header-search { order: 3; flex-basis: 100%; }
}
@media (min-width: 783px) {
	.dp-menu-toggle { display: none; }
}

/* ============================================================ Search */
.dp-search-form { position: relative; }
.dp-search-box {
	display: flex;
	align-items: center;
	background: var(--dp-surface-2);
	border: 1px solid var(--dp-border);
	border-radius: 999px;
	padding-inline-start: 14px;
	transition: box-shadow 0.15s ease;
}
.dp-search-box:focus-within { box-shadow: 0 0 0 3px rgba(var(--dp-primary-rgb), 0.25); background: var(--dp-surface); }
.dp-search-icon { color: var(--dp-text-soft); flex: none; }
.dp-search-input {
	flex: 1;
	min-width: 0;
	border: 0;
	background: transparent;
	padding: 10px 12px;
	color: var(--dp-text);
	font-size: 0.95rem;
}
.dp-search-input:focus { outline: none; }
.dp-search-submit {
	border: 0;
	background: var(--dp-primary);
	color: #fff;
	font-weight: 600;
	padding: 9px 18px;
	border-radius: 999px;
	margin: 3px;
}
.dp-search-suggest {
	position: absolute;
	inset-inline: 0;
	top: calc(100% + 6px);
	background: var(--dp-surface);
	border: 1px solid var(--dp-border);
	border-radius: var(--dp-radius);
	box-shadow: var(--dp-shadow-lift);
	z-index: 960;
	max-height: 360px;
	overflow: auto;
}
.dp-suggest-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 12px;
	color: var(--dp-text);
}
.dp-suggest-item:hover, .dp-suggest-item.is-active { background: var(--dp-surface-2); text-decoration: none; }
.dp-suggest-item img { width: 40px; height: 40px; border-radius: 10px; flex: none; }
.dp-suggest-name { font-weight: 600; display: block; }
.dp-suggest-meta { font-size: 0.8rem; color: var(--dp-text-soft); }
.dp-suggest-empty { padding: 12px; color: var(--dp-text-soft); text-align: center; }

/* ============================================================== Hero */
.dp-hero {
	background:
		radial-gradient(1000px 380px at 85% -50%, rgba(var(--dp-primary-rgb), 0.35), transparent 70%),
		linear-gradient(135deg, var(--dp-secondary), var(--dp-primary));
	color: #fff;
	text-align: center;
	padding: 48px 16px 56px;
}
.dp-hero-title { color: #fff; font-size: clamp(1.6rem, 4.5vw, 2.5rem); margin-bottom: 8px; }
.dp-hero-subtitle { color: rgba(255, 255, 255, 0.85); margin: 0 0 24px; font-size: 1.05rem; }
.dp-hero-search { max-width: 560px; margin: 0 auto; }
.dp-hero-cover { max-width: 960px; margin: 32px auto 0; }
.dp-hero-cover img {
	display: block;
	width: 100%;
	max-height: 360px;
	object-fit: cover;
	border-radius: var(--dp-radius);
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}
.dp-hero .dp-search-box { background: #fff; border-color: transparent; }
.dp-hero .dp-search-input { color: #1c2320; }

/* ========================================================== Sections */
.dp-section { margin-block: 36px; }
.dp-section-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 16px;
}
.dp-section-title { font-size: 1.35rem; margin: 0; }
.dp-section-more { font-weight: 600; white-space: nowrap; }

/* App/game grid: 4 cards per row on desktop, stepping down gracefully
   on smaller screens (3 → 2 → 1) so cards never get cramped. */
.dp-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 16px;
}
@media (min-width: 600px) {
	.dp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
	.dp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1100px) {
	.dp-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
/* Inside a sidebar layout the column is narrower — cap at 2 per row. */
@media (min-width: 1100px) {
	.has-sidebar .dp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ========================================================== App card */
.dp-app-card {
	display: flex;
	flex-direction: column;
	background: var(--dp-surface);
	border: 1px solid var(--dp-border);
	border-radius: var(--dp-radius);
	padding: 16px;
	box-shadow: var(--dp-shadow);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.dp-app-card:hover { transform: translateY(-3px); box-shadow: var(--dp-shadow-lift); }
.dp-app-card-top { display: flex; gap: 12px; align-items: flex-start; }
.dp-app-card-icon { flex: none; }
.dp-app-icon img, .dp-app-icon-fallback {
	width: 64px; height: 64px;
	border-radius: 16px;
	object-fit: cover;
	display: block;
	background: var(--dp-surface-2);
}
.dp-app-icon-fallback {
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.6rem;
	font-weight: 700;
	color: var(--dp-primary);
	background: rgba(var(--dp-primary-rgb), 0.12);
}
.dp-app-card-head { min-width: 0; flex: 1; }
.dp-app-card-title { font-size: 1.02rem; margin: 0 0 2px; }
.dp-app-card-title a { color: var(--dp-text); }
.dp-app-card-cat { font-size: 0.8rem; color: var(--dp-text-soft); display: inline-block; }
.dp-app-card-rating { display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.dp-rating-num { font-size: 0.8rem; color: var(--dp-text-soft); }
.dp-app-card-tools { display: flex; flex-direction: column; gap: 2px; }
.dp-fav-btn {
	border: 0;
	background: transparent;
	color: var(--dp-text-soft);
	width: 30px; height: 30px;
	border-radius: 8px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.dp-fav-btn:hover { background: var(--dp-surface-2); color: var(--dp-primary); }
.dp-fav-btn.is-active { color: var(--dp-primary); }
.dp-fav-btn.is-active svg { fill: currentColor; }

.dp-app-card-desc {
	font-size: 0.88rem;
	color: var(--dp-text-soft);
	margin: 10px 0;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	min-height: 2.6em;
}
.dp-app-card-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	margin-bottom: 12px;
	font-size: 0.78rem;
}
.dp-app-card-updated { color: var(--dp-text-soft); margin-inline-start: auto; }

/* Badges */
.dp-badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	background: rgba(var(--dp-primary-rgb), 0.1);
	color: var(--dp-primary);
	border-radius: 999px;
	padding: 2px 10px;
	font-size: 0.76rem;
	font-weight: 600;
	white-space: nowrap;
}
.dp-badge--mod { background: rgba(150, 60, 190, 0.14); color: #963cbe; }
html.dp-dark .dp-badge--mod { color: #c07fe0; }
.dp-badge--safe { color: var(--dp-primary); }

/* Stars */
.dp-stars {
	position: relative;
	display: inline-block;
	font-size: 0.85rem;
	line-height: 1;
	color: var(--dp-border);
	width: 5em;
}
.dp-stars::before { content: "★★★★★"; letter-spacing: 0.12em; }
.dp-stars-fill {
	position: absolute;
	inset-block: 0;
	inset-inline-start: 0;
	overflow: hidden;
	color: var(--dp-star);
	white-space: nowrap;
}
.dp-stars-fill::before { content: "★★★★★"; letter-spacing: 0.12em; }

/* ========================================================= Blog grid */
.dp-blog-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 16px;
}
.dp-blog-card, .dp-post-card {
	background: var(--dp-surface);
	border: 1px solid var(--dp-border);
	border-radius: var(--dp-radius);
	overflow: hidden;
	box-shadow: var(--dp-shadow);
}
.dp-blog-thumb img, .dp-post-card-thumb img { display: block; width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.dp-blog-card-body, .dp-post-card-body { padding: 14px 16px; }
.dp-blog-card-title, .dp-post-card-title { font-size: 1.05rem; }
.dp-blog-card-title a, .dp-post-card-title a { color: var(--dp-text); }
.dp-blog-card time, .dp-post-card-meta { font-size: 0.8rem; color: var(--dp-text-soft); }

.dp-post-list { display: grid; gap: 16px; }
.dp-read-more { font-weight: 600; }

/* ===================================================== Layout + side */
.dp-layout, .dp-app-layout { display: grid; gap: 24px; }
@media (min-width: 960px) {
	.dp-layout.has-sidebar, .dp-app-layout.has-sidebar { grid-template-columns: minmax(0, 1fr) 320px; }
}
.dp-sidebar { min-width: 0; }
.dp-widget {
	background: var(--dp-surface);
	border: 1px solid var(--dp-border);
	border-radius: var(--dp-radius);
	padding: 16px;
	margin-bottom: 16px;
}
.dp-widget-title { font-size: 1rem; margin-bottom: 10px; }
.dp-widget ul { margin: 0; padding-inline-start: 18px; }

/* ======================================================= Breadcrumbs */
.dp-breadcrumbs { margin: 16px 0; font-size: 0.85rem; }
.dp-breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; }
.dp-breadcrumbs li:not(:last-child)::after { content: "›"; margin-inline-start: 4px; color: var(--dp-text-soft); }
.dp-breadcrumbs span[aria-current] { color: var(--dp-text-soft); }

/* ======================================================== Single app */
.dp-app-article {
	background: var(--dp-surface);
	border: 1px solid var(--dp-border);
	border-radius: var(--dp-radius);
	padding: clamp(16px, 3vw, 32px);
	box-shadow: var(--dp-shadow);
	min-width: 0;
}
.dp-app-header { display: flex; gap: 20px; flex-wrap: wrap; }
.dp-app-header-icon .dp-app-icon img,
.dp-app-header-icon .dp-app-icon-fallback { width: 96px; height: 96px; border-radius: 22px; }
.dp-app-header-main { flex: 1; min-width: 240px; }

/* Mobile: stack the header — icon centred on top, then title and the
   stats box at FULL width below the icon (app-store style). */
@media (max-width: 719px) {
	.dp-app-header { flex-direction: column; gap: 14px; }
	.dp-app-header-icon { align-self: center; }
	.dp-app-header-main { width: 100%; min-width: 0; flex: none; }
	.dp-app-title { text-align: center; }
	.dp-app-byline { justify-content: center; }
	.dp-app-stats { width: 100%; }
	.dp-app-actions { justify-content: center; }
	.dp-app-share { justify-content: center; }
	.dp-icon-row { justify-content: center; }
	.dp-app-actions .dp-btn--download { width: 100%; }
}
.dp-app-title { font-size: clamp(1.4rem, 4vw, 2rem); margin-bottom: 6px; }
.dp-app-byline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 14px; color: var(--dp-text-soft); }
.dp-app-dev { font-weight: 600; }

/* Stats box: 2×2 grid on phones, one even row on larger screens.
   Cells are vertically centred so mixed content (stars vs. plain
   numbers) never leaves uneven gaps. */
.dp-app-stats {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	border: 1px solid var(--dp-border);
	border-radius: var(--dp-radius);
	margin-bottom: 16px;
	overflow: hidden;
}
.dp-stat {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	text-align: center;
	padding: 14px 8px;
	min-width: 0;
}
/* Mobile 2-column separators */
.dp-stat:nth-child(odd) { border-inline-end: 1px solid var(--dp-border); }
.dp-stat:nth-child(n+3) { border-top: 1px solid var(--dp-border); }
@media (min-width: 720px) {
	.dp-app-stats { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
	.dp-stat:nth-child(odd) { border-inline-end: 0; }
	.dp-stat:nth-child(n+3) { border-top: 0; }
	.dp-stat + .dp-stat { border-inline-start: 1px solid var(--dp-border); }
}
.dp-stat-value { display: block; font-weight: 700; white-space: nowrap; }
.dp-stat-label { font-size: 0.75rem; color: var(--dp-text-soft); }
/* Interactive stars: always one line, centred */
.dp-rate-stars {
	display: flex;
	justify-content: center;
	flex-wrap: nowrap;
	white-space: nowrap;
	margin-top: 2px;
}
.dp-rate-star {
	background: none;
	border: 0;
	padding: 0 1px;
	font-size: 1rem;
	line-height: 1.2;
	color: var(--dp-border);
	transition: color 0.1s ease, transform 0.1s ease;
}
.dp-rate-star.is-hover, .dp-rate-star.is-set { color: var(--dp-star); }
.dp-rate-star:hover { transform: scale(1.2); }

.dp-app-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.dp-editor-note {
	background: rgba(245, 166, 35, 0.12);
	border: 1px dashed #f5a623;
	border-radius: var(--dp-radius-sm);
	padding: 10px 14px;
	font-size: 0.85rem;
}
.dp-app-share { display: flex; flex-wrap: wrap; gap: 12px; font-size: 0.85rem; color: var(--dp-text-soft); align-items: center; }

/* Quick-action icon row (QR / share / Play Store / feed / developer) */
.dp-icon-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 16px; }
.dp-icon-action {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border: 0;
	border-radius: 14px;
	background: rgba(var(--dp-primary-rgb), 0.12);
	color: var(--dp-primary);
	transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.dp-icon-action:hover {
	background: var(--dp-primary);
	color: #fff;
	transform: translateY(-2px);
	text-decoration: none;
}

.dp-app-summary { font-size: 1.05rem; color: var(--dp-text-soft); border-inline-start: 3px solid var(--dp-primary); padding-inline-start: 14px; margin-block: 20px; }

.dp-app-section { margin-block: 34px; }
.dp-app-section h2 {
	font-size: 1.3rem;
	padding-bottom: 10px;
	border-bottom: 1px solid var(--dp-border);
	position: relative;
}
.dp-app-section h2::after {
	content: "";
	position: absolute;
	bottom: -1px;
	inset-inline-start: 0;
	width: 56px;
	height: 3px;
	border-radius: 3px;
	background: linear-gradient(90deg, var(--dp-primary), rgba(var(--dp-primary-rgb), 0.35));
}

/* ================================ Entry content (stylish typography) */
.dp-entry-content {
	overflow-wrap: break-word;
	font-size: 1.02rem;
	line-height: 1.75;
	color: var(--dp-text);
}
.dp-entry-content > p:first-child {
	font-size: 1.08rem;
	color: var(--dp-text-soft);
}
.dp-entry-content h2,
.dp-entry-content h3,
.dp-entry-content h4 { font-weight: 700; }
.dp-entry-content h2 {
	font-size: 1.3rem;
	margin-top: 1.8em;
	padding-inline-start: 14px;
	border-inline-start: 4px solid var(--dp-primary);
	border-radius: 2px;
}
.dp-entry-content h3 { font-size: 1.12rem; margin-top: 1.5em; color: var(--dp-primary); }
.dp-entry-content h4 { font-size: 1rem; margin-top: 1.3em; }

.dp-entry-content a {
	color: var(--dp-primary);
	font-weight: 600;
	text-decoration: underline;
	text-decoration-color: rgba(var(--dp-primary-rgb), 0.4);
	text-underline-offset: 3px;
	transition: text-decoration-color 0.15s ease;
}
.dp-entry-content a:hover { text-decoration-color: var(--dp-primary); }

.dp-entry-content ul,
.dp-entry-content ol { padding-inline-start: 6px; margin: 1em 0; list-style: none; }
.dp-entry-content ul li,
.dp-entry-content ol li { padding: 4px 0 4px 28px; position: relative; }
.dp-entry-content ul li::before {
	content: "";
	position: absolute;
	inset-inline-start: 4px;
	top: 0.95em;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--dp-primary);
	opacity: 0.75;
}
.dp-entry-content ol { counter-reset: dp-ol; }
.dp-entry-content ol li { counter-increment: dp-ol; }
.dp-entry-content ol li::before {
	content: counter(dp-ol);
	position: absolute;
	inset-inline-start: 0;
	top: 0.45em;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: rgba(var(--dp-primary-rgb), 0.12);
	color: var(--dp-primary);
	font-size: 0.72rem;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
}
.dp-entry-content li > ul,
.dp-entry-content li > ol { margin: 4px 0; }

.dp-entry-content blockquote {
	margin: 1.4em 0;
	padding: 16px 22px;
	background: rgba(var(--dp-primary-rgb), 0.06);
	border-inline-start: 4px solid var(--dp-primary);
	border-radius: 0 var(--dp-radius-sm) var(--dp-radius-sm) 0;
	font-style: italic;
	color: var(--dp-text-soft);
}
.dp-entry-content blockquote p:last-child { margin-bottom: 0; }

.dp-entry-content img {
	border-radius: var(--dp-radius-sm);
	box-shadow: var(--dp-shadow);
}
.dp-entry-content figcaption {
	text-align: center;
	font-size: 0.85rem;
	color: var(--dp-text-soft);
	margin-top: 6px;
}

.dp-entry-content table {
	margin: 1.4em 0;
	border: 1px solid var(--dp-border);
	border-radius: var(--dp-radius-sm);
	overflow: hidden;
	font-size: 0.95rem;
}
.dp-entry-content th,
.dp-entry-content td { padding: 10px 14px; border-bottom: 1px solid var(--dp-border); text-align: start; }
.dp-entry-content thead th,
.dp-entry-content tr:first-child th {
	background: rgba(var(--dp-primary-rgb), 0.1);
	color: var(--dp-primary);
	text-transform: uppercase;
	font-size: 0.78rem;
	letter-spacing: 0.05em;
}
.dp-entry-content tbody tr:nth-child(even) { background: var(--dp-surface-2); }
.dp-entry-content tr:last-child td { border-bottom: 0; }

.dp-entry-content pre {
	background: var(--dp-secondary);
	color: #e8f5f0;
	padding: 16px 20px;
	border-radius: var(--dp-radius-sm);
	overflow-x: auto;
	font-size: 0.88rem;
}
.dp-entry-content pre code { background: none; padding: 0; color: inherit; }

.dp-entry-content hr {
	border: 0;
	height: 2px;
	margin: 2em auto;
	width: 120px;
	border-radius: 2px;
	background: linear-gradient(90deg, transparent, var(--dp-primary), transparent);
}

/* Zebra + hover on the app info table too */
.dp-info-table tbody tr:nth-child(even) { background: var(--dp-surface-2); }
.dp-info-table tbody tr:hover { background: rgba(var(--dp-primary-rgb), 0.06); }

/* Table of contents */
.dp-toc {
	background: var(--dp-surface-2);
	border-radius: var(--dp-radius-sm);
	padding: 14px 18px;
	margin-bottom: 18px;
	font-size: 0.9rem;
}
.dp-toc ol { margin: 6px 0 0; padding-inline-start: 20px; }
.dp-toc a { color: var(--dp-text); }

/* Screenshots slider */
.dp-shots-slider {
	display: flex;
	gap: 12px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	padding-bottom: 8px;
	-webkit-overflow-scrolling: touch;
}
/* Room for the frame shadow. The inline scroll-padding matches the inline
   padding, so snapping still rests exactly at the start rather than two
   pixels along. */
.dp-shots-slider {
	padding: 4px 2px 12px;
	scroll-padding-inline: 2px;
}

/* Each screenshot sits in a padded frame — a thin border, a soft mat of
   card colour and a low shadow, so the image reads as a framed device
   picture rather than a bare rectangle. Both colours are theme variables,
   so the frames follow the palette and dark mode automatically. */
.dp-shot {
	flex: 0 0 auto;
	scroll-snap-align: start;
	padding: 8px;
	background: var(--dp-surface);
	border: 1px solid var(--dp-border);
	border-radius: calc(var(--dp-radius-sm) + 6px);
	box-shadow: var(--dp-shadow);
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.dp-shot img {
	height: 340px;
	width: auto;
	border-radius: var(--dp-radius-sm);
	border: 1px solid var(--dp-border);
	display: block;
	background: var(--dp-surface-2); /* Placeholder tone while lazy-loading. */
}

.dp-shot:hover,
.dp-shot:focus-within {
	transform: translateY(-3px);
	box-shadow: var(--dp-shadow-lift);
	border-color: rgba(var(--dp-primary-rgb), 0.45);
}

@media (prefers-reduced-motion: reduce) {
	.dp-shot { transition: none; }
	.dp-shot:hover,
	.dp-shot:focus-within { transform: none; }
}

@media (max-width: 600px) {
	.dp-shot { padding: 6px; }
	.dp-shot img { height: 260px; }
}

/* Info + versions tables */
.dp-table-scroll { overflow-x: auto; }
.dp-info-table th, .dp-info-table td,
.dp-versions-table th, .dp-versions-table td,
.dp-compare-table th, .dp-compare-table td {
	padding: 10px 12px;
	border-bottom: 1px solid var(--dp-border);
	text-align: start;
	vertical-align: top;
}
.dp-info-table th { width: 38%; color: var(--dp-text-soft); font-weight: 600; }
.dp-versions-table thead th, .dp-compare-table thead th {
	background: var(--dp-surface-2);
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}
.dp-version-log summary { cursor: pointer; color: var(--dp-primary); font-size: 0.82rem; }
.dp-col-action { text-align: end; }

/* Lists */
.dp-list { padding-inline-start: 4px; list-style: none; margin: 0; }
.dp-list li { padding: 5px 0 5px 26px; position: relative; }
.dp-list li::before {
	content: "✓";
	position: absolute;
	inset-inline-start: 0;
	color: var(--dp-primary);
	font-weight: 700;
}
.dp-list--mod li::before { content: "★"; color: #963cbe; }
.dp-steps { counter-reset: step; list-style: none; margin: 0; padding: 0; }
.dp-steps li { counter-increment: step; position: relative; padding: 8px 0 8px 40px; }
.dp-steps li::before {
	content: counter(step);
	position: absolute;
	inset-inline-start: 0;
	top: 8px;
	width: 26px; height: 26px;
	border-radius: 50%;
	background: rgba(var(--dp-primary-rgb), 0.12);
	color: var(--dp-primary);
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 0.85rem;
}

/* MOD + safety */
.dp-mod-section { border-inline-start: 3px solid #963cbe; padding-inline-start: 16px; }
.dp-safety {
	background: rgba(var(--dp-primary-rgb), 0.06);
	border-radius: var(--dp-radius);
	padding: 16px 20px;
}
.dp-safety h2 { border: 0; margin-bottom: 4px; }
.dp-report-link { margin-top: 8px; display: inline-block; }
.dp-report-form { margin-top: 10px; }
.dp-report-form textarea { width: 100%; }

/* FAQ */
.dp-faq-item {
	border: 1px solid var(--dp-border);
	border-radius: var(--dp-radius-sm);
	margin-bottom: 8px;
	background: var(--dp-surface);
}
.dp-faq-item summary { padding: 12px 16px; font-weight: 600; cursor: pointer; }
.dp-faq-item[open] summary { border-bottom: 1px solid var(--dp-border); }
.dp-faq-item p { padding: 12px 16px; margin: 0; color: var(--dp-text-soft); }

.dp-app-disclaimer { font-size: 0.85rem; color: var(--dp-text-soft); }

/* Sticky mobile download bar */
.dp-sticky-download {
	position: fixed;
	inset-inline: 0;
	bottom: 0;
	background: var(--dp-surface);
	border-top: 1px solid var(--dp-border);
	box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 16px;
	padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
	z-index: 800;
	transform: translateY(110%);
	transition: transform 0.25s ease;
}
.dp-sticky-download.is-visible { transform: translateY(0); }
.dp-sticky-info { display: flex; align-items: center; gap: 10px; min-width: 0; }
.dp-sticky-info .dp-app-icon img, .dp-sticky-info .dp-app-icon-fallback { width: 40px; height: 40px; border-radius: 10px; }
.dp-sticky-info strong { display: block; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46vw; }
.dp-sticky-info small { color: var(--dp-text-soft); }
body.dp-has-sticky { padding-bottom: 76px; } /* keep content visible above the bar */
@media (min-width: 960px) { .dp-sticky-download { display: none; } body.dp-has-sticky { padding-bottom: 0; } }

/* ===================================================== Download page */
.dp-download-page .dp-download-card {
	background: var(--dp-surface);
	border: 1px solid var(--dp-border);
	border-radius: var(--dp-radius);
	box-shadow: var(--dp-shadow);
	padding: clamp(20px, 4vw, 36px);
	text-align: center;
	margin-bottom: 16px;
}
.dp-download-head {
	display: flex;
	align-items: center;
	gap: 16px;
	text-align: start;
	margin-bottom: 16px;
}
.dp-download-head .dp-app-icon img, .dp-download-head .dp-app-icon-fallback { width: 72px; height: 72px; border-radius: 18px; }
.dp-download-title { font-size: 1.35rem; margin-bottom: 6px; }
.dp-download-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.dp-download-safety {
	background: rgba(var(--dp-primary-rgb), 0.07);
	border-radius: var(--dp-radius-sm);
	padding: 12px 16px;
	font-size: 0.9rem;
	color: var(--dp-text-soft);
}
.dp-countdown { margin-block: 24px; }
.dp-countdown-ring {
	width: 84px; height: 84px;
	margin: 0 auto 12px;
	border-radius: 50%;
	border: 4px solid rgba(var(--dp-primary-rgb), 0.25);
	border-top-color: var(--dp-primary);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.6rem;
	font-weight: 700;
	color: var(--dp-primary);
	animation: dp-spin 1.2s linear infinite;
}
.dp-countdown-ring span { animation: dp-unspin 1.2s linear infinite; }
@keyframes dp-spin { to { transform: rotate(360deg); } }
@keyframes dp-unspin { to { transform: rotate(-360deg); } }
.dp-countdown-text { color: var(--dp-text-soft); }
.dp-download-note { font-size: 0.85rem; color: var(--dp-text-soft); margin-top: 12px; }

/* Step 2: "The download will start shortly…" page */
.dp-start { margin-block: 24px; }
.dp-start .dp-countdown-ring { margin-bottom: 16px; }
.dp-start-title { font-size: 1.2rem; border: 0; margin-bottom: 4px; }
.dp-start-sub { color: var(--dp-text-soft); margin-top: 0; }
.dp-start-manual { margin-top: 20px; color: var(--dp-text-soft); font-size: 1rem; }
.dp-start-click { font-weight: 700; text-decoration: underline; }
.dp-download-missing {
	background: rgba(192, 57, 43, 0.08);
	border: 1px solid rgba(192, 57, 43, 0.25);
	border-radius: var(--dp-radius);
	padding: 20px;
	margin-block: 20px;
}
.dp-download-back { margin-top: 12px; font-size: 0.9rem; }
.dp-download-disclaimer { font-size: 0.8rem; color: var(--dp-text-soft); text-align: center; }

/* ======================================================== Filter bar */
.dp-archive-header { margin-block: 8px 20px; }
.dp-archive-title { font-size: clamp(1.4rem, 4vw, 1.9rem); }
.dp-archive-desc { color: var(--dp-text-soft); max-width: 720px; }
/* Sub-category chips on category archives */
.dp-subcats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.dp-subcat-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: var(--dp-surface);
	border: 1px solid var(--dp-border);
	border-radius: 999px;
	padding: 6px 14px;
	font-size: 0.86rem;
	font-weight: 600;
	color: var(--dp-text);
}
.dp-subcat-chip:hover { border-color: var(--dp-primary); color: var(--dp-primary); text-decoration: none; }
.dp-subcat-count {
	background: rgba(var(--dp-primary-rgb), 0.1);
	color: var(--dp-primary);
	border-radius: 999px;
	padding: 0 8px;
	font-size: 0.75rem;
}

.dp-filter-bar {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	background: var(--dp-surface);
	border: 1px solid var(--dp-border);
	border-radius: var(--dp-radius);
	padding: 12px;
	margin-bottom: 20px;
}
.dp-filter-bar select, .dp-filter-bar input[type="search"] {
	background: var(--dp-surface-2);
	color: var(--dp-text);
	border: 1px solid var(--dp-border);
	border-radius: var(--dp-radius-sm);
	padding: 8px 10px;
	font-size: 0.88rem;
	flex: 1 1 140px;
	min-width: 0;
}
.dp-filter-search { flex: 2 1 180px; }

/* ============================================================= Posts */
.dp-article {
	background: var(--dp-surface);
	border: 1px solid var(--dp-border);
	border-radius: var(--dp-radius);
	padding: clamp(16px, 3vw, 32px);
	box-shadow: var(--dp-shadow);
	min-width: 0;
}
.dp-article-title { font-size: clamp(1.5rem, 4vw, 2.1rem); }
.dp-article-meta { color: var(--dp-text-soft); font-size: 0.88rem; display: flex; flex-wrap: wrap; gap: 6px; }
.dp-article-thumb img { border-radius: var(--dp-radius-sm); width: 100%; }
.dp-tags { font-size: 0.85rem; }
.post-navigation { margin-top: 24px; }
.post-navigation a { display: block; }
.dp-search-row {
	background: var(--dp-surface);
	border: 1px solid var(--dp-border);
	border-radius: var(--dp-radius);
	padding: 16px;
	grid-column: 1 / -1;
}
.dp-search-row-title { font-size: 1.05rem; margin: 0; }
.dp-search-row-type { font-size: 0.8rem; color: var(--dp-text-soft); margin: 2px 0 6px; }
.dp-search-row p:last-child { margin: 0; }

/* ============================================================= Ads */
.dp-ad {
	margin: 20px auto;
	text-align: center;
	max-width: 100%;
	overflow: hidden;
}
.dp-ad-label {
	display: block;
	font-size: 0.65rem;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: var(--dp-text-soft);
	margin-bottom: 4px;
}
.dp-ad--sidebar { margin-top: 0; }

/* ========================================================= Comments */
.dp-comments { margin-top: 32px; }
.dp-comments-title { font-size: 1.25rem; }
.dp-comment-list { list-style: none; margin: 0; padding: 0; }
.dp-comment-list .children { list-style: none; padding-inline-start: 24px; }
.dp-comment-body {
	background: var(--dp-surface-2);
	border-radius: var(--dp-radius-sm);
	padding: 14px 16px;
	margin-bottom: 12px;
}
.dp-comment-meta { display: flex; gap: 10px; align-items: center; margin-bottom: 6px; }
.dp-comment-avatar { border-radius: 50%; }
.dp-comment-author { font-weight: 700; margin-inline-end: 8px; }
.dp-comment-date { font-size: 0.78rem; color: var(--dp-text-soft); display: block; }
.dp-comment-content p:last-child { margin-bottom: 0; }
.dp-comment-pending { color: var(--dp-text-soft); font-style: italic; }
.dp-comment-reply { font-size: 0.85rem; margin-top: 6px; }
.comment-form label { display: block; font-weight: 600; margin-bottom: 4px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
	width: 100%;
	background: var(--dp-surface-2);
	color: var(--dp-text);
	border: 1px solid var(--dp-border);
	border-radius: var(--dp-radius-sm);
	padding: 10px 12px;
	margin-bottom: 12px;
}
.dp-form-stars { display: inline-flex; flex-direction: row-reverse; gap: 2px; }
.dp-form-stars input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.dp-form-stars label { font-size: 1.5rem; color: var(--dp-border); cursor: pointer; margin: 0; }
.dp-form-stars label:hover,
.dp-form-stars label:hover ~ label,
.dp-form-stars input:checked ~ label { color: var(--dp-star); }

/* ======================================================= Account screens */
.dp-account { padding-block: 32px 48px; }
.dp-account-card {
	background: var(--dp-surface);
	border: 1px solid var(--dp-border);
	border-radius: var(--dp-radius);
	box-shadow: var(--dp-shadow);
	padding: clamp(20px, 4vw, 36px);
}
.dp-account-card--form { max-width: 460px; margin: 0 auto; }
.dp-account-title { font-size: 1.5rem; margin-bottom: 4px; }
.dp-account-sub { color: var(--dp-text-soft); margin-top: 0; }

.dp-account-head {
	display: flex;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
	padding-bottom: 18px;
	border-bottom: 1px solid var(--dp-border);
}
.dp-account-avatar { border-radius: 50%; }
.dp-account-logout { margin-inline-start: auto; }
.dp-account-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

.dp-account-section { margin-top: 28px; }
.dp-account-section h2 {
	font-size: 1.1rem;
	padding-bottom: 8px;
	border-bottom: 1px solid var(--dp-border);
}

.dp-account-form p { margin: 0 0 14px; }
.dp-account-form label { display: block; font-weight: 600; margin-bottom: 5px; }
.dp-account-form input[type="text"],
.dp-account-form input[type="email"],
.dp-account-form input[type="password"] {
	width: 100%;
	background: var(--dp-surface-2);
	color: var(--dp-text);
	border: 1px solid var(--dp-border);
	border-radius: var(--dp-radius-sm);
	padding: 11px 14px;
	font-size: 1rem;
}
.dp-account-form input:focus {
	outline: none;
	border-color: var(--dp-primary);
	box-shadow: 0 0 0 3px rgba(var(--dp-primary-rgb), 0.18);
}
.dp-account-form .dp-btn { width: 100%; }
.dp-field-hint { display: block; font-size: 0.82rem; color: var(--dp-text-soft); margin-top: 4px; }
.dp-account-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	font-size: 0.9rem;
}
.dp-account-row label { font-weight: 500; margin: 0; }
.dp-account-alt { text-align: center; margin-top: 18px; color: var(--dp-text-soft); font-size: 0.92rem; }
.dp-account-mini { border-radius: 50%; display: block; }

/* ======================================================= Contact page */
.dp-contact { padding-block: 8px 32px; }
.dp-contact-title { font-size: clamp(1.5rem, 4vw, 2rem); margin-bottom: 6px; }
.dp-contact-intro { color: var(--dp-text-soft); margin-top: 0; max-width: 60ch; }

.dp-contact-form {
	background: var(--dp-surface);
	border: 1px solid var(--dp-border);
	border-radius: var(--dp-radius);
	box-shadow: var(--dp-shadow);
	padding: 24px;
	margin-top: 20px;
}
.dp-contact-form .dp-field { margin: 0 0 16px; }
.dp-contact-form label { display: block; font-weight: 600; margin-bottom: 5px; }
.dp-contact-form input[type="text"],
.dp-contact-form input[type="email"],
.dp-contact-form textarea {
	width: 100%;
	background: var(--dp-surface-2);
	color: var(--dp-text);
	border: 1px solid var(--dp-border);
	border-radius: var(--dp-radius-sm);
	padding: 11px 14px;
	font-family: inherit;
	font-size: 1rem;
	line-height: 1.5;
}
.dp-contact-form textarea { resize: vertical; min-height: 150px; }
.dp-contact-form input:focus,
.dp-contact-form textarea:focus {
	outline: none;
	border-color: var(--dp-primary);
	box-shadow: 0 0 0 3px rgba(var(--dp-primary-rgb), 0.18);
}
.dp-required { color: var(--dp-danger); }

/* The honeypot must be reachable by bots but invisible to people —
   display:none would let a careful bot skip it. */
.dp-honeypot {
	position: absolute !important;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.dp-contact-extra {
	margin-top: 22px;
	padding-top: 18px;
	border-top: 1px solid var(--dp-border);
	color: var(--dp-text-soft);
	font-size: 0.94rem;
}
.dp-contact-extra p { margin: 0 0 6px; }

@media (max-width: 600px) {
	.dp-contact-form { padding: 18px; }
}

/* Status messages */
.dp-form-notice {
	border-radius: var(--dp-radius-sm);
	padding: 12px 16px;
	margin-bottom: 20px;
	font-size: 0.94rem;
	border: 1px solid transparent;
}
.dp-form-notice--ok {
	background: rgba(var(--dp-primary-rgb), 0.1);
	border-color: rgba(var(--dp-primary-rgb), 0.35);
	color: var(--dp-primary);
}
.dp-form-notice--error {
	background: rgba(192, 57, 43, 0.08);
	border-color: rgba(192, 57, 43, 0.3);
	color: var(--dp-danger);
}

/* Honeypot — hidden from people, visible to naive bots. */
.dp-hp {
	position: absolute !important;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* ============================================================ Forms */
.dp-newsletter-form { display: flex; flex-wrap: wrap; gap: 8px; }
.dp-newsletter-form input[type="email"] {
	flex: 1 1 180px;
	background: var(--dp-surface-2);
	color: var(--dp-text);
	border: 1px solid var(--dp-border);
	border-radius: 999px;
	padding: 10px 16px;
}
.dp-form-msg { flex-basis: 100%; font-size: 0.85rem; margin: 4px 0 0; min-height: 1.2em; }
.dp-form-msg.is-error { color: var(--dp-danger); }
.dp-form-msg.is-ok { color: var(--dp-primary); }
.dp-request-form input, .dp-request-form textarea {
	width: 100%;
	background: var(--dp-surface-2);
	color: var(--dp-text);
	border: 1px solid var(--dp-border);
	border-radius: var(--dp-radius-sm);
	padding: 10px 12px;
}

/* ============================================================ Footer */
.dp-footer {
	position: relative;
	background:
		linear-gradient(180deg, rgba(var(--dp-primary-rgb), 0.04), transparent 220px),
		var(--dp-surface);
	border-top: 1px solid var(--dp-border);
	margin-top: 56px;
	padding: 44px 0 22px;
	font-size: 0.9rem;
}

/* A thin brand line across the very top edge. */
.dp-footer::before {
	content: "";
	position: absolute;
	inset-inline: 0;
	top: -1px;
	height: 3px;
	background: linear-gradient(90deg, var(--dp-primary), var(--dp-secondary) 55%, rgba(var(--dp-primary-rgb), 0.15));
}

/* Brand column first, link columns after. */
.dp-footer-top {
	display: grid;
	grid-template-columns: minmax(240px, 1.3fr) 2fr;
	gap: 40px;
	align-items: start;
	padding-bottom: 28px;
}
.dp-footer-brand .dp-site-logo img,
.dp-footer-brand .custom-logo { height: 38px; width: auto; margin-bottom: 12px; }
.dp-footer-tagline {
	color: var(--dp-text-soft);
	margin: 0 0 16px;
	max-width: 38ch;
	line-height: 1.6;
}

.dp-footer-columns {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 28px;
}
.dp-footer-col .dp-widget { background: transparent; border: 0; padding: 0; margin-bottom: 0; }

/* Widget lists in the footer are link columns, not bulleted lists —
   this beats the sidebar's .dp-widget ul indent. */
.dp-footer-col .dp-widget ul {
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 9px;
	margin: 0;
	padding: 0;
}
.dp-footer-col .dp-widget li { margin: 0; }

/* Column headings: small, spaced, with a short accent rule. */
.dp-footer-heading,
.dp-footer-col .dp-widget-title {
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	color: var(--dp-text);
	margin: 0 0 14px;
	padding-bottom: 8px;
	position: relative;
}
.dp-footer-heading::after,
.dp-footer-col .dp-widget-title::after {
	content: "";
	position: absolute;
	inset-inline-start: 0;
	bottom: 0;
	width: 26px;
	height: 2px;
	border-radius: 2px;
	background: var(--dp-primary);
}

/* Link lists stack in the columns; the legal row stays in a line. */
.dp-footer-menu {
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 9px;
	margin: 0;
	padding: 0;
}
.dp-legal-menu {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 18px;
	margin: 0;
	padding: 0;
}
.dp-legal-menu li + li { position: relative; }
.dp-legal-menu li + li::before {
	content: "";
	position: absolute;
	inset-inline-start: -10px;
	top: 50%;
	width: 3px;
	height: 3px;
	border-radius: 50%;
	background: var(--dp-border);
	transform: translateY(-50%);
}

.dp-footer a { color: var(--dp-text-soft); }
.dp-footer a:hover { color: var(--dp-primary); text-decoration: none; }

/* Links grow an underline from the start edge rather than jumping. */
.dp-footer-menu a,
.dp-legal-menu a,
.dp-copyright a {
	position: relative;
	display: inline-block;
}
.dp-footer-menu a::after,
.dp-legal-menu a::after,
.dp-copyright a::after {
	content: "";
	position: absolute;
	inset-inline-start: 0;
	bottom: -2px;
	width: 100%;
	height: 1.5px;
	border-radius: 2px;
	background: var(--dp-primary);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.22s ease;
}
[dir="rtl"] .dp-footer-menu a::after,
[dir="rtl"] .dp-legal-menu a::after,
[dir="rtl"] .dp-copyright a::after { transform-origin: right; }
.dp-footer-menu a:hover::after,
.dp-footer-menu a:focus-visible::after,
.dp-legal-menu a:hover::after,
.dp-legal-menu a:focus-visible::after,
.dp-copyright a:hover::after,
.dp-copyright a:focus-visible::after { transform: scaleX(1); }

/* Social links as pills. */
.dp-social {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
}
.dp-social a {
	display: inline-flex;
	align-items: center;
	padding: 7px 14px;
	border-radius: 999px;
	background: var(--dp-surface-2);
	border: 1px solid var(--dp-border);
	font-size: 0.83rem;
	font-weight: 500;
	transition: transform 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.dp-social a:hover {
	transform: translateY(-2px);
	border-color: rgba(var(--dp-primary-rgb), 0.5);
	color: var(--dp-primary);
}

.dp-disclaimer {
	color: var(--dp-text-soft);
	font-size: 0.79rem;
	line-height: 1.65;
	border-top: 1px solid var(--dp-border);
	padding-top: 18px;
	margin: 0 0 18px;
}

.dp-footer-bottom {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 10px 18px;
	align-items: center;
	border-top: 1px solid var(--dp-border);
	padding-top: 16px;
	font-size: 0.85rem;
}
.dp-copyright { margin: 0; color: var(--dp-text-soft); }

@media (max-width: 900px) {
	.dp-footer-top { grid-template-columns: 1fr; gap: 30px; }
}
@media (max-width: 600px) {
	.dp-footer { padding-top: 34px; }
	.dp-footer-bottom { justify-content: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
	.dp-social a,
	.dp-footer-menu a::after,
	.dp-legal-menu a::after,
	.dp-copyright a::after { transition: none; }
	.dp-social a:hover { transform: none; }
}

/* Toasts */
.dp-toast {
	position: fixed;
	bottom: 24px;
	inset-inline-start: 50%;
	transform: translateX(-50%) translateY(20px);
	background: var(--dp-text);
	color: var(--dp-bg);
	padding: 10px 20px;
	border-radius: 999px;
	font-size: 0.9rem;
	opacity: 0;
	transition: opacity 0.25s ease, transform 0.25s ease;
	z-index: 990;
	pointer-events: none;
}
[dir="rtl"] .dp-toast { transform: translateX(50%) translateY(20px); }
.dp-toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }
[dir="rtl"] .dp-toast.is-visible { transform: translateX(50%) translateY(0); }

/* ======================================================= Pagination */
.dp-pagination, .pagination { margin-block: 28px; }
.dp-pagination .nav-links, .pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	justify-content: center;
}
.page-numbers {
	display: inline-flex;
	align-items: center;
	padding: 8px 14px;
	background: var(--dp-surface);
	border: 1px solid var(--dp-border);
	border-radius: var(--dp-radius-sm);
	color: var(--dp-text);
	font-weight: 600;
	font-size: 0.9rem;
}
.page-numbers.current { background: var(--dp-primary); color: #fff; border-color: var(--dp-primary); }
.page-numbers:hover { text-decoration: none; border-color: var(--dp-primary); }

/* =============================================================== 404 */
.dp-404-hero { text-align: center; padding: 48px 0 24px; }
.dp-404-code { font-size: clamp(4rem, 15vw, 7rem); font-weight: 800; color: rgba(var(--dp-primary-rgb), 0.25); margin: 0; line-height: 1; }
.dp-404 .dp-hero-search { margin-block: 20px; }

.dp-none {
	background: var(--dp-surface);
	border: 1px dashed var(--dp-border);
	border-radius: var(--dp-radius);
	text-align: center;
	padding: 40px 20px;
	grid-column: 1 / -1;
}
.dp-loading { grid-column: 1 / -1; text-align: center; color: var(--dp-text-soft); }

/* ======================================================= WooCommerce */
.woocommerce .dp-main { padding-block: 16px; }

/* ============================================== Print: hide chrome */
@media print {
	.dp-header, .dp-footer, .dp-sticky-download, .dp-ad { display: none !important; }
}
