/*
Theme Name: nuxx Modern
Theme URI: https://nuxx.net/blog
Author: Steve Vigneau
Author URI: https://nuxx.net
Description: A modern, update-safe classic theme for nuxx.net/blog. Deep forest-green masthead, a green accent system, an About box in the sidebar, light/dark mode, and a fully responsive layout. WordPress-native: standard template tags, no build step, no page builder.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nuxx-modern
Tags: blog, two-columns, right-sidebar, custom-menu, featured-images, threaded-comments, dark-mode, sticky-post
*/

/* ==========================================================================
   Design tokens
   All colors authored in OKLCH (supported by all modern evergreen browsers).
   ========================================================================== */
:root {
  --canvas: oklch(0.93 0.008 160);
  --bg: oklch(0.99 0.005 155);
  --surface: oklch(1 0 0);
  --ink: oklch(0.24 0.015 160);
  --ink-soft: oklch(0.44 0.015 160);
  --ink-faint: oklch(0.56 0.014 160);
  --line: oklch(0.9 0.008 160);
  --line-strong: oklch(0.8 0.01 160);
  --accent: oklch(0.48 0.11 155);
  --accent-soft: oklch(0.93 0.045 155);
  --shadow: 0 1px 2px oklch(0.2 0.02 160 / .05), 0 30px 70px -40px oklch(0.2 0.03 160 / .3);
  --ui-font: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --meta-font: var(--ui-font);
  --mono-font: ui-monospace, 'SF Mono', Menlo, monospace;
  --header-bg: oklch(0.32 0.05 158);
  --header-ink: oklch(0.98 0.01 150);
  --header-muted: oklch(0.8 0.03 155);
  --header-line: oklch(1 0 0 / .14);
}

:root[data-theme="dark"] {
  --canvas: oklch(0.17 0.012 160);
  --bg: oklch(0.21 0.012 160);
  --surface: oklch(0.25 0.014 160);
  --ink: oklch(0.93 0.008 150);
  --ink-soft: oklch(0.74 0.014 155);
  --ink-faint: oklch(0.62 0.014 155);
  --line: oklch(0.32 0.014 160);
  --line-strong: oklch(0.4 0.016 160);
  /* Accent is LIGHTENED in dark mode for WCAG AA legibility on dark bg. */
  --accent: oklch(0.78 0.13 155);
  --accent-soft: oklch(0.3 0.06 155);
  --shadow: 0 1px 2px oklch(0 0 0 / .3), 0 30px 70px -40px oklch(0 0 0 / .6);
  --header-bg: oklch(0.24 0.03 160);
  --header-ink: oklch(0.98 0.01 150);
  --header-muted: oklch(0.75 0.03 155);
  --header-line: oklch(1 0 0 / .12);
}

/* ==========================================================================
   Reset / base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--ui-font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background: var(--canvas);
  color: var(--ink);
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; }

/* Accessible focus states (the prototype omitted these on purpose). */
:where(a, button, input, textarea, select, summary):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  width: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  word-wrap: normal !important;
}
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--surface);
  color: var(--ink);
  padding: 10px 16px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  font-size: 14px;
  font-weight: 600;
}
.skip-link:focus {
  left: 16px;
  top: 16px;
}

/* ==========================================================================
   Shell (centered card)
   The masthead is position:sticky, so no ancestor may use overflow:hidden
   (it would break sticky). The card corners are rounded on the shell and the
   header top edge instead.
   ========================================================================== */
