/*
Theme Name: El Diario de un Friki
Theme URI: https://diariodeunfriki.com/
Author: El Diario de un Friki
Description: Tema editorial mobile-first, accesible y ligero para un blog de tecnología, WordPress y cultura friki. Inspirado en la estructura y robustez de los temas oficiales de WordPress, sin dependencias externas.
Version: 1.0.2
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: diariodeunfriki
Tags: blog, one-column, two-columns, right-sidebar, custom-logo, custom-menu, featured-images, full-width-template, rtl-language-support, threaded-comments, translation-ready, block-styles, wide-blocks
*/

/* Mobile first: every layout starts from a narrow, touch-friendly base. */
:root {
	--dduf-ink: #101828;
	--dduf-ink-soft: #344054;
	--dduf-muted: #667085;
	--dduf-paper: #f6f7fb;
	--dduf-surface: #ffffff;
	--dduf-surface-soft: #eef1f6;
	--dduf-border: #dfe3eb;
	--dduf-brand: #d6004f;
	--dduf-brand-dark: #a9003e;
	--dduf-accent: #087ea4;
	--dduf-accent-soft: #e5f7fb;
	--dduf-success: #087443;
	--dduf-focus: #2563eb;
	--dduf-radius-sm: 12px;
	--dduf-radius: 20px;
	--dduf-radius-lg: 28px;
	--dduf-shadow: 0 14px 40px rgba(16, 24, 40, 0.08);
	--dduf-shadow-soft: 0 5px 18px rgba(16, 24, 40, 0.06);
	--dduf-container: 1180px;
	--dduf-reading: 720px;
	--dduf-header-height: 68px;
	--dduf-font-sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	--dduf-font-serif: Georgia, Cambria, "Times New Roman", serif;
}

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

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--dduf-header-height) + 1rem);
}

