/*
Theme Name: NayanDhumal
Theme URI: https://nayandhumal.com/
Author: Nayan Dhumal
Author URI: https://nayandhumal.com/
Description: A fast, customisable blog and review theme made for nayandhumal.com. Navy ink, soft paper background and a yellow marker highlight, with a homepage built from Customizer sections, styled post boxes for the block editor, review boxes for affiliate posts, and WooCommerce support for selling ebooks.
Version: 2.7.2
Requires at least: 6.3
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: nayandhumal
Tags: blog, e-commerce, custom-colors, custom-logo, custom-menu, featured-images, footer-widgets, right-sidebar, threaded-comments, translation-ready
*/

/* ---------- 1. Tokens (overridden from the Customizer) ---------- */
:root {
	--ink: #10243e;
	--ink-soft: #1c3a63;
	--on-ink: #ffffff;
	--paper: #f6f7f9;
	--white: #ffffff;
	--marker: #f5b301;
	--on-marker: #10243e;
	--link: #1b4fd8;
	--badge: #1b4fd8;
	--on-badge: #ffffff;
	--logo-h: 44px;
	--muted: #556479;
	--line: #dde2ea;
	--display: "Bricolage Grotesque", "Segoe UI", Arial, sans-serif;
	--body: "IBM Plex Sans", "Segoe UI", Arial, sans-serif;
	--radius: 16px;
	--wrap: 1120px;
	--measure: 740px;
	--base: 17px;
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--body);
	font-size: var(--base);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	overflow-wrap: break-word;
}
img, svg, video, iframe { max-width: 100%; }
img { height: auto; }
a { color: var(--link); text-underline-offset: 3px; }
h1, h2, h3, h4, h5, h6 { font-family: var(--display); color: var(--ink); line-height: 1.08; letter-spacing: -0.025em; margin: 0 0 0.5em; text-wrap: balance; }
h1 { font-size: clamp(34px, 4.6vw, 54px); font-weight: 800; }
h2 { font-size: clamp(28px, 3.6vw, 40px); font-weight: 700; }
h3 { font-size: 24px; font-weight: 700; }
h4 { font-size: 19px; font-weight: 700; letter-spacing: -0.015em; }
p { margin: 0 0 1.2em; }
button, input, select, textarea { font: inherit; color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid var(--marker); outline-offset: 3px; border-radius: 4px; }
.screen-reader-text { border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal !important; }
.skip-link:focus { clip: auto; clip-path: none; height: auto; width: auto; position: fixed; top: 8px; left: 8px; background: var(--ink); color: #fff; padding: 10px 16px; z-index: 1000; border-radius: 6px; }
.nd-wrap { width: min(var(--wrap), 100% - 40px); margin-inline: auto; }
.nd-narrow { max-width: var(--measure); margin-inline: auto; }
.nd-hl { background: linear-gradient(transparent 62%, var(--marker) 62%); padding: 0 3px; }

/* ---------- 3. Buttons and form fields ---------- */
.nd-btn,
.wp-block-button__link,
input[type="submit"],
button[type="submit"] {
	display: inline-block; font-family: var(--body); font-weight: 600; font-size: 16px; line-height: 1.3; text-align: center; text-decoration: none; cursor: pointer;
	padding: 14px 26px; border-radius: calc(var(--radius) * 0.625); border: 2px solid var(--ink);
	background: var(--ink); color: var(--on-ink); transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.nd-btn:hover,
.wp-block-button__link:hover,
input[type="submit"]:hover,
button[type="submit"]:hover { background: var(--ink-soft); border-color: var(--ink-soft); color: var(--on-ink); }
.nd-btn.nd-btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.nd-btn.nd-btn--ghost:hover { background: var(--ink); color: var(--on-ink); }
.nd-btn.nd-btn--marker { background: var(--marker); color: var(--on-marker); border-color: var(--marker); }
.nd-btn.nd-btn--marker:hover { filter: brightness(1.08); background: var(--marker); color: var(--on-marker); border-color: var(--marker); }
.nd-btn.nd-btn--small { padding: 9px 16px; font-size: 14.5px; }
.nd-text-link { font-weight: 600; }
input[type="text"], input[type="email"], input[type="url"], input[type="search"], input[type="password"], input[type="number"], input[type="tel"], textarea, select {
	width: 100%; padding: 13px 16px; border: 2px solid var(--line); border-radius: calc(var(--radius) * 0.625); background: var(--paper); color: var(--ink);
}
input:focus, textarea:focus, select:focus { border-color: var(--ink); outline: none; }

/* ---------- 4. Header ---------- */
.nd-header { background: var(--white); border-bottom: 1px solid var(--line); position: relative; z-index: 50; }
.nd-header.is-sticky { position: sticky; top: 0; }
.admin-bar .nd-header.is-sticky { top: 32px; }
@media (max-width: 782px) { .admin-bar .nd-header.is-sticky { top: 46px; } }
/* On phones the WordPress admin bar scrolls away with the page, so the header must sit at the very top. */
@media (max-width: 600px) { .admin-bar .nd-header.is-sticky { top: 0; } }
.nd-header__row { display: flex; align-items: center; gap: 12px 24px; padding-block: 14px; min-height: 68px; }
.nd-branding { margin-right: auto; display: flex; align-items: center; min-width: 0; }
.nd-branding a { display: block; }
.nd-branding img { display: block; height: var(--logo-h); max-height: none; width: auto; max-width: min(260px, 52vw); object-fit: contain; object-position: left center; }
.nd-brand { font-family: var(--display); font-weight: 800; font-size: 22px; color: var(--ink); text-decoration: none; letter-spacing: -0.02em; line-height: 1.2; white-space: nowrap; }
.nd-brand span { background: linear-gradient(transparent 62%, var(--marker) 62%); padding: 0 3px; }
.nd-nav ul { list-style: none; margin: 0; padding: 0; }
.nd-nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: 15px; }
.nd-tools { display: flex; align-items: center; gap: 4px; }
.nd-icon-btn { display: inline-flex; align-items: center; justify-content: center; position: relative; width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent; color: var(--ink); cursor: pointer; text-decoration: none; padding: 0; }
.nd-icon-btn:hover { background: var(--paper); }
.nd-icon-btn svg { width: 20px; height: 20px; }
.nd-cart-count { position: absolute; top: 1px; right: -1px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--marker); color: var(--on-marker); font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.nd-nav-toggle { display: none; }
.nd-header-cta { margin-left: 8px; }
.nd-search-panel { display: none; border-top: 1px solid var(--line); padding: 14px 0; background: var(--paper); }
.nd-search-panel.is-open { display: block; }

@media (min-width: 941px) {
	.nd-nav > ul { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px; }
	.nd-nav li { position: relative; }
	.nd-nav > ul > li > a { display: block; padding: 6px 0; border-bottom: 2px solid transparent; }
	.nd-nav > ul > li > a:hover,
	.nd-nav > ul > li.current-menu-item > a,
	.nd-nav > ul > li.current-menu-ancestor > a,
	.nd-nav > ul > li.current-menu-parent > a { border-bottom-color: var(--marker); }
	.nd-nav .menu-item-has-children > a::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 8px; vertical-align: 3px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); }
	.nd-nav ul ul {
		position: absolute; top: calc(100% + 6px); left: -16px; min-width: 220px; padding: 8px 16px; background: var(--white); border: 1px solid var(--line); border-radius: 14px 14px 14px 4px;
		box-shadow: 0 18px 40px -22px rgba(16, 36, 62, 0.35); opacity: 0; visibility: hidden; transform: translateY(4px); transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
	}
	.nd-nav ul ul::before { content: ""; position: absolute; left: 0; right: 0; top: -8px; height: 8px; }
	.nd-nav li:hover > ul, .nd-nav li:focus-within > ul { opacity: 1; visibility: visible; transform: none; }
	.nd-nav ul ul li + li { border-top: 1px solid var(--line); }
	.nd-nav ul ul a { display: block; padding: 10px 0; }
	.nd-nav ul ul a:hover { color: var(--link); }
	.nd-nav ul ul ul { top: 0; left: 100%; }
	.nd-sub-toggle, .nd-nav .nd-mobile-cta { display: none; }
}
@media (max-width: 940px) {
	.nd-nav-toggle { display: inline-flex; }
	.nd-header-cta { display: none; }
	.nd-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--white); border-bottom: 1px solid var(--line); padding: 4px 20px 20px; max-height: calc(100vh - 68px); overflow-y: auto; box-shadow: 0 24px 40px -24px rgba(16, 36, 62, 0.4); }
	.nd-nav.is-open { display: block; }
	.nd-nav li { position: relative; border-bottom: 1px solid var(--line); }
	.nd-nav a { display: block; padding: 14px 44px 14px 0; font-size: 16px; }
	.nd-nav ul ul { display: none; padding-left: 16px; }
	.nd-nav li.is-open > ul { display: block; }
	.nd-nav ul ul li { border-bottom: 0; border-top: 1px solid var(--line); }
	.nd-sub-toggle { position: absolute; right: 0; top: 6px; width: 40px; height: 40px; border: 0; background: transparent; cursor: pointer; color: var(--ink); }
	.nd-sub-toggle::before { content: ""; display: block; width: 8px; height: 8px; margin: 0 auto; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform 0.15s; }
	.is-open > .nd-sub-toggle::before { transform: rotate(-135deg); }
	.nd-nav .nd-mobile-cta { border: 0; padding-top: 16px; }
	.nd-nav .nd-mobile-cta a { padding: 13px 16px; color: var(--on-ink); }
}