.nx-page { padding: 20px 20px 60px; }
.nx-shell {
  max-width: 1392px; /* ~20% wider than the original 1160px */
  margin: 0 auto;
  background: var(--bg);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

/* ==========================================================================
   Masthead / header
   ========================================================================== */
.nx-header {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 20px 34px;
  border-bottom: 1px solid var(--header-line);
  background: var(--header-bg);
  border-radius: 14px 14px 0 0;
}
.nx-brand-link { display: inline-block; }
.nx-brand { font-size: 22px; font-weight: 800; letter-spacing: -.02em; line-height: 1; color: var(--header-ink); }
.nx-tag { font-size: 11.5px; color: var(--header-muted); margin-top: 4px; }

.nx-nav { display: flex; align-items: center; gap: 18px; }
.nx-nav-links {
  display: flex; align-items: center; gap: 20px;
  list-style: none; margin: 0; padding: 0;
  font-size: 13px; font-weight: 600; color: var(--header-muted);
}
.nx-nav-links a { color: var(--header-muted); transition: color .15s ease; }
.nx-nav-links a:hover,
.nx-nav-links .current-menu-item > a,
.nx-nav-links .current_page_item > a { color: var(--header-ink); }

.nx-search {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 500;
  color: var(--header-muted);
  border: 1px solid var(--header-line);
  padding: 6px 11px; border-radius: 999px;
  background: transparent;
}
.nx-search svg { flex: none; }
.nx-search input[type="search"] {
  border: none; background: transparent; outline: none;
  color: var(--header-ink); font: inherit; width: 92px;
  padding: 0; min-width: 0;
}
.nx-search input[type="search"]::placeholder { color: var(--header-muted); opacity: 1; }
.nx-search .nx-search-submit {
  position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden;
}

.nx-divider { width: 1px; height: 18px; background: var(--header-line); }

.nx-social { display: inline-flex; align-items: center; gap: 14px; list-style: none; margin: 0; padding: 0; color: var(--header-muted); }
.nx-social li { display: inline-flex; }
.nx-social a { display: inline-flex; color: inherit; opacity: .88; transition: opacity .15s ease, color .15s ease; }
.nx-social a:hover { color: var(--header-ink); opacity: 1; }

.nx-themebtn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  border: 1px solid var(--header-line); border-radius: 9px;
  background: oklch(1 0 0 / .06); color: var(--header-muted);
  cursor: pointer; transition: color .15s ease, background .15s ease;
}
.nx-themebtn:hover { color: var(--header-ink); }
.nx-themebtn .nx-icon-moon { display: none; }
.nx-themebtn .nx-icon-sun { display: block; }
:root[data-theme="dark"] .nx-themebtn .nx-icon-moon { display: block; }
:root[data-theme="dark"] .nx-themebtn .nx-icon-sun { display: none; }

.nx-menubtn {
  display: none; align-items: center; justify-content: center;
  width: 38px; height: 34px;
  border: 1px solid var(--header-line); border-radius: 9px;
  background: oklch(1 0 0 / .08); cursor: pointer;
}
.nx-menubtn .nx-bars { display: flex; flex-direction: column; gap: 4px; }
.nx-menubtn .nx-bars span { width: 16px; height: 2px; background: var(--header-ink); border-radius: 2px; display: block; }

/* Mobile menu panel (collapsed by default) */
.nx-mobile-menu {
  display: none;
  background: var(--header-bg);
  border-bottom: 1px solid var(--header-line);
  padding: 6px 18px 18px;
}
.nx-mobile-menu.is-open { display: block; }
.nx-mobile-menu ul { list-style: none; margin: 0; padding: 0; }
.nx-mobile-nav a {
  display: block; padding: 11px 4px;
  font-size: 15px; font-weight: 600; color: var(--header-ink);
  border-bottom: 1px solid var(--header-line);
}
.nx-mobile-search { margin: 14px 0 4px; }
.nx-mobile-search .nx-search { display: flex; }
.nx-mobile-search .nx-search input[type="search"] { flex: 1; width: auto; }
.nx-mobile-social { display: flex; gap: 18px; margin-top: 16px; color: var(--header-muted); }
.nx-mobile-social a { color: inherit; opacity: .88; }
.nx-mobile-social a:hover { color: var(--header-ink); opacity: 1; }

/* ==========================================================================
   Body layout
   ========================================================================== */
.nx-container { max-width: 1392px; margin: 0 auto; padding: 34px 34px 40px; }
.nx-grid { display: grid; grid-template-columns: minmax(0,1fr) 244px; gap: 40px; align-items: start; }
.nx-grid--single { gap: 46px; }
.nx-feed { display: flex; flex-direction: column; gap: 30px; }
.nx-main { display: flex; flex-direction: column; gap: 26px; min-width: 0; }
.nx-aside { display: flex; flex-direction: column; gap: 18px; }

/* ==========================================================================
   Sidebar
   ========================================================================== */
.nx-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; padding: 18px;
  display: flex; flex-direction: column; gap: 12px;
}

/* The About box works both as hand-written HTML (sidebar fallback) and as the
   "About me card" block pattern (core Group/Paragraph blocks). The extra
   __inner-container selectors cover older Group markup defensively. */
.nx-about,
.nx-about > .wp-block-group__inner-container {
  display: flex; flex-direction: column; gap: 13px;
}
.nx-about {
  background: var(--header-bg); color: var(--header-ink);
  border: 1px solid var(--header-line); border-radius: 14px; padding: 20px;
}
.nx-about p { margin: 0; } /* neutralize default <p> margins in the block version */
.nx-about a { color: inherit; }
.nx-about-top,
.nx-about-top > .wp-block-group__inner-container { display: flex; align-items: center; gap: 13px; }
.nx-about-ident,
.nx-about-ident > .wp-block-group__inner-container { display: flex; flex-direction: column; gap: 2px; }
.nx-avatar-lg {
  width: 48px; height: 48px; border-radius: 999px; flex: none; overflow: hidden;
  background: oklch(0.46 0.1 155); color: oklch(0.99 0.02 150);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 17px;
}
.nx-avatar-lg img { width: 100%; height: 100%; object-fit: cover; border-radius: 999px; display: block; }
.nx-about-name { font-size: 16px; font-weight: 700; }
.nx-about-handle { font-size: 12px; color: var(--header-muted); }
.nx-about-bio { font-size: 13.5px; line-height: 1.58; color: var(--header-muted); }
.nx-about-more { font-size: 12.5px; font-weight: 600; color: var(--header-ink); align-self: flex-start; }
.nx-about-more:hover { text-decoration: underline; }