body {
	margin: 0;
	max-width: 100%;
	background: var(--dduf-paper);
	color: var(--dduf-ink);
	font-family: var(--dduf-font-sans);
	font-size: 1rem;
	line-height: 1.65;
	overflow-wrap: break-word;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

body,
button,
input,
select,
textarea {
	font-family: var(--dduf-font-sans);
}

body:not(.dduf-no-scroll) {
	overflow-x: hidden;
}

img,
picture,
svg,
video,
canvas,
iframe {
	display: block;
	max-width: 100%;
}

img,
video {
	height: auto;
}

svg {
	vertical-align: middle;
}

figure {
	margin: 0;
}

a {
	color: var(--dduf-brand-dark);
	text-decoration-thickness: 0.08em;
	text-underline-offset: 0.18em;
}

a:hover {
	color: var(--dduf-brand);
}

button,
input,
select,
textarea {
	font: inherit;
}

button,
[type="button"],
[type="reset"],
[type="submit"] {
	cursor: pointer;
}

:where(a, button, input, select, textarea, summary):focus-visible {
	border-radius: 4px;
	outline: 3px solid color-mix(in srgb, var(--dduf-focus) 65%, transparent);
	outline-offset: 3px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	margin-block: 1.35em 0.6em;
	color: var(--dduf-ink);
	font-weight: 800;
	letter-spacing: -0.025em;
	line-height: 1.16;
	text-wrap: balance;
}

h1 {
	font-size: clamp(2.2rem, 8vw, 4.9rem);
}

h2 {
	font-size: clamp(1.65rem, 5vw, 2.65rem);
}

h3 {
	font-size: clamp(1.3rem, 4vw, 1.8rem);
}

p,
ul,
ol,
dl,
blockquote,
pre,
table {
	margin-block: 0 1.2em;
}

ul,
ol {
	padding-inline-start: 1.35em;
}

blockquote {
	margin-inline: 0;
	padding: 1rem 1rem 1rem 1.2rem;
	border-inline-start: 4px solid var(--dduf-brand);
	background: var(--dduf-surface);
	border-radius: 0 var(--dduf-radius-sm) var(--dduf-radius-sm) 0;
	font-family: var(--dduf-font-serif);
	font-size: 1.08em;
}

blockquote > :last-child {
	margin-bottom: 0;
}

code,
kbd,
samp,
pre {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 0.9em;
}

:not(pre) > code {
	padding: 0.15em 0.38em;
	border-radius: 5px;
	background: var(--dduf-surface-soft);
}

pre {
	max-width: 100%;
	padding: 1rem;
	overflow-x: auto;
	border-radius: var(--dduf-radius-sm);
	background: #111827;
	color: #f9fafb;
	line-height: 1.55;
	-webkit-overflow-scrolling: touch;
}

table {
	display: block;
	width: 100%;
	max-width: 100%;
	overflow-x: auto;
	border-collapse: collapse;
	-webkit-overflow-scrolling: touch;
}

th,
td {
	padding: 0.7rem;
	border: 1px solid var(--dduf-border);
	text-align: start;
	vertical-align: top;
}

th {
	background: var(--dduf-surface-soft);
}

hr {
	height: 1px;
	margin-block: 2rem;
	border: 0;
	background: var(--dduf-border);
}

::selection {
	background: #ffd4e4;
	color: var(--dduf-ink);
}

.container {
	width: min(calc(100% - 1.5rem), var(--dduf-container));
	margin-inline: auto;
}

.narrow-container {
	width: min(calc(100% - 1.5rem), var(--dduf-reading));
	margin-inline: auto;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.skip-link {
	position: fixed;
	top: 0.75rem;
	left: 0.75rem;
	z-index: 10000;
	padding: 0.7rem 1rem;
	border-radius: 10px;
	background: var(--dduf-ink);
	color: #fff;
	font-weight: 750;
	text-decoration: none;
	transform: translateY(-180%);
	transition: transform 160ms ease;
}

.skip-link:focus {
	color: #fff;
	transform: translateY(0);
}

/* Header */
.site-header {
	position: sticky;
	top: 0;
	z-index: 900;
	background: rgba(255, 255, 255, 0.98);
	border-bottom: 1px solid rgba(223, 227, 235, 0.9);
}

.site-header::after {
	display: block;
	height: 3px;
	background: linear-gradient(90deg, var(--dduf-brand) 0 58%, var(--dduf-accent) 58% 100%);
	content: "";
}

.header-inner {
	position: relative;
	display: flex;
	align-items: center;
	gap: 0.65rem;
	min-height: var(--dduf-header-height);
}

.brand {
	display: inline-flex;
	min-height: 44px;
	align-items: center;
	gap: 0.65rem;
	min-width: 0;
	color: var(--dduf-ink);
	text-decoration: none;
}

.brand:hover {
	color: var(--dduf-ink);
}

.brand__mark {
	display: grid;
	flex: 0 0 40px;
	width: 40px;
	height: 40px;
	place-items: center;
	overflow: hidden;
	border-radius: 12px;
	background: linear-gradient(145deg, #171233, #4c0a66 55%, #d6004f);
	box-shadow: 0 6px 16px rgba(214, 0, 79, 0.2);
	color: #fff;
	font-size: 0.8rem;
	font-weight: 900;
	letter-spacing: -0.05em;
}

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

.brand__copy {
	display: grid;
	min-width: 0;
	line-height: 1.1;
}

.brand__name {
	overflow: hidden;
	font-size: 0.92rem;
	font-weight: 850;
	letter-spacing: -0.025em;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.brand__tagline {
	display: none;
	margin-top: 0.22rem;
	color: var(--dduf-muted);
	font-size: 0.7rem;
	font-weight: 650;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.header-actions {
	display: flex;
	align-items: center;
	gap: 0.35rem;
	margin-left: auto;
}

.icon-button,
.mobile-menu > summary {
	display: inline-grid;
	width: 44px;
	height: 44px;
	place-items: center;
	border: 0;
	border-radius: 12px;
	background: transparent;
	color: var(--dduf-ink);
	text-decoration: none;
}

.icon-button:hover,
.mobile-menu > summary:hover {
	background: var(--dduf-surface-soft);
	color: var(--dduf-brand-dark);
}

.icon-button svg,
.mobile-menu > summary svg {
	width: 22px;
	height: 22px;
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 2;
}

.mobile-menu {
	position: static;
}

.mobile-menu > summary {
	list-style: none;
}

.mobile-menu > summary::-webkit-details-marker {
	display: none;
}

.mobile-menu__label {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.mobile-menu__panel {
	position: absolute;
	top: 100%;
	left: -0.75rem;
	width: calc(100% + 1.5rem);
	max-height: calc(100vh - var(--dduf-header-height) - 3px);
	padding: 0.75rem;
	overflow-y: auto;
	border-bottom: 1px solid var(--dduf-border);
	background: var(--dduf-surface);
	box-shadow: var(--dduf-shadow);
}

.mobile-menu__panel .menu,
.footer-menu {
	padding: 0;
	margin: 0;
	list-style: none;
}

.mobile-menu__panel .menu li,
.footer-menu li {
	margin: 0;
}

.mobile-menu__panel .menu a {
	display: flex;
	align-items: center;
	min-height: 48px;
	padding: 0.7rem 0.8rem;
	border-radius: 10px;
	color: var(--dduf-ink);
	font-size: 0.98rem;
	font-weight: 700;
	text-decoration: none;
}

.mobile-menu__panel .menu a:hover,
.mobile-menu__panel .menu .current-menu-item > a,
.mobile-menu__panel .menu .current_page_item > a {
	background: var(--dduf-surface-soft);
	color: var(--dduf-brand-dark);
}

.mobile-menu__panel .menu .menu-item-has-children > a::after,
.footer-menu .menu-item-has-children > a::after {
	margin-left: auto;
	content: "›";
	transform: rotate(90deg);
}

.mobile-menu__panel .sub-menu,
.footer-menu .sub-menu {
	display: none;
	padding-left: 0.75rem;
}

.mobile-menu__panel li:hover > .sub-menu,
.mobile-menu__panel li:focus-within > .sub-menu {
	display: block;
}

.desktop-navigation {
	display: none;
}

/* Main layouts */
.site-main {
	min-height: 60vh;
	padding-block: 1.25rem 3.5rem;
}

.page-intro,
.archive-header {
	margin-bottom: 1.4rem;
	padding: 1.25rem;
	border: 1px solid var(--dduf-border);
	border-radius: var(--dduf-radius);
	background: var(--dduf-surface);
	box-shadow: var(--dduf-shadow-soft);
}

.page-intro h1,
.archive-header h1 {
	margin: 0 0 0.5rem;
	font-size: clamp(2rem, 7vw, 3.7rem);
}

.archive-header p,
.page-intro > p:last-child {
	margin-bottom: 0;
	color: var(--dduf-ink-soft);
}

.archive-header .taxonomy-description {
	max-width: 65ch;
	margin-top: 0.8rem;
}

.post-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 1rem;
}

.post-card {
	position: relative;
	display: flex;
	min-width: 0;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--dduf-border);
	border-radius: var(--dduf-radius);
	background: var(--dduf-surface);
	box-shadow: var(--dduf-shadow-soft);
	transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.post-card:hover {
	border-color: #c8cfdb;
	box-shadow: var(--dduf-shadow);
	transform: translateY(-2px);
}

.post-card__media {
	position: relative;
	overflow: hidden;
	aspect-ratio: 16 / 9;
	background: linear-gradient(135deg, #1d1537, #8a1047 58%, #087ea4);
}

.post-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 280ms ease;
}

.post-card:hover .post-card__media img {
	transform: scale(1.025);
}

.post-card__category::after {
	position: absolute;
	inset: -10px -8px;
	content: "";
}

.post-card__media--empty {
	display: grid;
	place-items: center;
	color: rgba(255, 255, 255, 0.88);
	font-size: 2rem;
	font-weight: 900;
	letter-spacing: -0.08em;
}

.post-card__category {
	position: absolute;
	top: 0.75rem;
	left: 0.75rem;
	z-index: 2;
	max-width: calc(100% - 1.5rem);
	padding: 0.3rem 0.58rem;
	overflow: hidden;
	border-radius: 999px;
	background: rgba(16, 24, 40, 0.9);
	color: #fff;
	font-size: 0.7rem;
	font-weight: 800;
	letter-spacing: 0.04em;
	line-height: 1.25;
	text-decoration: none;
	text-overflow: ellipsis;
	text-transform: uppercase;
	white-space: nowrap;
}

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

.post-card__title {
	margin: 0.4rem 0 0.55rem;
	font-size: clamp(1.15rem, 4vw, 1.42rem);
	line-height: 1.2;
}

.post-card__title a {
	display: inline-flex;
	min-height: 44px;
	align-items: center;
	color: var(--dduf-ink);
	text-decoration: none;
}

.post-card__title a:hover {
	color: var(--dduf-brand-dark);
}

.post-card__excerpt {
	display: -webkit-box;
	margin: 0 0 1rem;
	overflow: hidden;
	color: var(--dduf-ink-soft);
	font-size: 0.94rem;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
}

.post-card__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.8rem;
	margin-top: auto;
	color: var(--dduf-muted);
	font-size: 0.78rem;
	font-weight: 650;
}

.post-card__readmore {
	display: inline-flex;
	min-height: 44px;
	align-items: center;
	color: var(--dduf-brand-dark);
	font-weight: 800;
	text-decoration: none;
}

.post-card__readmore::after {
	content: " →";
}

.pagination {
	margin-top: 2rem;
}

.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.45rem;
}

.pagination .page-numbers {
	display: inline-grid;
	min-width: 42px;
	height: 42px;
	padding-inline: 0.6rem;
	place-items: center;
	border: 1px solid var(--dduf-border);
	border-radius: 11px;
	background: var(--dduf-surface);
	color: var(--dduf-ink);
	font-weight: 750;
	text-decoration: none;
}

.pagination .page-numbers:hover,
.pagination .page-numbers.current {
	border-color: var(--dduf-ink);
	background: var(--dduf-ink);
	color: #fff;
}

/* Home */
.home-shell {
	padding-top: 0.5rem;
}

.home-content {
	max-width: 920px;
	margin-inline: auto;
}

.home-content .wp-block-image,
.home-hero-image {
	margin: 0 0 1.2rem;
}

.home-content .wp-block-image img,
.home-hero-image img {
	width: 100%;
	max-height: 62vh;
	object-fit: cover;
	border-radius: var(--dduf-radius-lg);
	box-shadow: var(--dduf-shadow);
}

.home-intro {
	padding: 0.35rem 0.25rem 0.75rem;
	text-align: center;
}

.home-intro .eyebrow {
	margin: 0 0 0.65rem;
	color: var(--dduf-brand-dark);
	font-size: 0.76rem;
	font-weight: 850;
	letter-spacing: 0.13em;
	text-transform: uppercase;
}

.home-intro h1 {
	margin: 0;
	font-size: clamp(2.25rem, 7.2vw, 4.75rem);
}

.home-intro .home-lead {
	max-width: 720px;
	margin: 0.9rem auto 0;
	color: var(--dduf-ink-soft);
	font-size: clamp(1.05rem, 3.7vw, 1.3rem);
	line-height: 1.55;
}

.home-intro .home-copy {
	max-width: 680px;
	margin: 1rem auto 0;
}

.home-intro .wp-block-buttons {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 0.65rem;
	margin-top: 1.3rem;
}

.home-intro .wp-block-button__link,
.dduf-button {
	display: inline-flex;
	min-height: 46px;
	align-items: center;
	justify-content: center;
	padding: 0.7rem 1.1rem;
	border: 1px solid var(--dduf-brand);
	border-radius: 999px;
	background: var(--dduf-brand);
	color: #fff;
	font-weight: 800;
	line-height: 1.2;
	text-decoration: none;
	transition: background 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.home-intro .wp-block-button__link:hover,
.dduf-button:hover {
	border-color: var(--dduf-brand-dark);
	background: var(--dduf-brand-dark);
	color: #fff;
	transform: translateY(-1px);
}

.home-intro .is-style-outline .wp-block-button__link {
	border-color: var(--dduf-border);
	background: var(--dduf-surface);
	color: var(--dduf-ink);
}

.home-intro .is-style-outline .wp-block-button__link:hover {
	border-color: var(--dduf-ink);
	background: var(--dduf-ink);
	color: #fff;
}

.home-section {
	margin-top: 2.6rem;
}

.section-heading {
	display: flex;
	align-items: end;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1rem;
}

.section-heading h2 {
	margin: 0;
	font-size: clamp(1.65rem, 6vw, 2.5rem);
}

.section-heading p {
	margin: 0.25rem 0 0;
	color: var(--dduf-muted);
}

.section-heading > a {
	flex: 0 0 auto;
	color: var(--dduf-brand-dark);
	font-size: 0.86rem;
	font-weight: 800;
	text-decoration: none;
}

.topic-list {
	display: flex;
	gap: 0.55rem;
	margin: 0;
	padding: 0 0 0.4rem;
	overflow-x: auto;
	list-style: none;
	scrollbar-width: thin;
	-webkit-overflow-scrolling: touch;
}

.topic-list a {
	display: inline-flex;
	min-height: 44px;
	align-items: center;
	gap: 0.4rem;
	padding: 0.55rem 0.85rem;
	border: 1px solid var(--dduf-border);
	border-radius: 999px;
	background: var(--dduf-surface);
	color: var(--dduf-ink-soft);
	font-size: 0.86rem;
	font-weight: 750;
	text-decoration: none;
	white-space: nowrap;
}

.topic-list a:hover {
	border-color: var(--dduf-brand);
	color: var(--dduf-brand-dark);
}

.topic-list .count {
	color: var(--dduf-muted);
	font-size: 0.75rem;
}

/* Single posts and pages */
.single-shell {
	padding-top: 0.5rem;
}

.entry-header {
	max-width: 850px;
	margin-inline: auto;
	padding: 1.1rem 0 1.25rem;
	text-align: center;
}

.entry-header__category {
	display: inline-flex;
	min-height: 44px;
	align-items: center;
	margin-bottom: 0.55rem;
	color: var(--dduf-brand-dark);
	font-size: 0.76rem;
	font-weight: 850;
	letter-spacing: 0.1em;
	text-decoration: none;
	text-transform: uppercase;
}

.entry-header h1 {
	margin: 0;
	font-size: clamp(2.25rem, 8vw, 4.7rem);
}

.entry-header__excerpt {
	max-width: 700px;
	margin: 0.9rem auto 0;
	color: var(--dduf-ink-soft);
	font-size: clamp(1.02rem, 3.5vw, 1.22rem);
}

.entry-meta {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.35rem 0.8rem;
	margin-top: 0.9rem;
	color: var(--dduf-muted);
	font-size: 0.82rem;
	font-weight: 650;
}

.entry-meta > span {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
}

.entry-meta > span + span::before {
	margin-right: 0.45rem;
	color: #b0b8c5;
	content: "•";
}

.single-thumbnail {
	width: min(calc(100% - 1.5rem), 1120px);
	margin: 0 auto 1.5rem;
}

.single-thumbnail img {
	width: 100%;
	max-height: 72vh;
	object-fit: cover;
	border-radius: var(--dduf-radius-lg);
	box-shadow: var(--dduf-shadow);
}

.single-thumbnail--missing {
	display: none;
}

.entry-content,
.page-content {
	min-width: 0;
	font-size: 1.04rem;
	line-height: 1.78;
}

.entry-content > *,
.page-content > * {
	max-width: var(--dduf-reading);
	margin-inline: auto;
}

.entry-content > .alignwide,
.page-content > .alignwide,
.entry-content > .alignfull,
.page-content > .alignfull {
	max-width: min(calc(100% - 1.5rem), 1120px);
}

.entry-content > .alignfull,
.page-content > .alignfull {
	width: min(calc(100% - 1.5rem), 1320px);
}

.entry-content :where(.wp-block-image, .wp-block-gallery, .wp-block-embed, .wp-block-video),
.page-content :where(.wp-block-image, .wp-block-gallery, .wp-block-embed, .wp-block-video) {
	margin-block: 1.5rem;
}

.entry-content :where(.wp-block-image) img,
.page-content :where(.wp-block-image) img {
	width: 100%;
	border-radius: var(--dduf-radius-sm);
}

.entry-content figcaption,
.page-content figcaption {
	margin-top: 0.55rem;
	color: var(--dduf-muted);
	font-size: 0.8rem;
	text-align: center;
}

.entry-content iframe,
.page-content iframe,
.entry-content embed,
.page-content embed {
	width: 100%;
	max-width: 100%;
}

.entry-content .alignleft {
	float: left;
	max-width: min(48%, 420px);
	margin: 0.3rem 1.4rem 1rem 0;
}

.entry-content .alignright {
	float: right;
	max-width: min(48%, 420px);
	margin: 0.3rem 0 1rem 1.4rem;
}

.entry-content .aligncenter {
	margin-inline: auto;
}

.entry-footer {
	max-width: var(--dduf-reading);
	margin: 2rem auto 0;
	padding-top: 1.25rem;
	border-top: 1px solid var(--dduf-border);
}

.post-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
	margin-top: 0.8rem;
}

.post-tags a {
	display: inline-flex;
	min-height: 44px;
	align-items: center;
	padding: 0.3rem 0.6rem;
	border-radius: 999px;
	background: var(--dduf-surface-soft);
	color: var(--dduf-ink-soft);
	font-size: 0.78rem;
	font-weight: 700;
	text-decoration: none;
}

.post-navigation {
	margin-top: 2rem;
}

.post-navigation .nav-links {
	display: grid;
	gap: 0.8rem;
}

.post-navigation a {
	display: block;
	min-height: 92px;
	padding: 1rem;
	border: 1px solid var(--dduf-border);
	border-radius: var(--dduf-radius);
	background: var(--dduf-surface);
	box-shadow: var(--dduf-shadow-soft);
	color: var(--dduf-ink);
	text-decoration: none;
}

.post-navigation a:hover {
	border-color: #c8cfdb;
	color: var(--dduf-brand-dark);
}

.post-navigation .nav-label {
	display: block;
	margin-bottom: 0.3rem;
	color: var(--dduf-muted);
	font-size: 0.7rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.post-navigation .nav-next {
	text-align: right;
}

.related-posts {
	margin-top: 3rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--dduf-border);
}

.related-posts > h2 {
	margin-bottom: 1rem;
	font-size: clamp(1.45rem, 5vw, 2rem);
}

/* Search and empty states */
.search-form {
	display: flex;
	gap: 0.55rem;
	max-width: 620px;
	margin: 0 auto;
}

.search-form label {
	flex: 1;
}

.search-form .search-field,
.search-input,
input[type="search"],
input[type="email"],
input[type="text"],
input[type="url"],
input[type="tel"],
input[type="number"],
textarea,
select {
	width: 100%;
	min-height: 46px;
	padding: 0.65rem 0.8rem;
	border: 1px solid #cbd2de;
	border-radius: 11px;
	background: var(--dduf-surface);
	color: var(--dduf-ink);
	line-height: 1.4;
}

textarea {
	min-height: 140px;
	resize: vertical;
}

.search-form .search-submit,
.dduf-button--dark {
	min-height: 46px;
	padding: 0.65rem 1rem;
	border: 1px solid var(--dduf-ink);
	border-radius: 11px;
	background: var(--dduf-ink);
	color: #fff;
	font-weight: 800;
}

.no-results,
.error-404 {
	padding: 2.5rem 1.2rem;
	border: 1px solid var(--dduf-border);
	border-radius: var(--dduf-radius);
	background: var(--dduf-surface);
	text-align: center;
}

.no-results h2,
.error-404 h1 {
	margin-top: 0;
}

.no-results .search-form {
	margin-block: 1.2rem;
}

.error-shell {
	padding-bottom: 4.5rem;
}

.error-404--orbit {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	padding: 0;
	border: 0;
	background: linear-gradient(135deg, #090d1b 0%, #17102e 55%, #082c3c 100%);
	box-shadow: 0 20px 55px rgba(16, 24, 40, 0.16);
	color: #fff;
	text-align: left;
}

.error-404--orbit::before,
.error-404--orbit::after {
	position: absolute;
	z-index: -1;
	border-radius: 999px;
	content: "";
	pointer-events: none;
}

.error-404--orbit::before {
	top: -8rem;
	right: -5rem;
	width: 18rem;
	height: 18rem;
	background: rgba(214, 0, 79, 0.26);
	filter: blur(12px);
}

.error-404--orbit::after {
	bottom: -10rem;
	left: -6rem;
	width: 20rem;
	height: 20rem;
	background: rgba(8, 126, 164, 0.24);
	filter: blur(18px);
}

.error-404__art {
	position: absolute;
	inset: 0;
	z-index: -1;
	opacity: 0.82;
	pointer-events: none;
}

.error-404__art svg {
	width: 100%;
	height: 100%;
}

.error-404__content {
	position: relative;
	z-index: 1;
	max-width: 650px;
	padding: 2rem 1.2rem 2.25rem;
}

.error-404__eyebrow,
.error-404__section-kicker {
	margin: 0 0 0.65rem;
	color: #ff8ab7;
	font-size: 0.75rem;
	font-weight: 850;
	letter-spacing: 0.13em;
	text-transform: uppercase;
}

.error-404--orbit h1 {
	max-width: 11ch;
	margin: 0;
	color: #fff;
	font-size: clamp(2.35rem, 9vw, 5.4rem);
	line-height: 0.98;
}

.error-404__lead {
	max-width: 48ch;
	margin: 1rem 0 0;
	color: #c4cede;
	font-size: clamp(1rem, 3.5vw, 1.18rem);
}

.error-404__actions {
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
	margin-top: 1.4rem;
}

.error-404__actions .dduf-button {
	width: 100%;
}

.error-404__search-link {
	border-color: rgba(255, 255, 255, 0.42);
	background: transparent;
	color: #fff;
}

.error-404__search-link:hover {
	border-color: #fff;
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
}

.error-404__search {
	max-width: 560px;
	margin-top: 1.5rem;
	padding: 0.8rem;
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: 15px;
	background: rgba(255, 255, 255, 0.1);
	backdrop-filter: blur(8px);
}

.error-404__search .search-form {
	margin: 0;
}

.error-404__search input[type="search"] {
	border-color: rgba(255, 255, 255, 0.35);
	background: rgba(255, 255, 255, 0.95);
}

.error-404__search .search-submit {
	border-color: #fff;
	background: #fff;
	color: #11101d;
}

.error-404__radar {
	margin-top: 2.6rem;
}

.error-404__radar .error-404__section-kicker {
	margin-bottom: 0.35rem;
	color: var(--dduf-brand-dark);
}

.error-404__radar .section-heading h2 {
	margin-top: 0;
}

@media (min-width: 600px) {
	.error-404__content {
		padding: 3.5rem 3rem 3.75rem;
	}

	.error-404__actions {
		flex-direction: row;
	}

	.error-404__actions .dduf-button {
		width: auto;
	}
}

@media (min-width: 1080px) {
	.error-404__content {
		padding: 4.5rem 4rem 4.75rem;
	}
}

/* Contact Form 7 */
.wpcf7 {
	max-width: 680px;
	margin-inline: auto;
}

.wpcf7-form {
	display: grid;
	gap: 0.85rem;
}

.wpcf7-form p {
	margin: 0;
}

.wpcf7-form label {
	display: block;
	margin-bottom: 0.35rem;
	font-size: 0.86rem;
	font-weight: 750;
}

.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 input[type="url"],
.wpcf7 input[type="number"],
.wpcf7 textarea,
.wpcf7 select {
	width: 100%;
	min-height: 48px;
	padding: 0.7rem 0.8rem;
	border: 1px solid #cbd2de;
	border-radius: 11px;
	background: #fff;
}

.wpcf7 textarea {
	min-height: 170px;
}

.wpcf7 input[type="submit"] {
	min-height: 48px;
	padding: 0.7rem 1.2rem;
	border: 0;
	border-radius: 999px;
	background: var(--dduf-brand);
	color: #fff;
	font-weight: 800;
}

.wpcf7 input[type="submit"]:hover {
	background: var(--dduf-brand-dark);
}

.wpcf7-not-valid-tip {
	color: #b42318;
	font-size: 0.75rem;
}

.wpcf7 form.invalid .wpcf7-not-valid-tip,
.wpcf7 form.unaccepted .wpcf7-not-valid-tip,
.wpcf7 form.failed .wpcf7-not-valid-tip {
	border: 1px solid #fda29b;
	background: #fef3f2;
}

.wpcf7 form.sent .wpcf7-response-output,
.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.failed .wpcf7-response-output,
.wpcf7 form.unaccepted .wpcf7-response-output {
	margin-top: 0.8rem;
	padding: 0.8rem;
	border: 1px solid #b8dfc8;
	border-radius: 10px;
	background: #ecfdf3;
	color: var(--dduf-success);
	font-weight: 700;
}

.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.failed .wpcf7-response-output,
.wpcf7 form.unaccepted .wpcf7-response-output {
	border-color: #fda29b;
	background: #fef3f2;
	color: #b42318;
}

.dduf-ad {
	display: block;
	min-height: 90px;
	margin-block: 1.5rem;
}

/* Comments */
.comments-area {
	max-width: var(--dduf-reading);
	margin: 3rem auto 0;
	padding-top: 1.5rem;
	border-top: 1px solid var(--dduf-border);
}

.comments-title,
.comment-reply-title {
	font-size: clamp(1.45rem, 5vw, 2rem);
}

.comment-list {
	padding: 0;
	margin: 0;
	list-style: none;
}

.comment-list .children {
	padding-left: clamp(0.6rem, 4vw, 1.4rem);
	border-inline-start: 2px solid var(--dduf-border);
	list-style: none;
}

.comment-body {
	margin-block: 0 1rem;
	padding: 1rem;
	border: 1px solid var(--dduf-border);
	border-radius: var(--dduf-radius-sm);
	background: var(--dduf-surface);
}

.comment-author {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	font-weight: 800;
}

.comment-author img {
	border-radius: 50%;
}

.comment-metadata,
.reply {
	font-size: 0.78rem;
}

.comment-metadata a,
.reply a {
	color: var(--dduf-muted);
}

.comment-form {
	margin-top: 1.5rem;
}

.dduf-comment-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
}

/* Footer */
.site-footer {
	padding-block: 2.2rem;
	background: #11101d;
	color: #d7d9e2;
}

.dduf-has-consent .site-footer {
	padding-bottom: 6.5rem;
}

.footer-grid {
	display: grid;
	gap: 1.5rem;
}

.footer-brand__lockup {
	display: flex;
	align-items: center;
	gap: 0.65rem;
}

.footer-brand__mark {
	display: grid;
	width: 38px;
	height: 38px;
	flex: 0 0 38px;
	place-items: center;
	overflow: hidden;
	border: 1px solid rgba(255, 255, 255, 0.16);
	border-radius: 11px;
	background: #1b1535;
	color: #fff;
	font-size: 0.75rem;
	font-weight: 900;
}

.footer-brand__mark img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.footer-brand__name {
	margin: 0 0 0.4rem;
	color: #fff;
	font-size: 1.2rem;
}

.footer-brand p {
	max-width: 42ch;
	margin: 0;
	color: #aeb4c2;
}

.footer-heading {
	margin: 0 0 0.75rem;
	color: #fff;
	font-size: 0.78rem;
	font-weight: 850;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.footer-menu a {
	display: inline-flex;
	min-height: 44px;
	align-items: center;
	color: #c7cbd6;
	font-size: 0.9rem;
	text-decoration: none;
}

.footer-menu a:hover {
	color: #fff;
}

.footer-rss {
	display: inline-flex;
	min-height: 44px;
	align-items: center;
	gap: 0.35rem;
	margin-top: 0.65rem;
	color: #ff8ab7;
	font-size: 0.82rem;
	font-weight: 750;
	text-decoration: none;
}

.footer-rss:hover {
	color: #fff;
}

.footer-latest__list {
	padding: 0;
	margin: 0;
	list-style: none;
}

.footer-latest__list li {
	margin: 0;
	border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.footer-latest__list li:last-child {
	border-bottom: 0;
}

.footer-latest__list a {
	display: flex;
	min-height: 44px;
	align-items: center;
	padding-block: 0.35rem;
	color: #c7cbd6;
	font-size: 0.86rem;
	font-weight: 650;
	line-height: 1.35;
	text-decoration: none;
}

.footer-latest__list a:hover {
	color: #fff;
}

.footer-bottom {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	margin-top: 1.6rem;
	padding-top: 1.2rem;
	border-top: 1px solid rgba(255, 255, 255, 0.12);
	color: #9299a8;
	font-size: 0.78rem;
}

.footer-bottom p {
	margin: 0;
}

.footer-bottom .cookie-preferences {
	align-self: flex-start;
	margin-left: 0;
}

/* Consent banner */
.consent-banner {
	position: fixed;
	right: 0.75rem;
	bottom: 0.75rem;
	left: 0.75rem;
	z-index: 1000;
	padding: 1rem;
	border: 1px solid #cfd5df;
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 18px 55px rgba(16, 24, 40, 0.22);
}

.consent-banner[hidden] {
	display: none;
}

.consent-banner p {
	margin: 0;
	color: var(--dduf-ink-soft);
	font-size: 0.84rem;
	line-height: 1.5;
}

.consent-banner__actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.55rem;
	margin-top: 0.8rem;
}

.consent-banner button {
	min-height: 44px;
	padding: 0.55rem 0.8rem;
	border: 1px solid var(--dduf-border);
	border-radius: 10px;
	background: #fff;
	color: var(--dduf-ink);
	font-size: 0.82rem;
	font-weight: 800;
}

.consent-banner button[data-consent="accepted"] {
	border-color: var(--dduf-brand);
	background: var(--dduf-brand);
	color: #fff;
}

.cookie-preferences {
	padding: 0;
	border: 0;
	background: transparent;
	color: #aeb4c2;
	font-size: 0.78rem;
	text-decoration: underline;
	text-underline-offset: 0.18em;
}

.cookie-preferences:hover {
	color: #fff;
}

/* Tablet */
@media (min-width: 600px) {
	:root {
		--dduf-header-height: 74px;
	}

	.container,
	.narrow-container {
		width: min(calc(100% - 3rem), var(--dduf-container));
	}

	.brand__tagline {
		display: block;
	}

	.post-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 1.15rem;
	}

	.post-card__body {
		padding: 1.2rem;
	}

	.single-thumbnail,
	.entry-content > .alignwide,
	.page-content > .alignwide {
		width: min(calc(100% - 3rem), 1120px);
	}

	.home-intro .wp-block-buttons {
		flex-direction: row;
		justify-content: center;
	}

	.post-navigation .nav-links {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.post-navigation .nav-next {
		text-align: left;
	}

	.footer-grid {
		grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
	}

	.consent-banner {
		right: 1rem;
		bottom: 1rem;
		left: auto;
		width: min(430px, calc(100% - 2rem));
	}
}

/* Desktop */
@media (min-width: 1080px) {
	.brand__mark {
		width: 44px;
		height: 44px;
		flex-basis: 44px;
	}

	.brand__name {
		font-size: 1rem;
	}

	.mobile-menu {
		display: none;
	}

	.desktop-navigation {
		display: block;
		margin-left: auto;
	}

	.desktop-navigation ul {
		display: flex;
		align-items: center;
		gap: 0.1rem;
		padding: 0;
		margin: 0;
		list-style: none;
	}

	.desktop-navigation li {
		position: relative;
		margin: 0;
	}

	.desktop-navigation a {
		display: flex;
		min-height: 44px;
		align-items: center;
		padding: 0.55rem 0.62rem;
		border-radius: 9px;
		color: var(--dduf-ink-soft);
		font-size: 0.8rem;
		font-weight: 750;
		text-decoration: none;
	}

	.desktop-navigation a:hover,
	.desktop-navigation .current-menu-item > a,
	.desktop-navigation .current_page_item > a {
		background: var(--dduf-surface-soft);
		color: var(--dduf-brand-dark);
	}

	.desktop-navigation .sub-menu {
		position: absolute;
		top: calc(100% + 0.4rem);
		left: 0;
		display: none;
		min-width: 210px;
		padding: 0.45rem;
		border: 1px solid var(--dduf-border);
		border-radius: 12px;
		background: #fff;
		box-shadow: var(--dduf-shadow);
		list-style: none;
	}

	.desktop-navigation li:hover > .sub-menu,
	.desktop-navigation li:focus-within > .sub-menu {
		display: block;
	}

	.header-actions {
		margin-left: 0.4rem;
	}

	.site-main {
		padding-block: 2rem 5rem;
	}

	.page-intro,
	.archive-header {
		margin-bottom: 2rem;
		padding: 2rem;
	}

	.post-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 1.35rem;
	}

	.topic-list {
		flex-wrap: wrap;
		overflow: visible;
	}

	.home-section {
		margin-top: 4rem;
	}

	.single-shell {
		padding-top: 1rem;
	}

	.entry-header {
		padding-block: 2.4rem 2rem;
	}

	.entry-content,
	.page-content {
		font-size: 1.08rem;
	}

	.footer-grid {
		grid-template-columns: minmax(0, 1.35fr) repeat(3, minmax(0, 1fr));
		gap: 2.5rem;
	}

	.footer-bottom {
		flex-direction: row;
		justify-content: space-between;
	}

	.footer-bottom .cookie-preferences {
		align-self: center;
		margin-left: auto;
	}
}

@media (min-width: 1180px) {
	.desktop-navigation a {
		padding-inline: 0.78rem;
	}
}

@media (min-width: 782px) {
	.admin-bar .site-header {
		top: 32px;
	}
}

@media (max-width: 781px) {
	.admin-bar .site-header {
		top: 46px;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
	}
}

@media print {
	.site-header,
	.site-footer,
	.post-navigation,
	.related-posts,
	.consent-banner,
	.pagination {
		display: none !important;
	}

	body {
		background: #fff;
		color: #000;
		font-size: 12pt;
	}

	.site-main {
		padding: 0;
	}

	a {
		color: #000;
		text-decoration: underline;
	}

	.entry-content a[href^="http"]::after {
		content: " (" attr(href) ")";
		font-size: 0.8em;
		word-break: break-all;
	}
}
