/*
Theme Name: Ainoa Media Journal – AdSense Ready
Theme URI: https://ainoamedia.fi/
Author: Ainoa Media
Author URI: https://ainoamedia.fi/
Description: A fast editorial WordPress theme with policy-conscious AdSense placements, clearly labelled ad areas, strong Core Web Vitals foundations, native blog templates and Elementor compatibility.
Version: 2.0.0
Update URI: https://ainoamedia.fi/themes/ainoa-media-journal
Requires at least: 6.4
Tested up to: 7.0
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: ainoa-media-journal
Tags: blog, news, magazine, one-column, two-columns, right-sidebar, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, block-styles, wide-blocks
*/

:root {
  --np-bg: #f7f8fb;
  --np-surface: #ffffff;
  --np-text: #15171a;
  --np-muted: #69707a;
  --np-border: #e6e8ec;
  --np-primary: #1d4ed8;
  --np-primary-dark: #163ea8;
  --np-accent: #f59e0b;
  --np-success: #059669;
  --np-radius-sm: 10px;
  --np-radius: 18px;
  --np-radius-lg: 28px;
  --np-shadow: 0 12px 36px rgba(21, 23, 26, .08);
  --np-container: 1180px;
  --np-content: 760px;
  --np-header-height: 74px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--np-bg);
  color: var(--np-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; vertical-align: middle; }
a { color: var(--np-primary); text-decoration-thickness: .08em; text-underline-offset: .18em; }
a:hover { color: var(--np-primary-dark); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid rgba(37, 99, 235, .35); outline-offset: 3px; }

.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;
}
.screen-reader-text:focus {
  position: fixed !important; left: 16px; top: 16px; width: auto; height: auto; padding: 12px 18px;
  clip: auto; background: var(--np-surface); color: var(--np-text); z-index: 100000; border-radius: 8px;
}

.np-container { width: min(calc(100% - 36px), var(--np-container)); margin-inline: auto; }
.np-narrow { width: min(calc(100% - 36px), var(--np-content)); margin-inline: auto; }
.np-section { padding: 72px 0; }
.np-section--compact { padding: 44px 0; }
.np-kicker {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 12px; color: var(--np-primary);
  font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
}
.np-kicker::before { content: ""; width: 24px; height: 3px; border-radius: 99px; background: currentColor; }
.np-section-title { margin: 0; font-size: clamp(1.75rem, 3vw, 2.55rem); line-height: 1.15; letter-spacing: -.04em; }
.np-section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 28px; }
.np-section-head p { max-width: 620px; margin: 10px 0 0; color: var(--np-muted); }