/* When the About pattern is dropped into the widget area, its widget wrapper
   would otherwise put a white card around the forest card — cancel that. */
.nx-aside .nx-card:has(.nx-about) { background: none; border: 0; padding: 0; box-shadow: none; gap: 0; }

.nx-sec-label {
  font-family: var(--meta-font); font-size: 11px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: var(--accent);
  display: inline-flex; align-items: center; gap: 8px;
}
.nx-sec-label::before { content: ""; width: 14px; height: 2px; border-radius: 2px; background: var(--accent); display: inline-block; }

.nx-recent ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.nx-recent a { color: var(--ink); font-size: 13.5px; line-height: 1.4; }
.nx-recent a:hover { color: var(--accent); }

.nx-chips { display: flex; flex-wrap: wrap; gap: 7px; list-style: none; margin: 0; padding: 0; }
.nx-chips li { display: inline-flex; }
.nx-chip,
.nx-chips a {
  display: inline-block; font-size: 12.5px; color: var(--accent);
  background: var(--accent-soft); border: 1px solid transparent;
  padding: 4px 10px; border-radius: 7px;
}
.nx-chip:hover,
.nx-chips a:hover { border-color: var(--accent); }
.nx-chip .count, .nx-chips .count { opacity: .7; }

/* Core widgets dropped into the sidebar area should match the built-in look. */
.nx-aside .widget .nx-sec-label { margin-bottom: 4px; }
.nx-aside .widget ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.nx-aside .widget a { color: var(--ink); font-size: 13.5px; line-height: 1.4; }
.nx-aside .widget a:hover { color: var(--accent); }
.nx-aside .widget li { line-height: 1.4; }
.nx-aside .widget .children { padding-left: 14px; margin-top: 8px; }
.nx-aside .widget_categories ul,
.nx-aside .widget_tag_cloud ul,
.nx-aside .widget_product_categories ul { flex-direction: row; flex-wrap: wrap; gap: 7px; }
.nx-aside .widget_categories li a,
.nx-aside .widget_tag_cloud li a,
.nx-aside .widget_tag_cloud .tagcloud a {
  display: inline-block; font-size: 12.5px !important; color: var(--accent);
  background: var(--accent-soft); border: 1px solid transparent;
  padding: 4px 10px; border-radius: 7px;
}
.nx-aside .widget_categories li a:hover,
.nx-aside .widget_tag_cloud a:hover { border-color: var(--accent); color: var(--accent); }
.nx-aside .widget_search .nx-search { border-color: var(--line-strong); color: var(--ink-faint); }
.nx-aside .widget_search .nx-search input[type="search"] { color: var(--ink); width: 100%; }

/* Block-based sidebar (Appearance → Widgets blocks) — match the built-in look. */
.nx-aside .wp-block-heading,
.nx-aside .widget-title {
  font-family: var(--meta-font); font-size: 11px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin: 0 0 4px;
}
.nx-aside .wp-block-latest-posts,
.nx-aside .wp-block-latest-posts.wp-block-latest-posts__list,
.nx-aside .wp-block-archives,
.nx-aside .wp-block-page-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.nx-aside .wp-block-latest-posts a,
.nx-aside .wp-block-archives a,
.nx-aside .wp-block-page-list a { color: var(--ink); font-size: 13.5px; line-height: 1.4; text-decoration: none; }
.nx-aside .wp-block-latest-posts a:hover,
.nx-aside .wp-block-archives a:hover,
.nx-aside .wp-block-page-list a:hover { color: var(--accent); }
.nx-aside .wp-block-latest-posts__post-date { display: block; font-size: 11.5px; color: var(--ink-faint); margin-top: 2px; }
.nx-aside .wp-block-categories,
.nx-aside .wp-block-tag-cloud { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 7px; }
.nx-aside .wp-block-categories li { display: inline-flex; }
.nx-aside .wp-block-categories a,
.nx-aside .wp-block-tag-cloud a {
  display: inline-block; font-size: 12.5px; color: var(--accent);
  background: var(--accent-soft); border: 1px solid transparent;
  padding: 4px 10px; border-radius: 7px; text-decoration: none;
}
.nx-aside .wp-block-categories a:hover,
.nx-aside .wp-block-tag-cloud a:hover { border-color: var(--accent); color: var(--accent); }

/* The About card keeps its own link styling even inside a widget wrapper
   (otherwise the generic sidebar link rules above would recolor it). */