.nd-search-form { display: flex; gap: 10px; flex-wrap: wrap; }
.nd-search-form label { flex: 1 1 220px; }
.nd-search-form .search-field { background: var(--white); }

/* ---------- 5. Bands and section heads ---------- */
.nd-section { padding: 72px 0; }
.nd-band { background: var(--white); border-block: 1px solid var(--line); }
.nd-band + .nd-band { border-top: 0; }
.nd-sec-head { max-width: 640px; margin-bottom: 38px; }
.nd-sec-head h2 { margin: 0; }
.nd-sec-head p { color: var(--muted); margin: 12px 0 0; }
.nd-more { margin: 28px 0 0; }

/* ---------- 6. Homepage ---------- */
.nd-hero { padding: 76px 0 84px; }
.nd-hero__grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.nd-hero__grid.is-single { grid-template-columns: 1fr; }
.nd-hero h1 { font-size: clamp(38px, 5.4vw, 64px); margin: 0; }
.nd-hero__grid.is-single h1 { max-width: 16em; }
.nd-lede { font-size: 20px; color: var(--muted); max-width: 34em; margin: 22px 0 32px; }
.nd-btns { display: flex; gap: 14px; flex-wrap: wrap; }
.nd-hero__image img { display: block; width: 100%; border-radius: 18px 18px 18px 4px; }