/* Header */
.np-site-header {
  position: sticky; top: 0; z-index: 999; min-height: var(--np-header-height);
  background: rgba(255,255,255,.9); border-bottom: 1px solid rgba(230,232,236,.9);
  backdrop-filter: saturate(170%) blur(14px); -webkit-backdrop-filter: saturate(170%) blur(14px);
}
.admin-bar .np-site-header { top: 32px; }
.np-header-inner { min-height: var(--np-header-height); display: flex; align-items: center; gap: 28px; }
.np-brand { display: flex; align-items: center; flex: 0 0 auto; min-width: 150px; }
.np-brand .custom-logo-link { display: inline-flex; }
.np-brand .custom-logo { max-height: 42px; width: auto; }
.np-site-title { margin: 0; font-size: 1.35rem; line-height: 1; letter-spacing: -.04em; font-weight: 900; }
.np-site-title a { color: var(--np-text); text-decoration: none; }
.np-site-description { margin: 6px 0 0; color: var(--np-muted); font-size: .78rem; line-height: 1.2; }
.np-nav { margin-left: auto; }
.np-menu, .np-menu ul { margin: 0; padding: 0; list-style: none; }
.np-menu { display: flex; align-items: center; gap: 6px; }
.np-menu > li { position: relative; }
.np-menu a { display: flex; align-items: center; min-height: 44px; padding: 8px 12px; color: var(--np-text); font-size: .94rem; font-weight: 700; text-decoration: none; border-radius: 10px; }
.np-menu a:hover, .np-menu .current-menu-item > a, .np-menu .current_page_item > a { background: #eef3ff; color: var(--np-primary); }
.np-menu .sub-menu {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 220px; padding: 8px; opacity: 0; visibility: hidden;
  transform: translateY(8px); background: var(--np-surface); border: 1px solid var(--np-border); border-radius: 14px; box-shadow: var(--np-shadow); transition: .2s ease;
}
.np-menu li:hover > .sub-menu, .np-menu li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.np-menu .sub-menu a { min-height: 40px; }
.np-header-actions { display: flex; align-items: center; gap: 8px; }
.np-icon-btn {
  width: 42px; height: 42px; display: inline-grid; place-items: center; border: 1px solid var(--np-border);
  border-radius: 12px; background: var(--np-surface); color: var(--np-text);
}
.np-icon-btn:hover { border-color: #cbd6f4; color: var(--np-primary); }
.np-icon-btn svg { width: 20px; height: 20px; }
.np-menu-toggle { display: none; }

/* Search overlay */
.np-search-panel {
  position: fixed; inset: 0; z-index: 2000; display: grid; place-items: start center; padding-top: min(18vh, 160px);
  background: rgba(10, 15, 25, .76); opacity: 0; visibility: hidden; transition: .2s ease;
}
.np-search-panel.is-open { opacity: 1; visibility: visible; }
.np-search-box { width: min(calc(100% - 32px), 680px); padding: 28px; background: var(--np-surface); border-radius: 22px; box-shadow: 0 24px 80px rgba(0,0,0,.25); }
.np-search-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.np-search-top strong { font-size: 1.2rem; }
.search-form { display: flex; gap: 10px; }
.search-form label { flex: 1; }
.search-field { width: 100%; min-height: 50px; padding: 12px 16px; border: 1px solid var(--np-border); border-radius: 12px; background: #fff; }
.search-submit, .np-button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 20px;
  border: 0; border-radius: 12px; background: var(--np-primary); color: #fff; font-weight: 800; text-decoration: none;
  box-shadow: 0 8px 20px rgba(37, 99, 235, .22); transition: transform .18s ease, background .18s ease;
}
.search-submit:hover, .np-button:hover { transform: translateY(-1px); background: var(--np-primary-dark); color: #fff; }
.np-button--ghost { background: transparent; color: var(--np-text); border: 1px solid var(--np-border); box-shadow: none; }
.np-button--ghost:hover { background: #f2f5fb; color: var(--np-primary); }

/* Hero */
.np-hero { position: relative; overflow: hidden; padding: 70px 0 48px; background: linear-gradient(145deg, #f8fbff 0%, #edf3ff 55%, #fff7e6 120%); }
.np-hero::before, .np-hero::after { content: ""; position: absolute; border-radius: 999px; filter: blur(1px); pointer-events: none; }
.np-hero::before { width: 300px; height: 300px; top: -160px; right: 6%; background: rgba(37, 99, 235, .09); }
.np-hero::after { width: 220px; height: 220px; bottom: -130px; left: 3%; background: rgba(245, 158, 11, .1); }
.np-hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(360px, .9fr); gap: 54px; align-items: center; }
.np-hero-copy h1 { max-width: 760px; margin: 0; font-size: clamp(2.55rem, 5.3vw, 5.15rem); line-height: .98; letter-spacing: -.065em; }
.np-hero-copy > p { max-width: 650px; margin: 24px 0 0; color: #4d5663; font-size: clamp(1.02rem, 1.7vw, 1.2rem); }
.np-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.np-trust-row { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 28px; color: var(--np-muted); font-size: .86rem; font-weight: 650; }
.np-trust-row span { display: inline-flex; align-items: center; gap: 7px; }
.np-trust-row svg { width: 17px; height: 17px; color: var(--np-success); }
.np-featured-card { position: relative; overflow: hidden; min-height: 500px; display: flex; align-items: end; border-radius: var(--np-radius-lg); box-shadow: 0 28px 70px rgba(25, 43, 84, .18); background: #172033; }
.np-featured-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.np-featured-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(7,10,20,.94), rgba(7,10,20,.08) 65%); }
.np-featured-card-content { position: relative; z-index: 1; padding: 32px; color: #fff; }
.np-featured-card h2 { margin: 10px 0 12px; font-size: clamp(1.65rem, 3vw, 2.35rem); line-height: 1.08; letter-spacing: -.035em; }
.np-featured-card h2 a { color: #fff; text-decoration: none; }
.np-featured-card .np-meta { color: rgba(255,255,255,.72); }
.np-category-pill { display: inline-flex; align-items: center; min-height: 28px; padding: 5px 10px; border-radius: 99px; background: var(--np-primary); color: #fff; font-size: .72rem; font-weight: 850; text-decoration: none; text-transform: uppercase; letter-spacing: .06em; }
.np-category-pill:hover { background: var(--np-primary-dark); color: #fff; }

/* Post cards */
.np-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.np-card { overflow: hidden; background: var(--np-surface); border: 1px solid var(--np-border); border-radius: var(--np-radius); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.np-card:hover { transform: translateY(-4px); border-color: #d4daf0; box-shadow: var(--np-shadow); }
.np-card-media { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: linear-gradient(135deg, #dbeafe, #ede9fe); }
.np-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.np-card:hover .np-card-media img { transform: scale(1.035); }
.np-card-media .np-category-pill { position: absolute; left: 16px; bottom: 14px; z-index: 2; }
.np-card-body { padding: 22px; }
.np-card-title { margin: 0 0 12px; font-size: 1.28rem; line-height: 1.28; letter-spacing: -.025em; }
.np-card-title a { color: var(--np-text); text-decoration: none; }
.np-card-title a:hover { color: var(--np-primary); }
.np-card-excerpt { margin: 0 0 18px; color: var(--np-muted); font-size: .94rem; }
.np-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 14px; color: var(--np-muted); font-size: .79rem; font-weight: 650; }
.np-meta a { color: inherit; text-decoration: none; }
.np-meta a:hover { color: var(--np-primary); }
.np-meta-item { display: inline-flex; align-items: center; gap: 6px; }
.np-meta svg { width: 15px; height: 15px; }

/* Category strip */
.np-category-strip { padding: 22px 0; background: var(--np-surface); border-top: 1px solid var(--np-border); border-bottom: 1px solid var(--np-border); }
.np-category-list { display: flex; gap: 10px; overflow-x: auto; padding: 2px 0 8px; scrollbar-width: thin; }
.np-category-list a { flex: 0 0 auto; padding: 9px 14px; border: 1px solid var(--np-border); border-radius: 99px; color: var(--np-text); font-size: .86rem; font-weight: 750; text-decoration: none; background: #fff; }
.np-category-list a:hover { border-color: var(--np-primary); color: var(--np-primary); background: #f6f9ff; }
.np-category-list .count { color: var(--np-muted); font-size: .72rem; }

/* Layout and sidebar */
.np-content-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 42px; align-items: start; }
.np-main { min-width: 0; }
.np-sidebar { position: sticky; top: calc(var(--np-header-height) + 24px); }
.admin-bar .np-sidebar { top: calc(var(--np-header-height) + 56px); }
.widget { margin-bottom: 22px; padding: 24px; background: var(--np-surface); border: 1px solid var(--np-border); border-radius: var(--np-radius); }
.widget-title { margin: 0 0 18px; font-size: 1.08rem; line-height: 1.3; letter-spacing: -.02em; }
.widget ul { margin: 0; padding: 0; list-style: none; }
.widget li + li { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--np-border); }
.widget a { color: var(--np-text); text-decoration: none; }
.widget a:hover { color: var(--np-primary); }
.tagcloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tagcloud a { padding: 6px 10px; border: 1px solid var(--np-border); border-radius: 8px; font-size: .78rem !important; }

/* Archive */
.np-page-header { padding: 54px 0 34px; background: var(--np-surface); border-bottom: 1px solid var(--np-border); }
.np-page-header h1 { margin: 0; font-size: clamp(2rem, 4vw, 3.65rem); line-height: 1.05; letter-spacing: -.055em; }
.np-page-header p, .archive-description { max-width: 720px; margin: 14px 0 0; color: var(--np-muted); }
.np-post-list { display: grid; gap: 22px; }
.np-card--horizontal { display: grid; grid-template-columns: 280px minmax(0, 1fr); }
.np-card--horizontal .np-card-media { aspect-ratio: auto; min-height: 220px; }
.np-card--horizontal .np-card-body { display: flex; flex-direction: column; justify-content: center; }
.navigation.pagination { margin-top: 36px; }
.nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.page-numbers { min-width: 42px; min-height: 42px; display: inline-grid; place-items: center; padding: 6px 12px; border: 1px solid var(--np-border); border-radius: 10px; background: #fff; color: var(--np-text); font-weight: 750; text-decoration: none; }
.page-numbers.current, .page-numbers:hover { background: var(--np-primary); border-color: var(--np-primary); color: #fff; }

/* Single */
.np-single-header { padding: 58px 0 32px; background: var(--np-surface); }
.np-single-header h1 { max-width: 980px; margin: 14px 0 18px; font-size: clamp(2.35rem, 5vw, 4.7rem); line-height: 1.04; letter-spacing: -.06em; }
.np-single-header .np-meta { font-size: .88rem; }
.np-single-hero { width: min(calc(100% - 36px), 1180px); margin: 0 auto 44px; overflow: hidden; border-radius: var(--np-radius-lg); background: #e9edf5; }
.np-single-hero img { width: 100%; max-height: 680px; object-fit: cover; }
.np-article-layout { display: grid; grid-template-columns: minmax(0, 760px) 280px; justify-content: center; gap: 54px; align-items: start; }
.np-entry-content { min-width: 0; font-size: 1.08rem; }
.np-entry-content > * { margin-top: 0; margin-bottom: 1.4em; }
.np-entry-content h2, .np-entry-content h3, .np-entry-content h4 { margin-top: 1.8em; margin-bottom: .65em; line-height: 1.2; letter-spacing: -.035em; scroll-margin-top: 105px; }
.np-entry-content h2 { font-size: clamp(1.65rem, 3vw, 2.35rem); }
.np-entry-content h3 { font-size: clamp(1.35rem, 2.3vw, 1.8rem); }
.np-entry-content p { overflow-wrap: break-word; }
.np-entry-content a { font-weight: 650; }
.np-entry-content blockquote { margin-inline: 0; padding: 22px 26px; border-left: 4px solid var(--np-primary); border-radius: 0 14px 14px 0; background: #eef4ff; color: #27334a; font-size: 1.12em; }
.np-entry-content pre { overflow: auto; padding: 20px; border-radius: 14px; background: #111827; color: #e5e7eb; font-size: .9rem; }
.np-entry-content code { padding: .15em .35em; border-radius: 5px; background: #eef0f4; font-size: .9em; }
.np-entry-content pre code { padding: 0; background: transparent; }
.np-entry-content table { width: 100%; border-collapse: collapse; font-size: .94rem; }
.np-entry-content th, .np-entry-content td { padding: 12px; border: 1px solid var(--np-border); text-align: left; }
.np-entry-content th { background: #f3f5f8; }
.np-entry-content figure { max-width: 100%; }
.np-entry-content .alignwide { width: min(100vw - 36px, 1050px); max-width: none; margin-left: 50%; transform: translateX(-50%); }
.np-entry-content .alignfull { width: 100vw; max-width: none; margin-left: 50%; transform: translateX(-50%); }
.np-article-aside { position: sticky; top: calc(var(--np-header-height) + 24px); }
.admin-bar .np-article-aside { top: calc(var(--np-header-height) + 56px); }
.np-share, .np-author-box, .np-post-nav, .comments-area { padding: 24px; background: var(--np-surface); border: 1px solid var(--np-border); border-radius: var(--np-radius); }
.np-share h3 { margin: 0 0 14px; font-size: .95rem; }
.np-share-links { display: flex; flex-wrap: wrap; gap: 8px; }
.np-share-links a { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--np-border); border-radius: 10px; color: var(--np-text); text-decoration: none; }
.np-share-links a:hover { border-color: var(--np-primary); color: var(--np-primary); }
.np-share-links svg { width: 18px; height: 18px; }
.np-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 34px; }
.np-tags a { padding: 7px 11px; border: 1px solid var(--np-border); border-radius: 8px; color: var(--np-muted); font-size: .8rem; font-weight: 700; text-decoration: none; }
.np-author-box { display: grid; grid-template-columns: 72px 1fr; gap: 18px; margin-top: 34px; }
.np-author-box img { border-radius: 50%; }
.np-author-box h3 { margin: 0 0 6px; }
.np-author-box p { margin: 0; color: var(--np-muted); font-size: .92rem; }
.np-post-nav { margin-top: 22px; }
.post-navigation .nav-links { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.post-navigation a { color: var(--np-text); text-decoration: none; font-weight: 750; }
.post-navigation .nav-subtitle { display: block; margin-bottom: 4px; color: var(--np-muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; }
.post-navigation .nav-next { text-align: right; }
.comments-area { margin-top: 22px; }
.comments-title { margin-top: 0; }
.comment-list { list-style: none; padding: 0; }
.comment-body { margin-bottom: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--np-border); }
.comment-meta { font-size: .85rem; }
.comment-author img { border-radius: 50%; margin-right: 8px; }
.comment-form input:not([type="checkbox"]):not([type="submit"]), .comment-form textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--np-border); border-radius: 10px; background: #fff; }
.form-submit .submit { min-height: 46px; padding: 10px 18px; border: 0; border-radius: 10px; background: var(--np-primary); color: #fff; font-weight: 800; }

/* Newsletter */
.np-newsletter { overflow: hidden; position: relative; padding: 44px; border-radius: var(--np-radius-lg); background: #111a2e; color: #fff; }
.np-newsletter::after { content: ""; position: absolute; width: 250px; height: 250px; right: -80px; top: -100px; border-radius: 50%; background: rgba(37,99,235,.35); }
.np-newsletter-inner { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: center; gap: 36px; }
.np-newsletter h2 { margin: 0 0 8px; font-size: clamp(1.7rem, 3vw, 2.6rem); line-height: 1.1; letter-spacing: -.04em; }
.np-newsletter p { max-width: 650px; margin: 0; color: rgba(255,255,255,.72); }
.np-newsletter .np-button { flex: 0 0 auto; background: #fff; color: #111a2e; box-shadow: none; }
.np-newsletter .np-button:hover { background: #eaf0ff; color: #111a2e; }

/* Footer */
.np-site-footer { margin-top: 64px; padding: 56px 0 24px; background: #0f172a; color: #d6dbea; }
.np-footer-grid { display: grid; grid-template-columns: 1.3fr .7fr .7fr; gap: 50px; }
.np-footer-brand .np-site-title a { color: #fff; }
.np-footer-brand p { max-width: 460px; color: #9fa8bc; }
.np-footer-title { margin: 0 0 14px; color: #fff; font-size: .9rem; letter-spacing: .08em; text-transform: uppercase; }
.np-footer-menu { margin: 0; padding: 0; list-style: none; }
.np-footer-menu li + li { margin-top: 9px; }
.np-footer-menu a { color: #bdc5d6; text-decoration: none; }
.np-footer-menu a:hover { color: #fff; }
.np-footer-bottom { display: flex; justify-content: space-between; gap: 20px; margin-top: 42px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.1); color: #8993a8; font-size: .82rem; }

/* Empty and utility */
.np-empty { padding: 42px; text-align: center; background: var(--np-surface); border: 1px solid var(--np-border); border-radius: var(--np-radius); }
.np-empty h2 { margin-top: 0; }
.sticky { border-color: #b9c9f5; box-shadow: 0 0 0 2px rgba(37,99,235,.07); }
.bypostauthor { position: relative; }
.wp-caption, .gallery-caption { color: var(--np-muted); font-size: .85rem; }
.page-links { margin: 28px 0; font-weight: 700; }

/* Elementor compatibility */
.elementor-page .site-main { min-height: 45vh; }
.elementor-template-full-width .np-site-main { width: 100%; }

@media (max-width: 980px) {
  .np-hero-grid { grid-template-columns: 1fr; }
  .np-featured-card { min-height: 440px; }
  .np-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .np-content-layout { grid-template-columns: 1fr; }
  .np-sidebar { position: static; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
  .widget { margin: 0; }
  .np-article-layout { grid-template-columns: minmax(0, 760px); }
  .np-article-aside { position: static; }
  .np-share { margin-top: 8px; }
  .np-footer-grid { grid-template-columns: 1fr 1fr; }
  .np-footer-brand { grid-column: 1 / -1; }
  .np-menu-toggle { display: inline-grid; }
  .np-nav { position: absolute; left: 18px; right: 18px; top: calc(100% + 8px); display: none; padding: 12px; background: #fff; border: 1px solid var(--np-border); border-radius: 16px; box-shadow: var(--np-shadow); }
  .np-nav.is-open { display: block; }
  .np-menu { display: block; }
  .np-menu a { justify-content: space-between; }
  .np-menu .sub-menu { position: static; display: none; min-width: 0; padding: 4px 0 4px 14px; opacity: 1; visibility: visible; transform: none; border: 0; box-shadow: none; }
  .np-menu li:focus-within > .sub-menu, .np-menu li:hover > .sub-menu { display: block; }
}

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

@media (max-width: 700px) {
  :root { --np-header-height: 66px; }
  .np-container, .np-narrow { width: min(calc(100% - 24px), var(--np-container)); }
  .np-section { padding: 50px 0; }
  .np-section-head { align-items: start; flex-direction: column; }
  .np-hero { padding: 48px 0 32px; }
  .np-hero-copy h1 { font-size: clamp(2.45rem, 12vw, 4rem); }
  .np-featured-card { min-height: 410px; }
  .np-featured-card-content { padding: 24px; }
  .np-grid { grid-template-columns: 1fr; }
  .np-card--horizontal { grid-template-columns: 1fr; }
  .np-card--horizontal .np-card-media { aspect-ratio: 16 / 10; min-height: 0; }
  .np-sidebar { grid-template-columns: 1fr; }
  .np-single-header { padding: 42px 0 26px; }
  .np-single-header h1 { font-size: clamp(2.15rem, 10vw, 3.35rem); }
  .np-single-hero { width: calc(100% - 24px); margin-bottom: 30px; border-radius: 18px; }
  .np-entry-content { font-size: 1rem; }
  .np-author-box { grid-template-columns: 54px 1fr; padding: 20px; }
  .post-navigation .nav-links { grid-template-columns: 1fr; }
  .post-navigation .nav-next { text-align: left; }
  .np-newsletter { padding: 30px 24px; }
  .np-newsletter-inner { align-items: flex-start; flex-direction: column; }
  .np-footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .np-footer-brand { grid-column: auto; }
  .np-footer-bottom { flex-direction: column; }
  .search-form { flex-direction: column; }
  .np-site-description { display: none; }
}

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

/* Advertisement locations: deliberately neutral and visually separate from editorial content. */
.ap-ad-section {
  padding: 24px 0;
  background: var(--np-surface);
  border-bottom: 1px solid var(--np-border);
}
.ap-ad-section + .np-site-footer { margin-top: 0; }
.ap-ad-slot {
  width: 100%;
  max-width: 100%;
  margin: 28px auto;
  text-align: center;
  clear: both;
}
.ap-ad-section .ap-ad-slot { margin: 0 auto; }
.ap-ad-label {
  display: block;
  margin: 0 0 8px;
  color: #7a838f;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.ap-ad-content {
  width: 100%;
  max-width: 100%;
  display: grid;
  place-items: center;
  overflow: hidden;
  contain: layout paint;
}
.ap-ad-content .ap-ad-widget,
.ap-ad-content .widget,
.ap-ad-content > div { width: 100%; max-width: 100%; margin: 0; padding: 0; border: 0; background: transparent; box-shadow: none; }
.ap-ad-content ins.adsbygoogle { max-width: 100%; }
.ap-ad-slot--header .ap-ad-content,
.ap-ad-slot--footer .ap-ad-content { min-height: 90px; }
.ap-ad-slot--feed .ap-ad-content,
.ap-ad-slot--home .ap-ad-content,
.ap-ad-slot--inline .ap-ad-content,
.ap-ad-slot--after-article .ap-ad-content { min-height: 250px; }
.ap-ad-slot--sidebar .ap-ad-content { min-height: 280px; }
.ap-ad-slot--placeholder .ap-ad-content {
  min-height: 120px;
  padding: 22px;
  border: 1px dashed #9eabc0;
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(29,78,216,.035) 25%, transparent 25%) -12px 0/24px 24px,
    linear-gradient(225deg, rgba(29,78,216,.035) 25%, transparent 25%) -12px 0/24px 24px,
    #f8fafc;
  color: #455267;
}
.ap-ad-placeholder-copy { display: grid; gap: 5px; place-items: center; }
.ap-ad-placeholder-copy strong { color: #172033; font-size: .92rem; }
.ap-ad-placeholder-copy span { color: #64748b; font-size: .8rem; }
.ap-ad-placeholder-copy small { color: #7c8798; font-size: .7rem; }
.ap-inline-ad { margin: 2.5em 0; }
.ap-inline-ad .ap-ad-slot { margin: 0; }
.np-post-list > .ap-ad-slot { margin: 10px 0; padding: 20px; background: var(--np-surface); border: 1px solid var(--np-border); border-radius: var(--np-radius); }
.np-article-aside .ap-ad-slot { margin: 22px 0 0; }
.np-tags + .ap-ad-slot,
.np-entry-content + .ap-ad-slot { margin-top: 34px; }
.no-sidebar .np-content-layout { grid-template-columns: minmax(0, 880px); justify-content: center; }

/* Ads must not become floating or sticky through the theme layout. */
.np-sidebar,
.np-article-aside { position: static; }

@media (max-width: 700px) {
  .ap-ad-section { padding: 18px 0; }
  .ap-ad-slot { margin: 22px auto; }
  .ap-ad-slot--header .ap-ad-content,
  .ap-ad-slot--footer .ap-ad-content { min-height: 100px; }
  .ap-ad-slot--feed .ap-ad-content,
  .ap-ad-slot--home .ap-ad-content,
  .ap-ad-slot--inline .ap-ad-content,
  .ap-ad-slot--after-article .ap-ad-content,
  .ap-ad-slot--sidebar .ap-ad-content { min-height: 250px; }
  .np-post-list > .ap-ad-slot { padding: 14px; }
}