.nx-aside .nx-about a { color: var(--header-ink); text-decoration: none; }
.nx-aside .nx-about .nx-about-more,
.nx-aside .nx-about .nx-about-more a { font-size: 12.5px; font-weight: 600; color: var(--header-ink); }
.nx-aside .nx-about .nx-about-more:hover,
.nx-aside .nx-about .nx-about-more:hover a { text-decoration: underline; }

/* ==========================================================================
   Post feed (index / archive)
   ========================================================================== */
.nx-post { display: flex; flex-direction: column; gap: 15px; }
.nx-post + .nx-post { border-top: 1px solid var(--line); padding-top: 30px; }

.nx-metarow { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.nx-pill {
  font-family: var(--meta-font); font-size: 11.5px; font-weight: 600;
  color: var(--accent); background: var(--accent-soft);
  padding: 4px 10px; border-radius: 999px;
}
.nx-pill:hover { color: var(--accent); }
.nx-date { font-family: var(--meta-font); font-size: 12px; color: var(--ink-faint); }

.nx-title { font-size: 25px; font-weight: 700; letter-spacing: -.018em; line-height: 1.14; color: var(--ink); margin: 0; }
.nx-title a { color: inherit; }
.nx-title a:hover { color: var(--accent); }

.nx-hero { display: block; border-radius: 10px; border: 1px solid var(--line); overflow: hidden; }
.nx-hero img { display: block; width: 100%; height: 230px; object-fit: cover; }

.nx-body { display: block; }
.nx-body::after { content: ""; display: block; clear: both; } /* contain floats */
.nx-excerpt { font-size: 15px; line-height: 1.65; color: var(--ink-soft); }
.nx-excerpt p { margin: 0 0 12px; }
.nx-excerpt p:last-child { margin-bottom: 0; }
.nx-excerpt a:not(.nx-more):not(.more-link) { color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.nx-more {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--accent);
}
.nx-more:hover { text-decoration: underline; }

/* Pagination */
.nx-pagination {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  border-top: 1px solid var(--line); padding-top: 26px; margin-top: 4px;
  font-size: 13.5px; font-weight: 600;
}
.nx-pagination .nav-links { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; width: 100%; }
.nx-pagination .page-numbers {
  padding: 7px 13px; border-radius: 8px; color: var(--ink-soft);
  border: 1px solid var(--line);
}
.nx-pagination .page-numbers.current { background: var(--accent); color: var(--bg); border-color: transparent; }
.nx-pagination .page-numbers.dots { border: none; padding: 7px 4px; color: var(--ink-faint); }
.nx-pagination a.page-numbers:hover { border-color: var(--line-strong); }
.nx-pagination .page-numbers.next,
.nx-pagination .page-numbers.prev { color: var(--bg); background: var(--ink); border-color: transparent; }
.nx-pagination .page-numbers.next { margin-left: auto; }

/* ==========================================================================
   Single post
   ========================================================================== */
.nx-crumb { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--ink-faint); }
.nx-crumb .sep { color: var(--line-strong); }
.nx-crumb a:hover { color: var(--accent); }

.nx-h1 { font-size: 38px; font-weight: 800; letter-spacing: -.028em; line-height: 1.06; color: var(--ink); margin: 2px 0 0; }

.nx-single-hero { border-radius: 12px; border: 1px solid var(--line); overflow: hidden; }
.nx-single-hero img { display: block; width: 100%; height: 340px; object-fit: cover; }

/* Article body — element selectors so ANY authored block is styled.
   NB: normal block flow (not flex) so floated/aligned images wrap text. */