.nd-serp { background: var(--white); border: 1px solid var(--line); border-radius: 18px 18px 18px 4px; padding: 26px 28px; box-shadow: 0 18px 40px -22px rgba(16, 36, 62, 0.35); }
.nd-serp__bar { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 999px; padding: 10px 18px; font-size: 15px; color: var(--ink); margin-bottom: 22px; background: var(--paper); }
.nd-serp__bar svg { flex: none; width: 18px; height: 18px; color: var(--muted); }
.nd-serp__url { font-size: 14px; color: var(--muted); margin: 0 0 2px; }
.nd-serp__title { font-family: var(--body); font-size: 21px; font-weight: 500; line-height: 1.3; margin: 0 0 6px; letter-spacing: 0; }
.nd-serp__title a { color: var(--link); text-decoration: none; }
.nd-serp__title a:hover { text-decoration: underline; }
.nd-serp__desc { margin: 0; font-size: 15.5px; color: #3c4a5e; line-height: 1.55; }
.nd-serp mark { background: none; color: inherit; font-weight: 600; background-image: linear-gradient(var(--marker), var(--marker)); background-repeat: no-repeat; background-position: 0 88%; background-size: 0% 45%; animation: nd-sweep 0.9s 0.5s cubic-bezier(0.3, 0.7, 0.3, 1) forwards; }
.nd-serp mark:nth-of-type(2) { animation-delay: 1s; }
.nd-serp mark:nth-of-type(n+3) { animation-delay: 1.5s; }
@keyframes nd-sweep { to { background-size: 100% 45%; } }
.nd-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.nd-chips a { font-size: 14px; font-weight: 500; text-decoration: none; color: var(--ink); border: 1px solid var(--line); padding: 5px 14px; border-radius: 999px; background: var(--paper); }
.nd-chips a:hover { border-color: var(--ink); }

.nd-path { display: grid; grid-template-columns: minmax(200px, 0.7fr) 1.3fr auto; gap: 24px; align-items: center; padding: 26px 0; border-top: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.nd-path:last-child { border-bottom: 1px solid var(--line); }
.nd-path h3 { font-size: clamp(24px, 2.6vw, 32px); margin: 0; }
.nd-path p { margin: 0; color: var(--muted); }
.nd-path__go { font-weight: 600; color: var(--link); white-space: nowrap; }
.nd-path:hover h3 > span { background: linear-gradient(transparent 62%, var(--marker) 62%); }

.nd-about__grid { display: grid; grid-template-columns: auto 1fr; gap: 40px; align-items: center; }
.nd-mono { width: 150px; height: 150px; border-radius: 38% 62% 55% 45% / 48% 42% 58% 52%; background: var(--ink); color: var(--marker); display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 54px; letter-spacing: -0.04em; line-height: 1; }
/* A photo in place of the initials. It fills the shape and is never stretched. */
.nd-mono--photo { position: relative; background: var(--line); overflow: hidden; }
.nd-mono--photo.is-circle { border-radius: 50%; }
.nd-mono--photo.is-square { border-radius: var(--radius); }
.nd-mono--photo img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: center 20%; }
.nd-about h2 { margin: 0; }
.nd-about p { max-width: 38em; margin: 14px 0 22px; font-size: 18px; }

.nd-reviews { background: var(--ink); color: #fff; }
.nd-reviews h2 { color: #fff; }
.nd-reviews__grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.nd-reviews__grid.is-single { grid-template-columns: 1fr; }
.nd-reviews p { color: #c9d3e0; font-size: 18px; max-width: 34em; }
.nd-reviews p:last-child { margin-bottom: 0; }
.nd-deal { background: rgba(0, 0, 0, 0.22); border: 1px solid rgba(255, 255, 255, 0.16); border-radius: var(--radius); padding: 26px 28px; }
.nd-deal h3 { font-size: 22px; color: var(--marker); margin: 0; }
.nd-deal ul { list-style: none; padding: 0; margin: 16px 0 0; }
.nd-deal li { padding: 11px 0; border-top: 1px solid rgba(255, 255, 255, 0.16); }
.nd-deal a { color: #fff; text-decoration: none; font-weight: 500; }
.nd-deal a:hover { text-decoration: underline; }

.nd-free__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
.nd-free__grid.is-single { grid-template-columns: 1fr; }
.nd-box { padding: 34px; border-radius: var(--radius); background: var(--white); border: 1px solid var(--line); }
.nd-box h2 { font-size: 28px; margin: 0; }
.nd-box > p { color: var(--muted); margin: 12px 0 22px; }
.nd-box form { display: flex; gap: 10px; flex-wrap: wrap; }
.nd-box form p { display: contents; }
.nd-box form input[type="email"], .nd-box form input[type="text"] { flex: 1 1 220px; width: auto; }
.nd-box .nd-fine { font-size: 14px; color: var(--muted); margin: 12px 0 0; }

/* ---------- 7. Post lists ---------- */
.nd-posts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 56px; }
.nd-posts.is-one-col { grid-template-columns: 1fr; }
.nd-posts li { border-top: 1px solid var(--line); min-width: 0; }
.nd-posts a { display: grid; grid-template-columns: 1fr auto; gap: 4px 20px; align-items: start; align-content: start; padding: 20px 0; text-decoration: none; color: var(--ink); height: 100%; }
.nd-posts .nd-row__text { min-width: 0; }
.nd-posts .cat { display: block; font-size: 14px; color: var(--muted); margin-bottom: 2px; }
.nd-posts .t { display: block; font-family: var(--display); font-weight: 600; font-size: 21px; line-height: 1.25; letter-spacing: -0.015em; }
.nd-posts a:hover .t { color: var(--link); }
.nd-posts .m { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 14px; font-size: 14px; color: var(--muted); margin-top: 6px; }
.nd-posts .x { display: block; color: var(--muted); font-size: 15.5px; margin-top: 6px; }
.nd-posts .nd-row__thumb { width: 108px; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: var(--paper); }
.nd-posts .nd-row__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.nd-cards { display: grid; gap: 40px 28px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); list-style: none; margin: 0; padding: 0; }
.nd-card a { text-decoration: none; color: var(--ink); display: block; }
/* The featured image keeps its own shape, so nothing drawn on it is cut off. */
.nd-card__media { display: block; border-radius: var(--radius) var(--radius) var(--radius) 4px; overflow: hidden; background: var(--paper); border: 1px solid var(--line); margin-bottom: 14px; }
.nd-card__media img { width: 100%; height: auto; display: block; }
.nd-card__media.is-empty { display: grid; place-items: center; aspect-ratio: 2 / 1; font-family: var(--display); font-weight: 800; font-size: 44px; color: var(--line); }
.nd-card .cat { display: block; font-size: 14px; color: var(--muted); margin-bottom: 2px; }
.nd-card .t { display: block; font-family: var(--display); font-weight: 600; font-size: 21px; line-height: 1.25; letter-spacing: -0.015em; }
.nd-card a:hover .t { color: var(--link); }
.nd-card .m { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 14px; font-size: 14px; color: var(--muted); margin-top: 6px; }
.nd-card .x { display: block; color: var(--muted); font-size: 15.5px; margin-top: 6px; }

.nd-stars { display: inline-block; position: relative; font-size: 15px; line-height: 1; letter-spacing: 2px; color: var(--line); white-space: nowrap; }
.nd-stars::before { content: "★★★★★"; }
.nd-stars > span { position: absolute; left: 0; top: 0; overflow: hidden; color: var(--marker); }
.nd-stars > span::before { content: "★★★★★"; }
.nd-rating { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--ink); }

/* ---------- 8. Page heads ---------- */
.nd-pagehead { padding: 52px 0 46px; }
.nd-pagehead h1 { margin: 0; }
.nd-pagehead .nd-desc { margin-top: 14px; max-width: 40em; color: var(--muted); font-size: 18px; }
.nd-pagehead .nd-desc p:last-child { margin-bottom: 0; }
.nd-pagehead .nd-count { color: var(--muted); font-size: 15px; margin: 12px 0 0; }
.nd-crumbs { font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.nd-crumbs a { color: var(--muted); }
.nd-crumbs a:hover { color: var(--ink); }
.nd-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; font-size: 15px; color: var(--muted); margin-top: 18px; }
.nd-meta .nd-byline { color: var(--ink); font-weight: 600; }
.nd-meta .nd-byline a { color: inherit; text-decoration: none; }
.nd-meta .nd-byline a:hover { text-decoration: underline; }
.nd-meta .nd-byline.has-photo a { display: inline-flex; align-items: center; gap: 10px; }
.nd-byline__photo { flex: none; width: 34px; height: 34px; max-width: none; border-radius: 50%; object-fit: cover; object-position: center 20%; background: var(--line); }

/* PDF and Share bar under the post title. */
.nd-pdfbar { display: flex; align-items: center; gap: 14px 16px; flex-wrap: wrap; margin-top: 26px; padding: 16px 18px; background: var(--white); background: color-mix(in srgb, var(--marker) 9%, var(--white)); border: 1px solid var(--line); border-color: color-mix(in srgb, var(--marker) 38%, var(--line)); border-radius: var(--radius); }
.nd-pdfbar__icon { flex: none; width: 42px; height: 42px; display: grid; place-items: center; border-radius: calc(var(--radius) * 0.625); background: var(--paper); background: color-mix(in srgb, var(--marker) 24%, var(--white)); color: var(--ink); }
.nd-pdfbar__icon svg { width: 21px; height: 21px; }
.nd-pdfbar__text { flex: 1 1 220px; min-width: 0; }
.nd-pdfbar__title { margin: 0; font-weight: 600; font-size: 16px; line-height: 1.35; color: var(--ink); }
.nd-pdfbar__badge { display: inline-block; margin-left: 6px; padding: 2px 7px; border-radius: 5px; background: var(--marker); color: var(--on-marker); font-size: 11px; font-weight: 700; letter-spacing: 0.06em; line-height: 1.4; vertical-align: 2px; }
.nd-pdfbar__sub { margin: 2px 0 0; font-size: 14px; line-height: 1.45; color: var(--muted); }
.nd-pdfbar__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.nd-pdfbar .nd-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 999px; white-space: nowrap; }
.nd-pdfbar .nd-btn svg { flex: none; width: 17px; height: 17px; }
.nd-pdfbar .nd-btn.nd-btn--ghost { background: var(--white); border-color: var(--line); color: var(--ink); }
.nd-pdfbar .nd-btn.nd-btn--ghost:hover, .nd-pdfbar .nd-btn.nd-btn--ghost.is-done { background: var(--white); border-color: var(--ink); color: var(--ink); }
@media (max-width: 560px) {
	.nd-pdfbar__actions { flex: 1 1 100%; }
	.nd-pdfbar__actions .nd-btn { flex: 1 1 0; }
}

/* ---------- 9. Single post and pages ---------- */
.nd-content-band { padding: 48px 0 64px; }
/* minmax(0, 1fr) and min-width: 0 stop wide content (a table, a long link) from stretching the column past the screen. */
.nd-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px; }
.nd-main { min-width: 0; }
.nd-scroll { overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }
@media (min-width: 1020px) { .nd-layout.has-sidebar { grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; } }
.nd-layout:not(.has-sidebar) > .nd-main { width: 100%; max-width: var(--measure); margin-inline: auto; }
.nd-layout:not(.has-sidebar) > .nd-main.is-wide { max-width: none; }
.entry-thumb { margin: 0 0 30px; }
.entry-thumb img { display: block; width: 100%; border-radius: 18px 18px 18px 4px; }
.nd-aff { font-size: 14.5px; color: var(--muted); margin: 0 0 28px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }

.nd-review { border: 1px solid var(--line); border-radius: var(--radius) var(--radius) var(--radius) 4px; margin: 0 0 32px; overflow: hidden; background: var(--white); box-shadow: 0 18px 40px -26px rgba(16, 36, 62, 0.35); }
.nd-review__top { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; justify-content: space-between; padding: 22px 26px; background: var(--ink); color: #fff; }
.nd-review__score { display: flex; align-items: center; gap: 16px; }
.nd-review__num { font-family: var(--display); font-weight: 800; font-size: 44px; color: var(--marker); line-height: 1; letter-spacing: -0.03em; }
.nd-review__num small { font-size: 17px; color: #c9d3e0; font-weight: 600; letter-spacing: 0; }
.nd-review .nd-stars { font-size: 20px; color: rgba(255, 255, 255, 0.25); }
.nd-review__verdict { padding: 20px 26px 0; margin: 0; font-size: 18px; }
.nd-review__cols { display: grid; gap: 10px 36px; padding: 20px 26px 24px; }
@media (min-width: 620px) { .nd-review__cols { grid-template-columns: 1fr 1fr; } }
.nd-review h3 { font-size: 17px; letter-spacing: -0.01em; margin: 0 0 10px; }
.nd-review ul { list-style: none; margin: 0; padding: 0; font-size: 16px; }
.nd-review li { padding: 9px 0 9px 28px; position: relative; border-top: 1px solid var(--line); line-height: 1.45; }
.nd-review li::before { position: absolute; left: 2px; top: 9px; font-weight: 700; }
.nd-review .pros li::before { content: "✓"; color: #16803c; }
.nd-review .cons li::before { content: "✕"; color: #c22f3d; }
.nd-review__pad { height: 20px; }

.entry-footer { margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; }
.nd-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.nd-tags a { font-size: 14px; font-weight: 500; text-decoration: none; color: var(--ink); border: 1px solid var(--line); padding: 5px 14px; border-radius: 999px; background: var(--paper); }
.nd-tags a:hover { border-color: var(--ink); }
.nd-share { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); }
.nd-share a, .nd-share button { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--paper); color: var(--ink); display: grid; place-items: center; cursor: pointer; padding: 0; }
.nd-share a:hover, .nd-share button:hover, .nd-share button.is-done { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.nd-share svg { width: 17px; height: 17px; }

.nd-after { padding: 56px 0 64px; }
.nd-after > .nd-wrap > * { max-width: var(--measure); margin-inline: auto; }
.nd-after > .nd-wrap > * + * { margin-top: 56px; }
.nd-related .nd-posts { gap: 0 40px; }
.nd-author { display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center; padding: 28px 30px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.nd-author .nd-mono { width: 96px; height: 96px; font-size: 34px; }
.nd-author h2 { font-size: 24px; margin: 0 0 8px; }
.nd-author p { margin: 0; max-width: 38em; }
.nd-postnav { display: grid; gap: 14px; }
@media (min-width: 620px) { .nd-postnav { grid-template-columns: 1fr 1fr; } }
.nd-postnav a { display: block; height: 100%; padding: 18px 22px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); font-family: var(--display); font-weight: 600; font-size: 18px; line-height: 1.3; }
.nd-postnav a:hover { border-color: var(--ink); }
.nd-postnav small { display: block; font-family: var(--body); font-weight: 400; font-size: 14px; color: var(--muted); margin-bottom: 4px; }
.nd-postnav .next { text-align: right; }
.nd-related h2 { font-size: 28px; margin-bottom: 20px; }
.nd-related .nd-posts li:last-child, .nd-related .nd-posts li:nth-last-child(2):nth-child(odd) { border-bottom: 1px solid var(--line); }

.nd-sidebar .widget { margin-bottom: 26px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.widget-title, .nd-sidebar .widget h2, .nd-sidebar .wp-block-heading, .nd-footer__widgets .wp-block-heading { font-size: 19px; letter-spacing: -0.015em; margin: 0 0 12px; }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { padding: 9px 0; border-top: 1px solid var(--line); line-height: 1.4; font-size: 15.5px; }
.widget li a { color: var(--ink); text-decoration: none; }
.widget li a:hover { color: var(--link); }
@media (min-width: 1020px) { .nd-sidebar__sticky { position: sticky; top: 96px; } }

/* ---------- 10. Comments ---------- */
.comments-area { max-width: var(--measure); margin-inline: auto; }
.comments-title, .comment-reply-title { font-size: 28px; }
.comment-list, .comment-list .children { list-style: none; margin: 0; padding: 0; }
.comment-list .children { padding-left: clamp(16px, 4vw, 44px); }
.comment-body { padding: 20px 0; border-top: 1px solid var(--line); }
.comment-author { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.comment-author .avatar { border-radius: 50%; }
.comment-author .says { display: none; }
.comment-metadata { font-size: 14px; margin: 4px 0 10px; }
.comment-metadata a { color: var(--muted); }
.comment-content p:last-child { margin-bottom: 0.6em; }
.reply a { font-size: 14.5px; font-weight: 600; }
.comment-respond { margin-top: 32px; }
.comment-form p { margin-bottom: 14px; }
.comment-form label { display: block; font-weight: 600; font-size: 15px; margin-bottom: 4px; }
.comment-form-cookies-consent label { display: inline; font-weight: 400; }
.comment-form input[type="checkbox"] { width: auto; }

/* ---------- 11. Pagination and empty states ---------- */
.pagination { margin-top: 44px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.pagination .page-numbers { min-width: 46px; height: 46px; padding: 0 14px; display: grid; place-items: center; border: 2px solid var(--line); border-radius: calc(var(--radius) * 0.625); text-decoration: none; color: var(--ink); font-weight: 600; background: var(--white); }
.pagination a.page-numbers:hover { border-color: var(--ink); }
.pagination .page-numbers.current { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.pagination .page-numbers.dots { border-color: transparent; background: none; }
.nd-empty { max-width: 560px; }
.nd-empty .nd-search-form { margin-top: 20px; }

/* ---------- 12. Footer ---------- */
.nd-note { padding: 34px 0; text-align: center; color: var(--muted); font-size: 15px; }
.nd-note p { max-width: 48em; margin: 0 auto; }
.nd-footer { background: var(--white); border-top: 1px solid var(--line); padding: 0; font-size: 15px; color: var(--muted); }
.nd-footer a { color: var(--ink); }
.nd-footer__widgets { display: grid; gap: 32px 40px; padding: 44px 0 8px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
/* Four columns sit in one row on a computer, two by two on a tablet and one under another on a phone. */
.nd-footer__widgets.is-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
@media (max-width: 960px) { .nd-footer__widgets.is-cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .nd-footer__widgets.is-cols-4 { grid-template-columns: minmax(0, 1fr); } }
.nd-footer__row { display: flex; justify-content: space-between; align-items: center; gap: 14px 20px; flex-wrap: wrap; padding: 38px 0; }
.nd-footer__nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px 22px; flex-wrap: wrap; }
.nd-social { display: flex; flex-wrap: wrap; gap: 6px; }
.nd-social a { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; }
.nd-social a:hover { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.nd-social svg { width: 16px; height: 16px; }

/* ---------- 13. Canvas pages (a full HTML page pasted into a Custom HTML block) ---------- */
.nd-canvas > .wp-block-html, .nd-canvas { margin: 0; }
.nd-canvas .skip, .nd-canvas .site-header, .nd-canvas footer { display: none; }

/* ---------- 14. WooCommerce ---------- */
.woocommerce ul.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 32px 24px; margin: 0 0 32px; padding: 0; list-style: none; }
.woocommerce ul.products::before, .woocommerce ul.products::after { display: none; }
.woocommerce ul.products li.product { width: auto !important; float: none !important; margin: 0 !important; }
.woocommerce ul.products li.product img { border-radius: var(--radius) var(--radius) var(--radius) 4px; margin-bottom: 12px; border: 1px solid var(--line); }
.woocommerce ul.products li.product .woocommerce-loop-product__title { font-size: 19px; font-weight: 600; letter-spacing: -0.015em; padding: 0 0 6px; }
.woocommerce ul.products li.product .price, .woocommerce div.product p.price, .woocommerce div.product span.price { color: var(--ink); font-weight: 600; }
.woocommerce a.button, .woocommerce button.button, .woocommerce input.button, .woocommerce #respond input#submit,
.woocommerce a.button.alt, .woocommerce button.button.alt, .woocommerce input.button.alt {
	background: var(--ink); color: var(--on-ink); border: 2px solid var(--ink); border-radius: calc(var(--radius) * 0.625); font-family: var(--body); font-weight: 600; padding: 12px 20px;
}
.woocommerce a.button:hover, .woocommerce button.button:hover, .woocommerce input.button:hover, .woocommerce #respond input#submit:hover,
.woocommerce a.button.alt:hover, .woocommerce button.button.alt:hover, .woocommerce input.button.alt:hover { background: var(--ink-soft); border-color: var(--ink-soft); color: var(--on-ink); }
.woocommerce span.onsale { background: var(--marker); color: var(--on-marker); border-radius: 999px; min-height: 0; min-width: 0; line-height: 1.2; padding: 6px 12px; font-weight: 600; }
.woocommerce .woocommerce-message, .woocommerce .woocommerce-info { border-top-color: var(--ink); background: var(--paper); }
.woocommerce .woocommerce-message::before, .woocommerce .woocommerce-info::before { color: var(--ink); }
.woocommerce .star-rating span { color: var(--marker); }

/* ---------- 15. Small screens, motion, print ---------- */
@media (max-width: 900px) {
	.nd-section { padding: 52px 0; }
	.nd-hero { padding: 44px 0 56px; }
	.nd-hero__grid, .nd-reviews__grid, .nd-free__grid { grid-template-columns: 1fr; gap: 36px; }
	.nd-path { grid-template-columns: 1fr; gap: 6px; }
	.nd-about__grid { grid-template-columns: 1fr; gap: 24px; }
	.nd-mono { width: 110px; height: 110px; font-size: 40px; }
	.nd-posts { grid-template-columns: 1fr; }
	.nd-pagehead { padding: 36px 0 32px; }
	.nd-content-band { padding: 32px 0 48px; }
	.nd-box { padding: 26px; }
	.nd-author { grid-template-columns: 1fr; gap: 16px; padding: 22px; }
	.nd-posts .nd-row__thumb { width: 84px; }
}
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.nd-serp mark { animation: none; background-size: 100% 45%; }
	*, *::before, *::after { transition: none !important; }
}
/* Printing, and "Save as PDF" from the bar under the title: only the article, on white paper. */
@media print {
	.nd-header, .nd-footer, .nd-note, .nd-sidebar, .nd-share, .nd-after, .comments-area, .nd-pdfbar, .nd-crumbs, .entry-footer, .nd-search-panel { display: none !important; }
	body, .nd-band, .nd-pagehead { background: #fff !important; }
	.nd-band { border: 0; }
	.nd-pagehead { padding: 0 0 18px; }
	.nd-content-band { padding: 0; }
	.nd-wrap, .nd-narrow, .nd-layout:not(.has-sidebar) > .nd-main { width: auto; max-width: none; }
	.nd-layout { display: block; }
	.entry-content a { color: inherit; }
	figure, img, svg, table, pre, blockquote, .wp-block-group, .wp-block-details { break-inside: avoid; }
	h2, h3, h4 { break-after: avoid; }
}