.nx-article { font-size: 16.5px; line-height: 1.72; color: var(--ink-soft); }
.nx-article::after { content: ""; display: block; clear: both; } /* contain floats */
.nx-article > * { margin: 0 0 20px; }
.nx-article > *:last-child { margin-bottom: 0; }
.nx-article > p:first-of-type { font-size: 19px; line-height: 1.6; color: var(--ink); font-weight: 500; }
.nx-article h2 { font-size: 23px; font-weight: 700; letter-spacing: -.012em; line-height: 1.2; color: var(--ink); margin: 30px 0 14px; }
.nx-article h3 { font-size: 19px; font-weight: 700; line-height: 1.3; color: var(--ink); margin: 26px 0 12px; }
.nx-article h4 { font-size: 16.5px; font-weight: 700; color: var(--ink); margin: 22px 0 10px; }
/* In-content links are clearly distinguished with an underline (not color alone). */
.nx-article a { color: var(--accent); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.nx-article a:hover { text-decoration-thickness: 2px; }
.nx-article strong, .nx-article b { color: var(--ink); }
.nx-article blockquote {
  border-left: 3px solid var(--accent); margin: 2px 0;
  padding: 2px 0 2px 22px; font-size: 20px; line-height: 1.5;
  color: var(--ink); font-weight: 500;
}
.nx-article blockquote p { margin: 0 0 10px; }
.nx-article blockquote p:last-child { margin: 0; }
.nx-article pre,
.nx-article .wp-block-code,
.nx-article .wp-block-preformatted {
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 16px 18px; font-family: var(--mono-font); font-size: 13.5px; line-height: 1.6;
  color: var(--ink); overflow-x: auto; white-space: pre; -moz-tab-size: 2; tab-size: 2;
}
.nx-article pre code, .nx-article .wp-block-code code { background: none; border: none; padding: 0; font-size: inherit; color: inherit; }
.nx-article code, .nx-article kbd {
  font-family: var(--mono-font); font-size: 0.86em;
  background: var(--surface); border: 1px solid var(--line); border-radius: 5px;
  padding: 1px 5px; color: var(--ink);
}
.nx-article ul, .nx-article ol { display: flex; flex-direction: column; gap: 9px; padding-left: 20px; margin: 0 0 20px; }
.nx-article li { line-height: 1.55; }
.nx-article li > ul, .nx-article li > ol { margin: 9px 0 0; }
.nx-article img { border-radius: 10px; border: 1px solid var(--line); }
/* Plain block spacing only — do NOT set flex here, or it overrides the row
   layout of block figures like galleries/tables (core owns their layout). */
.nx-article figure { margin: 8px 0 20px; }
.nx-article > figure > img { width: 100%; }
.nx-article figcaption { margin-top: 9px; }
.nx-article table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.nx-article th, .nx-article td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; vertical-align: top; }
.nx-article thead th, .nx-article th { background: var(--surface); color: var(--ink); font-weight: 700; }
.nx-article .more-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--accent);
}
.nx-article .more-link:hover { text-decoration: underline; }

/* WordPress alignment — text wraps around floated images/figures. */
.alignleft { float: left; margin: 6px 24px 16px 0; max-width: 50%; }
.alignright { float: right; margin: 6px 0 16px 24px; max-width: 50%; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignnone { max-width: 100%; }
/* Aligned <figure>s need higher specificity to beat the base `.nx-article figure`. */
.nx-article figure.alignleft { float: left; margin: 6px 24px 16px 0; max-width: 50%; }
.nx-article figure.alignright { float: right; margin: 6px 0 16px 24px; max-width: 50%; }
.nx-article .wp-caption, .nx-article .wp-block-image { max-width: 100%; }
.nx-article .wp-caption img { display: block; }

/* Image captions — visually distinct: small, muted, centered, italic. */
.wp-caption-text,
.wp-element-caption,
.nx-article figcaption,
.nx-excerpt figcaption {
  font-size: 12.5px; line-height: 1.5; color: var(--ink-faint);
  text-align: center; font-style: italic;
}
.wp-caption-text { margin: 8px 0 0; }
.nx-page-links { font-size: 13px; font-weight: 600; color: var(--ink-soft); display: flex; gap: 8px; }
.nx-page-links a { color: var(--accent); }

/* ==========================================================================
   Gutenberg block editor — theme skin for every common block
   (WordPress core ships the structural/layout CSS; this adds the theme look.)
   ========================================================================== */

/* --- text alignment + wide/full (constrained by the sidebar layout) --- */
.nx-article .has-text-align-left { text-align: left; }
.nx-article .has-text-align-center { text-align: center; }
.nx-article .has-text-align-right { text-align: right; }
.nx-article .alignwide,
.nx-article .alignfull { max-width: 100%; margin-left: 0; margin-right: 0; } /* main column has a sidebar; keep in-column */

/* --- drop cap --- */
.nx-article .has-drop-cap:first-letter {
  float: left; font-size: 3.1em; line-height: .82; font-weight: 800;
  margin: 8px 12px 0 0; color: var(--accent);
}

/* --- extra headings / definition lists / inline semantics --- */
.nx-article h5 { font-size: 14px; font-weight: 700; color: var(--ink); margin: 22px 0 8px; text-transform: uppercase; letter-spacing: .05em; }
.nx-article h6 { font-size: 12.5px; font-weight: 700; color: var(--ink-faint); margin: 20px 0 8px; text-transform: uppercase; letter-spacing: .07em; }
.nx-article dl { margin: 0 0 20px; }
.nx-article dt { font-weight: 700; color: var(--ink); }
.nx-article dd { margin: 0 0 12px; padding-left: 16px; }
.nx-article mark { background: var(--accent-soft); color: var(--ink); padding: 0 3px; border-radius: 3px; }
.nx-article abbr[title] { text-decoration: underline dotted; text-underline-offset: 2px; cursor: help; }
.nx-article sub, .nx-article sup { font-size: .72em; }

/* --- code block variants --- */
.nx-article .wp-block-code { margin: 0 0 20px; }
.nx-article .wp-block-verse {
  font-family: var(--mono-font); font-size: 14px; line-height: 1.7; white-space: pre-wrap;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; margin: 0 0 20px;
}

/* --- quotes + citations --- */
.nx-article .wp-block-quote { border-left: 3px solid var(--accent); padding: 2px 0 2px 22px; margin: 2px 0 20px; }
.nx-article blockquote cite,
.nx-article .wp-block-quote cite { display: block; margin-top: 10px; font-size: 13px; font-style: normal; font-weight: 600; color: var(--ink-faint); }
.nx-article .wp-block-quote.is-style-large,
.nx-article .wp-block-quote.is-large { border-left: none; padding-left: 0; text-align: center; }
.nx-article .wp-block-quote.is-style-large p { font-size: 24px; line-height: 1.5; }

/* --- pullquote --- */
.nx-article .wp-block-pullquote {
  border-top: 3px solid var(--accent); border-bottom: 3px solid var(--accent);
  padding: 24px 0; margin: 8px 0 24px; text-align: center;
}
.nx-article .wp-block-pullquote blockquote { border: none; margin: 0; padding: 0; }
.nx-article .wp-block-pullquote p { font-size: 24px; line-height: 1.4; font-weight: 600; color: var(--ink); }
.nx-article .wp-block-pullquote cite { display: block; margin-top: 12px; font-size: 12px; font-weight: 700; font-style: normal; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-faint); }

/* --- separator --- */
.nx-article hr,
.nx-article .wp-block-separator { border: 0; border-top: 1px solid var(--line-strong); height: 0; margin: 26px 0; opacity: 1; color: var(--line-strong); background: none; }
.nx-article .wp-block-separator:not(.is-style-wide):not(.is-style-dots) { width: 96px; margin-left: auto; margin-right: auto; }
.nx-article .wp-block-separator.is-style-dots { border: 0; text-align: center; line-height: 1; }

/* --- buttons --- */
.nx-article .wp-block-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 20px; }
.nx-article .wp-block-button__link {
  display: inline-block; background: var(--accent); color: var(--bg); border: 1px solid var(--accent);
  font-weight: 600; font-size: 14.5px; padding: 10px 20px; border-radius: 8px; text-decoration: none;
  transition: opacity .15s ease;
}
.nx-article .wp-block-button__link:hover { opacity: .9; text-decoration: none; }
.nx-article .wp-block-button.is-style-outline .wp-block-button__link,
.nx-article .wp-block-button.is-style-outline > .wp-block-button__link { background: transparent; color: var(--accent); }

/* --- core Social Icons block (in-content graphical links) --- */
.nx-article .wp-block-social-links { margin: 0 0 20px; gap: 8px; }
.nx-article .wp-block-social-links a,
.nx-article .wp-block-social-link a { text-decoration: none; box-shadow: none; }
.nx-article .wp-block-social-links a:hover { text-decoration: none; }

/* --- images / galleries --- */
.nx-article .wp-block-image { margin: 0 0 20px; }
.nx-article .wp-block-image img { border-radius: 10px; border: 1px solid var(--line); height: auto; }
.nx-article .wp-block-image.is-style-rounded img { border-radius: 16px; }
.nx-article .wp-block-gallery.has-nested-images { gap: 12px; margin: 0 0 22px; }
.nx-article .wp-block-gallery .wp-block-image { margin: 0; } /* don't disrupt core's grid spacing */
.nx-article .wp-block-gallery img { border-radius: 8px; border: 1px solid var(--line); }
.nx-article .wp-block-gallery figcaption,
.nx-article .blocks-gallery-caption { text-align: center; }

/* --- columns / group / media-text (nested-block spacing; no theme.json blockGap) --- */
.nx-article .wp-block-columns { display: flex; flex-wrap: wrap; gap: 24px; margin: 0 0 20px; }
.nx-article .wp-block-column > * { margin: 0 0 16px; }
.nx-article .wp-block-column > *:last-child { margin-bottom: 0; }
.nx-article .wp-block-group { margin: 0 0 20px; }
.nx-article .wp-block-group > * { margin-top: 0; margin-bottom: 16px; }
.nx-article .wp-block-group > *:last-child { margin-bottom: 0; }
.nx-article .wp-block-group.has-background { padding: 20px; border-radius: 12px; }
.nx-article .wp-block-media-text { margin: 0 0 20px; border-radius: 12px; overflow: hidden; }
.nx-article .wp-block-media-text__media img { border-radius: 0; border: 0; }

/* --- cover / embeds / media --- */
.nx-article .wp-block-cover { border-radius: 12px; overflow: hidden; margin: 0 0 22px; }
.nx-article .wp-block-embed { margin: 0 0 22px; }
.nx-article .wp-block-embed iframe { border-radius: 10px; max-width: 100%; }
.nx-article .wp-block-video video,
.nx-article .wp-block-audio audio { max-width: 100%; }
.nx-article .wp-block-video video { border-radius: 10px; }
.nx-article .wp-block-audio, .nx-article .wp-block-video { margin: 0 0 20px; }

/* --- file / details / footnotes --- */
.nx-article .wp-block-file {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 20px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px;
}
.nx-article .wp-block-file__button {
  background: var(--ink); color: var(--bg); border-radius: 8px; padding: 7px 14px;
  font-size: 13px; font-weight: 600; text-decoration: none; margin-left: auto;
}
.nx-article .wp-block-details {
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
  padding: 14px 16px; margin: 0 0 20px;
}
.nx-article .wp-block-details summary { font-weight: 700; color: var(--ink); cursor: pointer; }
.nx-article .wp-block-details[open] summary { margin-bottom: 12px; }
.nx-article .wp-block-footnotes { font-size: 14px; color: var(--ink-faint); }
.nx-article .wp-block-table { margin: 0 0 20px; overflow-x: auto; }
.nx-article .wp-block-table table { margin: 0; }
.nx-article .wp-block-table.is-style-stripes tbody tr:nth-child(odd) td,
.nx-article .wp-block-table.is-style-stripes tbody tr:nth-child(odd) th { background: var(--surface); }

/* ==========================================================================
   Editor color palette + font-size utility classes
   Colors use CSS vars so they adapt to light/dark automatically.
   ========================================================================== */
.has-ink-color { color: var(--ink); }
.has-body-color { color: var(--ink-soft); }
.has-muted-color { color: var(--ink-faint); }
.has-accent-color { color: var(--accent); }
.has-accent-soft-color { color: var(--accent-soft); }
.has-forest-color { color: var(--header-bg); }
.has-surface-color { color: var(--surface); }
.has-canvas-color { color: var(--canvas); }
.has-ink-background-color { background-color: var(--ink); }
.has-body-background-color { background-color: var(--ink-soft); }
.has-muted-background-color { background-color: var(--ink-faint); }
.has-accent-background-color { background-color: var(--accent); }
.has-accent-soft-background-color { background-color: var(--accent-soft); }
.has-forest-background-color { background-color: var(--header-bg); }
.has-surface-background-color { background-color: var(--surface); }
.has-canvas-background-color { background-color: var(--canvas); }
/* readable default text on the dark fills */
.has-forest-background-color:not(.has-text-color),
.has-ink-background-color:not(.has-text-color),
.has-accent-background-color:not(.has-text-color) { color: var(--bg); }

.has-small-font-size { font-size: 13px; }
.has-normal-font-size { font-size: 16.5px; }
.has-medium-font-size { font-size: 19px; }
.has-large-font-size { font-size: 24px; line-height: 1.3; }
.has-x-large-font-size { font-size: 32px; line-height: 1.15; letter-spacing: -.01em; }
.has-xx-large-font-size { font-size: 40px; line-height: 1.08; letter-spacing: -.02em; }

/* Post footer meta / tags */
.nx-postmeta { display: flex; flex-direction: column; gap: 14px; border-top: 1px solid var(--line); padding-top: 22px; }
.nx-tags { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.nx-tags-label { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-faint); margin-right: 4px; }
.nx-tag-chip { font-size: 12.5px; color: var(--ink-soft); background: var(--surface); border: 1px solid var(--line); padding: 4px 11px; border-radius: 999px; }
.nx-tag-chip:hover { border-color: var(--accent); color: var(--accent); }

/* Prev / next */
.nx-postnav { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.nx-navcard { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; background: var(--surface); }
.nx-navcard:hover { border-color: var(--line-strong); }
.nx-navcard--next { text-align: right; }
.nx-navlabel { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); }
.nx-navtitle { font-size: 14px; font-weight: 600; color: var(--ink); line-height: 1.3; }

/* ==========================================================================
   Comments
   ========================================================================== */
.nx-comments { display: flex; flex-direction: column; gap: 20px; border-top: 1px solid var(--line); padding-top: 26px; }
.nx-comh { font-size: 18px; font-weight: 700; color: var(--ink); }
.nx-commentlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 20px; }
.nx-commentlist .children { list-style: none; margin: 20px 0 0; padding: 0 0 0 24px; display: flex; flex-direction: column; gap: 20px; border-left: 1px solid var(--line); }
.nx-comment-inner { display: flex; gap: 13px; }
.nx-avatar { flex: none; width: 38px; height: 38px; border-radius: 999px; overflow: hidden; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; }
.nx-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 999px; }
.nx-combody { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.nx-comname { font-size: 14px; font-weight: 700; color: var(--ink); }
.nx-comname .nx-comdate { font-weight: 500; color: var(--ink-faint); font-size: 12px; margin-left: 8px; }
.nx-comtext { font-size: 14.5px; line-height: 1.6; color: var(--ink-soft); }
.nx-comtext p { margin: 0 0 10px; }
.nx-comtext p:last-child { margin: 0; }
.nx-comtext a { color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.nx-reply a, .nx-reply { font-size: 12px; font-weight: 600; color: var(--accent); }
.nx-reply a:hover { text-decoration: underline; }
.nx-comment.bypostauthor > .nx-comment-inner .nx-comname::after {
  content: "Author"; font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--accent); background: var(--accent-soft);
  padding: 2px 6px; border-radius: 999px; margin-left: 8px; vertical-align: middle;
}
.comment-awaiting-moderation { font-size: 12px; color: var(--ink-faint); font-style: italic; }
.nx-comments-closed { font-size: 13.5px; color: var(--ink-faint); }

/* Comment form */
.nx-form { display: flex; flex-direction: column; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.nx-form .comment-form-fields { display: flex; gap: 12px; flex-wrap: wrap; }
.nx-form .comment-form-author,
.nx-form .comment-form-email { flex: 1 1 160px; display: flex; flex-direction: column; gap: 5px; }
.nx-form .comment-form-url,
.nx-form .comment-form-comment { display: flex; flex-direction: column; gap: 5px; }
.nx-form label { font-size: 12px; font-weight: 600; color: var(--ink-faint); }
.nx-input, .nx-textarea,
.nx-form input[type="text"],
.nx-form input[type="email"],
.nx-form input[type="url"],
.nx-form textarea {
  width: 100%; border: 1px solid var(--line-strong); border-radius: 8px;
  padding: 10px 12px; font-family: var(--ui-font); font-size: 14px;
  color: var(--ink); background: var(--bg);
}
.nx-textarea, .nx-form textarea { resize: vertical; min-height: 92px; }
.nx-submit,
.nx-form input[type="submit"] {
  align-self: flex-start; background: var(--ink); color: var(--bg);
  border: none; border-radius: 8px; padding: 10px 18px;
  font-family: var(--ui-font); font-size: 13.5px; font-weight: 600; cursor: pointer;
}
.nx-form .comment-notes,
.nx-form .comment-form-cookies-consent { font-size: 12px; color: var(--ink-faint); }
.nx-form .comment-form-cookies-consent { flex-direction: row; align-items: center; gap: 8px; display: flex; }

/* ==========================================================================
   Search results / archive / 404 headers + generic page
   ========================================================================== */
.nx-page-header { display: flex; flex-direction: column; gap: 8px; }
.nx-page-title { font-size: 30px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; color: var(--ink); margin: 0; }
.nx-page-subtitle { font-size: 14px; color: var(--ink-faint); }
.nx-search-result { display: flex; flex-direction: column; gap: 8px; }
.nx-search-result + .nx-search-result { border-top: 1px solid var(--line); padding-top: 22px; }
.nx-notfound { font-size: 15px; line-height: 1.65; color: var(--ink-soft); }
.nx-inline-search { margin-top: 8px; }
.nx-inline-search .nx-search {
  border-color: var(--line-strong); color: var(--ink-faint);
}
.nx-inline-search .nx-search input[type="search"] { color: var(--ink); width: 100%; }
.nx-inline-search .nx-search input[type="search"]::placeholder { color: var(--ink-faint); }

/* Static page (about, etc.) reuses article typography */
.nx-page-body { }

/* ==========================================================================
   Responsive — real viewport media queries (same breakpoints as prototype)
   ========================================================================== */
@media (max-width: 880px) {
  .nx-grid { grid-template-columns: 1fr; gap: 30px; }
  .nx-grid--single { gap: 34px; }
  .nx-aside { flex-direction: row; flex-wrap: wrap; }
  .nx-aside .nx-card, .nx-aside .nx-about { flex: 1 1 260px; }
}

@media (max-width: 600px) {
  .nx-page { padding: 12px 12px 40px; }
  .nx-header { padding: 14px 18px; }
  .nx-nav-links, .nx-header .nx-search, .nx-header .nx-social, .nx-divider { display: none; }
  .nx-menubtn { display: inline-flex; }
  .nx-container { padding: 22px 18px 30px; }
  .nx-aside { flex-direction: column; }
  .nx-title { font-size: 21px; }
  .nx-hero img { height: 180px; }
  .nx-single-hero img { height: 200px; }
  .nx-h1 { font-size: 27px; }
  .nx-post + .nx-post { padding-top: 24px; }
  .nx-postnav { grid-template-columns: 1fr; }
  .nx-navcard--next { text-align: left; }
  /* Aligned images go full width on small screens for readability. */
  .alignleft, .alignright,
  .nx-article figure.alignleft, .nx-article figure.alignright {
    float: none; max-width: 100%; margin: 8px 0 16px;
  }
}

/* Respect users who prefer reduced motion. */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
