/* ═══════════════════════════════════════════════════════════════════════════
   EaglePress — NewsTheme
   Inspired by classic news magazine layouts (NewsBlogger style)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── CSS Custom Properties ───────────────────────────────────────────────── */
:root {
  --nt-accent:         #d32f2f;
  --nt-accent-hover:   #b71c1c;
  --nt-accent-light:   rgba(211,47,47,0.1);

  --nt-bg:             #f4f4f4;
  --nt-card-bg:        #ffffff;
  --nt-text:           #1a1a1a;
  --nt-text-muted:     #666666;
  --nt-border:         #e0e0e0;

  --nt-header-bg:      #0f0f0f;
  --nt-nav-bg:         #1a1a1a;
  --nt-topbar-bg:      var(--nt-accent);
  --nt-topbar-text:    #ffffff;
  --nt-ticker-bg:      #0f0f0f;
  --nt-ticker-text:    #ffffff;

  --nt-sidebar-bg:     #ffffff;
  --nt-widget-border:  var(--nt-accent);
  --nt-footer-bg:      #111111;
  --nt-footer-text:    rgba(255,255,255,0.75);

  --nt-radius:         6px;
  --nt-shadow:         0 2px 8px rgba(0,0,0,0.08);
  --nt-shadow-hover:   0 6px 20px rgba(0,0,0,0.14);

  --nt-font-sans:      -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --nt-font-serif:     Georgia, 'Times New Roman', serif;
  --nt-font-mono:      'Fira Code', 'Courier New', monospace;

  --nt-max-width:      1220px;
  --nt-sidebar-width:  300px;
  --nt-gap:            24px;

  /* For reading progress */
  --nt-progress-color: var(--nt-accent);
}

/* ── Dark Mode ───────────────────────────────────────────────────────────── */
[data-theme="dark"] {
  --nt-bg:         #141414;
  --nt-card-bg:    #1e1e1e;
  --nt-text:       #e8e8e8;
  --nt-text-muted: #999999;
  --nt-border:     #2e2e2e;

  --nt-header-bg:  #0a0a0a;
  --nt-nav-bg:     #0f0f0f;
  --nt-sidebar-bg: #1e1e1e;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  margin: 0;
  padding: 0;
  font-family: var(--nt-font-sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--nt-text);
  background: var(--nt-bg);
  transition: background 0.2s, color 0.2s;
}

a { color: var(--nt-accent); text-decoration: none; }
a:hover { color: var(--nt-accent-hover); }

img { max-width: 100%; height: auto; display: block; }

ul, ol { margin: 0; padding: 0; list-style: none; }

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
}

/* ── Reading Progress Bar ────────────────────────────────────────────────── */
.nt-reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--nt-progress-color);
  z-index: 10000;
  transition: width 0.1s linear;
  display: none;
}
body.single-post .nt-reading-progress { display: block; }

/* ── Top Bar ─────────────────────────────────────────────────────────────── */
#nt-topbar {
  background: var(--nt-topbar-bg);
  color: var(--nt-topbar-text);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.03em;
  z-index: 200;
}
.nt-topbar-inner {
  max-width: var(--nt-max-width);
  margin: 0 auto;
  padding: 6px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nt-topbar-date { opacity: 0.9; }
.nt-topbar-right { display: flex; align-items: center; gap: 8px; }

/* Dark mode toggle in topbar */
.nt-dark-toggle {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #fff;
  transition: background 0.2s;
}
.nt-dark-toggle:hover { background: rgba(255,255,255,0.28); }

/* ── Header ──────────────────────────────────────────────────────────────── */
#nt-header {
  background: var(--nt-header-bg);
  border-bottom: 3px solid var(--nt-accent);
  position: sticky;
  top: 0;
  z-index: 150;
}
.nt-header-inner {
  max-width: var(--nt-max-width);
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.nt-logo {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  line-height: 1.1;
}
.nt-logo-main {
  font-size: 28px;
  font-weight: 800;
  font-family: var(--nt-font-serif);
  color: #ffffff;
  letter-spacing: -0.5px;
}
.nt-logo-tag {
  font-size: 11px;
  color: var(--nt-accent);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 1px;
}
.nt-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.nt-search-btn {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--nt-radius);
  color: rgba(255,255,255,0.8);
  font-size: 16px;
  padding: 7px 12px;
  transition: background 0.2s;
}
.nt-search-btn:hover { background: rgba(255,255,255,0.18); }
.nt-search-form-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 4px;
}
.nt-search-input {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--nt-radius);
  color: #fff;
  font-size: 14px;
  padding: 7px 12px;
  width: 220px;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}
.nt-search-input::placeholder { color: rgba(255,255,255,0.45); }
.nt-search-input:focus { border-color: var(--nt-accent); background: rgba(255,255,255,0.15); }
.nt-search-go {
  background: var(--nt-accent);
  color: #fff;
  border-radius: var(--nt-radius);
  font-size: 13px;
  font-weight: 600;
  padding: 7px 14px;
  transition: background 0.2s;
}
.nt-search-go:hover { background: var(--nt-accent-hover); }

/* ── Navigation ──────────────────────────────────────────────────────────── */
#nt-nav {
  background: var(--nt-nav-bg);
  position: sticky;
  top: 55px;
  z-index: 140;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.nt-nav-inner {
  max-width: var(--nt-max-width);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
}
#nt-menu-toggle {
  display: none;
  color: rgba(255,255,255,0.8);
  font-size: 20px;
  padding: 10px 0;
}
#nt-nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nt-nav-link {
  display: block;
  padding: 12px 16px;
  color: rgba(255,255,255,0.75);
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
  border-bottom: 3px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.nt-nav-link:hover {
  color: #ffffff;
  border-bottom-color: var(--nt-accent);
}
.nt-nav-home .nt-nav-link,
li:first-child .nt-nav-link { border-bottom-color: var(--nt-accent); color: #ffffff; }

#nt-nav.nt-nav-sticky {
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

/* ── Breaking News Ticker ────────────────────────────────────────────────── */
#nt-ticker {
  background: var(--nt-ticker-bg);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  overflow: hidden;
}
.nt-ticker-inner {
  max-width: var(--nt-max-width);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  height: 36px;
  gap: 14px;
}
.nt-ticker-label {
  background: var(--nt-accent);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  padding: 3px 10px;
  border-radius: 3px;
  white-space: nowrap;
  flex-shrink: 0;
}
.nt-ticker-wrap {
  flex: 1;
  overflow: hidden;
  position: relative;
}
.nt-ticker-track {
  display: inline-flex;
  white-space: nowrap;
  animation: nt-ticker-scroll 40s linear infinite;
}
.nt-ticker-wrap:hover .nt-ticker-track { animation-play-state: paused; }
.nt-ticker-item {
  padding: 0 32px;
  font-size: 13px;
}
.nt-ticker-item a {
  color: rgba(255,255,255,0.82);
  text-decoration: none;
  transition: color 0.2s;
}
.nt-ticker-item a:hover { color: var(--nt-accent); }
.nt-ticker-item::before {
  content: '●';
  color: var(--nt-accent);
  margin-right: 12px;
  font-size: 8px;
  vertical-align: middle;
}
@keyframes nt-ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── Main Wrapper ────────────────────────────────────────────────────────── */
#nt-wrapper {
  max-width: var(--nt-max-width);
  margin: 0 auto;
  padding: 28px 20px;
  display: grid;
  grid-template-columns: 1fr var(--nt-sidebar-width);
  gap: var(--nt-gap);
  align-items: start;
}
#nt-main { min-width: 0; }
#nt-sidebar { min-width: 0; }

/* ── Hero Card ───────────────────────────────────────────────────────────── */
.nt-hero-card {
  background: var(--nt-card-bg);
  border-radius: var(--nt-radius);
  box-shadow: var(--nt-shadow);
  overflow: hidden;
  margin-bottom: var(--nt-gap);
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 280px;
  border-left: 4px solid var(--nt-accent);
  transition: box-shadow 0.2s;
}
.nt-hero-card:hover { box-shadow: var(--nt-shadow-hover); }
.nt-hero-image {
  overflow: hidden;
  position: relative;
}
.nt-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.nt-hero-card:hover .nt-hero-image img { transform: scale(1.03); }
.nt-hero-body {
  padding: 28px 28px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.nt-hero-cats { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.nt-hero-title {
  font-family: var(--nt-font-serif);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 12px;
  color: var(--nt-text);
}
.nt-hero-title a { color: inherit; text-decoration: none; }
.nt-hero-title a:hover { color: var(--nt-accent); }
.nt-hero-excerpt {
  color: var(--nt-text-muted);
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.nt-hero-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--nt-text-muted);
  margin-bottom: 16px;
}
.nt-hero-meta a { color: var(--nt-text-muted); }
.nt-hero-meta a:hover { color: var(--nt-accent); }
.nt-hero-read-btn {
  display: inline-block;
  background: var(--nt-accent);
  color: #fff;
  padding: 9px 20px;
  border-radius: var(--nt-radius);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  align-self: flex-start;
  transition: background 0.2s, transform 0.15s;
}
.nt-hero-read-btn:hover { background: var(--nt-accent-hover); color: #fff; transform: translateY(-1px); }

/* ── Section Header ──────────────────────────────────────────────────────── */
.nt-section-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.nt-section-title {
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--nt-text);
  white-space: nowrap;
  margin: 0;
  padding-left: 10px;
  border-left: 3px solid var(--nt-accent);
}
.nt-section-rule {
  flex: 1;
  height: 1px;
  background: var(--nt-border);
}

/* ── News Grid ───────────────────────────────────────────────────────────── */
.nt-news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: var(--nt-gap);
}
.nt-news-card {
  background: var(--nt-card-bg);
  border-radius: var(--nt-radius);
  box-shadow: var(--nt-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s, transform 0.2s;
  border-top: 3px solid transparent;
}
.nt-news-card:hover {
  box-shadow: var(--nt-shadow-hover);
  transform: translateY(-2px);
  border-top-color: var(--nt-accent);
}
.nt-card-thumb {
  display: block;
  overflow: hidden;
  aspect-ratio: 16/9;
}
.nt-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}
.nt-news-card:hover .nt-card-thumb img { transform: scale(1.06); }
.nt-card-no-img {
  background: linear-gradient(135deg, var(--nt-nav-bg) 60%, var(--nt-accent) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.nt-card-no-img-icon { font-size: 28px; opacity: 0.5; }
.nt-card-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.nt-card-cats { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.nt-card-title {
  font-size: 15px;
  font-weight: 700;
  font-family: var(--nt-font-serif);
  line-height: 1.35;
  margin: 0 0 8px;
  color: var(--nt-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.nt-card-title a { color: inherit; text-decoration: none; }
.nt-card-title a:hover { color: var(--nt-accent); }
.nt-card-excerpt {
  font-size: 13px;
  color: var(--nt-text-muted);
  line-height: 1.55;
  margin: 0 0 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
.nt-card-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--nt-text-muted);
  margin-top: auto;
}
.nt-card-meta a { color: var(--nt-text-muted); }
.nt-card-meta a:hover { color: var(--nt-accent); }

/* ── Category Badge ──────────────────────────────────────────────────────── */
.nt-cat-badge {
  display: inline-block;
  background: var(--nt-accent);
  color: #ffffff !important;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: 3px;
  text-decoration: none !important;
  transition: background 0.2s;
}
.nt-cat-badge:hover { background: var(--nt-accent-hover); }

/* Meta separators */
.nt-meta-sep { opacity: 0.4; }
.nt-meta-author a { color: inherit; }
.nt-meta-author a:hover { color: var(--nt-accent); }
.nt-meta-date { color: var(--nt-text-muted); }

/* ── Sidebar ─────────────────────────────────────────────────────────────── */
#nt-sidebar { display: flex; flex-direction: column; gap: 20px; }
.nt-widget {
  background: var(--nt-sidebar-bg);
  border-radius: var(--nt-radius);
  box-shadow: var(--nt-shadow);
  overflow: hidden;
}
.nt-widget-header {
  background: var(--nt-text);
  padding: 10px 16px;
  border-left: 4px solid var(--nt-accent);
}
[data-theme="dark"] .nt-widget-header { background: #0a0a0a; }
.nt-widget-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #ffffff;
  margin: 0;
}
.nt-widget-empty {
  padding: 14px 16px;
  font-size: 13px;
  color: var(--nt-text-muted);
  margin: 0;
}

/* Latest list */
.nt-latest-list { padding: 8px 0; }
.nt-latest-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--nt-border);
}
.nt-latest-item:last-child { border-bottom: none; }
.nt-latest-thumb {
  flex-shrink: 0;
  display: block;
  width: 72px;
  height: 54px;
  overflow: hidden;
  border-radius: 4px;
}
.nt-latest-thumb img { width: 100%; height: 100%; object-fit: cover; }
.nt-latest-info { flex: 1; min-width: 0; }
.nt-latest-title {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--nt-text);
  line-height: 1.35;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-decoration: none;
}
.nt-latest-title:hover { color: var(--nt-accent); }
.nt-latest-date { font-size: 11px; color: var(--nt-text-muted); }

/* Categories */
.nt-categories-list { padding: 8px 0; }
.nt-categories-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px;
  border-bottom: 1px solid var(--nt-border);
  font-size: 13px;
}
.nt-categories-list li:last-child { border-bottom: none; }
.nt-categories-list a { color: var(--nt-text); text-decoration: none; transition: color 0.2s; }
.nt-categories-list a:hover { color: var(--nt-accent); }
.nt-cat-count {
  font-size: 11px;
  color: var(--nt-text-muted);
  background: var(--nt-bg);
  border-radius: 10px;
  padding: 1px 8px;
}

/* Tags cloud */
.nt-tags-cloud { padding: 12px 16px; display: flex; flex-wrap: wrap; gap: 6px; }
.nt-tag-pill {
  display: inline-block;
  background: var(--nt-bg);
  color: var(--nt-text-muted);
  border: 1px solid var(--nt-border);
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 20px;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.nt-tag-pill:hover {
  background: var(--nt-accent);
  color: #ffffff;
  border-color: var(--nt-accent);
}

/* ── Article / Single Post ───────────────────────────────────────────────── */
.nt-article {
  background: var(--nt-card-bg);
  border-radius: var(--nt-radius);
  box-shadow: var(--nt-shadow);
  overflow: hidden;
}
.nt-article-header {
  padding: 28px 32px 20px;
  border-bottom: 1px solid var(--nt-border);
}
.nt-article-cats { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.nt-article-title {
  font-size: 32px;
  font-weight: 800;
  font-family: var(--nt-font-serif);
  line-height: 1.2;
  margin: 0 0 16px;
  color: var(--nt-text);
}
.nt-article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--nt-text-muted);
}
.nt-meta-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--nt-accent);
}
.nt-meta-author a,
.nt-meta-comments { color: var(--nt-text-muted); text-decoration: none; }
.nt-meta-author a:hover,
.nt-meta-comments:hover { color: var(--nt-accent); }

.nt-article-featured-img {
  width: 100%;
  max-height: 460px;
  object-fit: cover;
  display: block;
}

/* ── Article Body (post content) ─────────────────────────────────────────── */
.nt-article-body {
  padding: 28px 32px 24px;
  color: var(--nt-text);
  font-family: var(--nt-font-sans);
  font-size: 16px;
  line-height: 1.75;
}
.nt-article-body::after { content: ''; display: table; clear: both; }

.nt-article-body h1, .nt-article-body h2, .nt-article-body h3,
.nt-article-body h4, .nt-article-body h5, .nt-article-body h6 {
  font-family: var(--nt-font-serif);
  font-weight: 700;
  line-height: 1.3;
  color: var(--nt-text);
  margin: 1.4em 0 0.5em;
}
.nt-article-body h2 { font-size: 24px; border-bottom: 2px solid var(--nt-accent); padding-bottom: 6px; }
.nt-article-body h3 { font-size: 20px; }
.nt-article-body h4 { font-size: 17px; }

.nt-article-body p { margin: 0 0 1.1em; }

.nt-article-body ul, .nt-article-body ol {
  padding-left: 1.6em;
  margin: 0 0 1em;
}
.nt-article-body ul { list-style: disc; }
.nt-article-body ol { list-style: decimal; }
.nt-article-body li { margin-bottom: 0.4em; }

.nt-article-body blockquote {
  margin: 1.4em 0;
  padding: 14px 20px 14px 22px;
  border-left: 4px solid var(--nt-accent);
  background: var(--nt-accent-light);
  border-radius: 0 var(--nt-radius) var(--nt-radius) 0;
  font-style: italic;
  color: var(--nt-text-muted);
}

.nt-article-body code {
  font-family: var(--nt-font-mono);
  font-size: 0.875em;
  background: rgba(0,0,0,0.06);
  border: 1px solid var(--nt-border);
  border-radius: 4px;
  padding: 0.1em 0.4em;
}
[data-theme="dark"] .nt-article-body code {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.12);
}

.nt-article-body pre {
  margin: 1em 0;
  border-radius: var(--nt-radius);
  overflow-x: auto;
  background: #1e1e2e;
  border: 1px solid rgba(255,255,255,0.08);
}
.nt-article-body pre code {
  background: transparent;
  border: none;
  padding: 0;
  font-size: 14px;
  line-height: 1.6;
}
[data-theme="dark"] .nt-article-body pre {
  background: #12121c;
  border-color: rgba(255,255,255,0.06);
}
[data-theme="dark"] .nt-article-body pre code { color: #e0e0e0; }

.nt-article-body a { color: var(--nt-accent); text-decoration: underline; text-underline-offset: 2px; }
.nt-article-body a:hover { color: var(--nt-accent-hover); }

.nt-article-body img {
  border-radius: var(--nt-radius);
  max-width: 100%;
}

.nt-article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0;
  font-size: 14px;
}
.nt-article-body th,
.nt-article-body td {
  padding: 9px 14px;
  border: 1px solid var(--nt-border);
  text-align: left;
}
.nt-article-body th {
  background: var(--nt-text);
  color: var(--nt-card-bg);
  font-weight: 600;
}
[data-theme="dark"] .nt-article-body th { background: #2a2a2a; color: #e0e0e0; }

.nt-article-body hr {
  border: none;
  border-top: 2px solid var(--nt-accent);
  margin: 2em 0;
  opacity: 0.35;
}

/* Image alignment */
.nt-article-body .ep-img-center { display: block; margin: 1.2em auto; text-align: center; }
.nt-article-body .ep-img-left  { float: left; margin: 0.5em 1.4em 0.8em 0; }
.nt-article-body .ep-img-right { float: right; margin: 0.5em 0 0.8em 1.4em; }

/* ── Post Tags ───────────────────────────────────────────────────────────── */
.nt-post-tags {
  padding: 16px 32px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  border-top: 1px solid var(--nt-border);
}
.nt-post-tags-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--nt-text-muted);
}

/* ── Author Box ──────────────────────────────────────────────────────────── */
.nt-author-box {
  background: var(--nt-card-bg);
  border-radius: var(--nt-radius);
  box-shadow: var(--nt-shadow);
  padding: 24px;
  margin: 20px 0;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  border-left: 4px solid var(--nt-accent);
}
.nt-author-avatar {
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 3px solid var(--nt-accent);
}
.nt-author-info { flex: 1; min-width: 0; }
.nt-author-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}
.nt-author-name { font-size: 17px; font-weight: 700; margin: 0; }
.nt-author-name a { color: var(--nt-text); text-decoration: none; }
.nt-author-name a:hover { color: var(--nt-accent); }
.nt-author-role {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--nt-accent);
  background: var(--nt-accent-light);
  padding: 2px 8px;
  border-radius: 20px;
}
.nt-author-postcount { font-size: 12px; color: var(--nt-text-muted); }
.nt-author-bio { font-size: 14px; color: var(--nt-text-muted); line-height: 1.6; margin: 0 0 10px; }
.nt-author-link { font-size: 13px; font-weight: 600; color: var(--nt-accent); text-decoration: none; }
.nt-author-link:hover { color: var(--nt-accent-hover); }

/* ── Share Bar ───────────────────────────────────────────────────────────── */
.nt-share-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 32px;
  border-top: 1px solid var(--nt-border);
  flex-wrap: wrap;
}
.nt-share-label { font-size: 13px; font-weight: 600; color: var(--nt-text-muted); }
.nt-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--nt-border);
  background: var(--nt-card-bg);
  color: var(--nt-text);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.nt-share-btn:hover {
  background: var(--nt-accent);
  border-color: var(--nt-accent);
  color: #fff;
}

/* ── Comments ────────────────────────────────────────────────────────────── */
.nt-comments-section {
  background: var(--nt-card-bg);
  border-radius: var(--nt-radius);
  box-shadow: var(--nt-shadow);
  padding: 28px 32px;
  margin-top: 20px;
}
.nt-comments-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--nt-accent);
  color: var(--nt-text);
}
.nt-no-comments, .nt-comments-closed {
  font-size: 14px;
  color: var(--nt-text-muted);
  padding: 10px 0;
}
.nt-comments-list { display: flex; flex-direction: column; gap: 16px; margin-bottom: 28px; }
.nt-comment {
  display: flex;
  gap: 14px;
  padding: 16px;
  background: var(--nt-bg);
  border-radius: var(--nt-radius);
  border: 1px solid var(--nt-border);
}
.nt-comment-depth-1 { margin-left: 40px; }
.nt-comment-depth-2 { margin-left: 80px; }
.nt-comment-avatar img {
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.nt-comment-body { flex: 1; min-width: 0; }
.nt-comment-header {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
  margin-bottom: 8px;
}
.nt-comment-author { font-size: 14px; color: var(--nt-text); }
.nt-comment-date { font-size: 12px; color: var(--nt-text-muted); }
.nt-comment-content { font-size: 14px; line-height: 1.65; color: var(--nt-text); }
.nt-comment-actions { margin-top: 8px; }
.nt-reply-btn {
  font-size: 12px;
  font-weight: 600;
  color: var(--nt-accent);
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
}
.nt-reply-btn:hover { color: var(--nt-accent-hover); }

/* ── Comment Form ────────────────────────────────────────────────────────── */
.nt-comment-form-wrap { margin-top: 20px; }
.nt-form-title { font-size: 16px; font-weight: 700; margin: 0 0 16px; color: var(--nt-text); }
.nt-reply-banner {
  background: var(--nt-accent-light);
  border: 1px solid rgba(211,47,47,0.3);
  border-radius: var(--nt-radius);
  padding: 10px 16px;
  font-size: 14px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.nt-cancel-reply {
  font-size: 12px;
  color: var(--nt-accent);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  margin-left: auto;
}
.nt-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.nt-form-group { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.nt-form-group label { font-size: 13px; font-weight: 600; color: var(--nt-text); }
.nt-required { color: var(--nt-accent); }
.nt-input, .nt-textarea {
  padding: 9px 13px;
  border: 1px solid var(--nt-border);
  border-radius: var(--nt-radius);
  background: var(--nt-card-bg);
  color: var(--nt-text);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
}
.nt-input:focus, .nt-textarea:focus {
  border-color: var(--nt-accent);
  box-shadow: 0 0 0 3px var(--nt-accent-light);
}
.nt-textarea { resize: vertical; min-height: 110px; }
.nt-submit-btn {
  display: inline-block;
  background: var(--nt-accent);
  color: #fff;
  border: none;
  padding: 10px 24px;
  border-radius: var(--nt-radius);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}
.nt-submit-btn:hover { background: var(--nt-accent-hover); color: #fff; transform: translateY(-1px); }
.nt-submit-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.nt-form-status { margin-top: 10px; font-size: 13px; }
.nt-form-status.nt-success { color: #2e7d32; }
.nt-form-status.nt-error   { color: #c62828; }
.nt-logged-in-as { font-size: 13px; color: var(--nt-text-muted); margin: 0 0 12px; }

/* ── Archive / Category header ───────────────────────────────────────────── */
.nt-archive-header {
  background: var(--nt-card-bg);
  border-radius: var(--nt-radius);
  border-left: 4px solid var(--nt-accent);
  padding: 20px 24px;
  margin-bottom: 20px;
  box-shadow: var(--nt-shadow);
}
.nt-archive-title { font-size: 24px; font-weight: 700; margin: 0 0 6px; }
.nt-archive-desc  { font-size: 14px; color: var(--nt-text-muted); margin: 0; }
.nt-results-count { font-size: 14px; color: var(--nt-text-muted); margin: 6px 0 0; }

/* ── No posts ────────────────────────────────────────────────────────────── */
.nt-no-posts {
  grid-column: 1/-1;
  text-align: center;
  padding: 40px 20px;
  background: var(--nt-card-bg);
  border-radius: var(--nt-radius);
  color: var(--nt-text-muted);
  font-size: 15px;
}
.nt-no-posts a { color: var(--nt-accent); }

/* ── Profile ─────────────────────────────────────────────────────────────── */
.nt-profile-hero {
  background: var(--nt-card-bg);
  border-radius: var(--nt-radius);
  box-shadow: var(--nt-shadow);
  margin-bottom: 24px;
  overflow: hidden;
  border-top: 4px solid var(--nt-accent);
}
.nt-profile-hero-inner {
  display: flex;
  gap: 24px;
  padding: 28px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.ep-profile-avatar-wrap { position: relative; display: inline-block; cursor: pointer; }
.nt-profile-avatar { border-radius: 50%; object-fit: cover; border: 4px solid var(--nt-accent); }
.ep-avatar-overlay {
  position: absolute; inset: 0; border-radius: 50%;
  background: rgba(0,0,0,0.5); display: flex; align-items: center;
  justify-content: center; font-size: 22px; opacity: 0;
  transition: opacity 0.2s;
}
.ep-profile-avatar-wrap:hover .ep-avatar-overlay { opacity: 1; }
.ep-avatar-upload-btn {
  position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%);
  background: var(--nt-accent); color: #fff; border: none; border-radius: 20px;
  font-size: 11px; padding: 3px 10px; white-space: nowrap; cursor: pointer;
}
.nt-profile-info { flex: 1; min-width: 200px; }
.nt-profile-name { font-size: 26px; font-weight: 800; margin: 0 0 4px; color: var(--nt-text); }
.nt-profile-username { font-size: 14px; color: var(--nt-text-muted); margin-bottom: 10px; }
.nt-profile-bio { font-size: 14px; color: var(--nt-text-muted); line-height: 1.6; margin: 0 0 8px; }
.nt-profile-website { font-size: 13px; color: var(--nt-accent); display: block; margin-bottom: 6px; }
.nt-profile-joined { font-size: 12px; color: var(--nt-text-muted); }
.nt-profile-stats { display: flex; gap: 16px; }
.nt-stat { text-align: center; }
.nt-stat strong { display: block; font-size: 22px; font-weight: 800; color: var(--nt-accent); }
.nt-stat span { font-size: 12px; color: var(--nt-text-muted); text-transform: uppercase; letter-spacing: 0.06em; }

/* ── Auth (Login / Register) ─────────────────────────────────────────────── */
.nt-auth-page {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 20px 0;
}
.nt-auth-card {
  background: var(--nt-card-bg);
  border-radius: var(--nt-radius);
  box-shadow: var(--nt-shadow-hover);
  width: 100%;
  max-width: 420px;
  overflow: hidden;
}
.nt-auth-header {
  background: var(--nt-accent);
  padding: 24px;
  text-align: center;
}
.nt-auth-logo {
  font-size: 24px;
  font-weight: 800;
  font-family: var(--nt-font-serif);
  color: #fff;
}
.nt-auth-body { padding: 28px; }
.nt-auth-title { font-size: 20px; font-weight: 700; margin: 0 0 20px; color: var(--nt-text); }
.nt-auth-link { padding: 0 28px 20px; font-size: 13px; text-align: center; color: var(--nt-text-muted); margin: 0; }
.nt-auth-link a { color: var(--nt-accent); font-weight: 600; }
.nt-error-message {
  background: #ffeaea;
  border: 1px solid #f5c6c6;
  border-left: 3px solid #c62828;
  color: #c62828;
  font-size: 13px;
  padding: 10px 14px;
  border-radius: var(--nt-radius);
  margin-bottom: 16px;
}

/* ── 404 ─────────────────────────────────────────────────────────────────── */
.nt-404-page {
  text-align: center;
  padding: 60px 20px;
  background: var(--nt-card-bg);
  border-radius: var(--nt-radius);
  box-shadow: var(--nt-shadow);
}
.nt-404-number {
  font-size: 100px;
  font-weight: 900;
  color: var(--nt-accent);
  line-height: 1;
  margin-bottom: 10px;
  opacity: 0.2;
}
.nt-404-title { font-size: 28px; font-weight: 700; margin: 0 0 10px; }
.nt-404-message { color: var(--nt-text-muted); margin: 0 0 24px; }

/* ── Pagination ──────────────────────────────────────────────────────────── */
.nt-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 20px 0;
}
.nt-page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--nt-border);
  border-radius: var(--nt-radius);
  font-size: 13px;
  font-weight: 500;
  color: var(--nt-text);
  text-decoration: none;
  background: var(--nt-card-bg);
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.nt-page-link:hover { background: var(--nt-accent); border-color: var(--nt-accent); color: #fff; }
.nt-page-active { background: var(--nt-accent) !important; border-color: var(--nt-accent) !important; color: #fff !important; font-weight: 700; }
.nt-page-ellipsis { color: var(--nt-text-muted); padding: 0 4px; }

/* ── Footer ──────────────────────────────────────────────────────────────── */
#nt-footer {
  background: var(--nt-footer-bg);
  color: var(--nt-footer-text);
  margin-top: 40px;
  border-top: 3px solid var(--nt-accent);
}
.nt-footer-inner {
  max-width: var(--nt-max-width);
  margin: 0 auto;
  padding: 48px 20px 32px;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  gap: 36px;
}
.nt-footer-logo {
  font-size: 24px;
  font-weight: 800;
  font-family: var(--nt-font-serif);
  color: #ffffff;
  margin-bottom: 12px;
}
.nt-footer-col > p { font-size: 13px; line-height: 1.65; margin: 0 0 8px; }
.nt-footer-powered { font-size: 12px; color: rgba(255,255,255,0.4); margin-top: 16px !important; }
.nt-footer-heading {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--nt-accent);
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.nt-footer-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.nt-footer-list a {
  font-size: 13px;
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  transition: color 0.2s;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nt-footer-list a:hover { color: #ffffff; }
.nt-footer-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.nt-footer-tag {
  font-size: 11px;
  color: rgba(255,255,255,0.55);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 20px;
  padding: 3px 10px;
  text-decoration: none;
  transition: color 0.2s, border-color 0.2s;
}
.nt-footer-tag:hover { color: #fff; border-color: var(--nt-accent); }
.nt-footer-empty { font-size: 13px; color: rgba(255,255,255,0.3); }
.nt-footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  padding: 16px 20px;
}
.nt-footer-bottom p { font-size: 12px; color: rgba(255,255,255,0.4); margin: 0; }

/* ── Back to Top ─────────────────────────────────────────────────────────── */
#nt-back-top {
  position: fixed;
  bottom: 76px;
  right: 20px;
  width: 44px;
  height: 44px;
  background: var(--nt-card-bg);
  border: 1px solid var(--nt-border);
  border-radius: 50%;
  font-size: 20px;
  color: var(--nt-text-muted);
  box-shadow: var(--nt-shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, background 0.2s, color 0.2s;
  z-index: 800;
}
#nt-back-top.nt-visible { opacity: 1; pointer-events: auto; }
#nt-back-top:hover { background: var(--nt-accent); border-color: var(--nt-accent); color: #fff; }

/* ── Toast Notifications ─────────────────────────────────────────────────── */
.nt-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  padding: 11px 20px;
  border-radius: var(--nt-radius);
  font-size: 14px;
  font-weight: 500;
  z-index: 9999;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  max-width: 360px;
  text-align: center;
}
.nt-toast-success { background: #2e7d32; color: #fff; }
.nt-toast-error   { background: #c62828; color: #fff; }
.nt-toast-info    { background: #1565c0; color: #fff; }

/* ── Color Picker ─────────────────────────────────────────────────────────── */
.nt-cp-btn {
  position: fixed;
  bottom: 24px;
  right: 20px;
  width: 44px;
  height: 44px;
  background: var(--nt-accent);
  border: none;
  border-radius: 50%;
  font-size: 18px;
  color: #fff;
  box-shadow: 0 3px 12px rgba(0,0,0,0.25);
  z-index: 800;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nt-cp-btn:hover { background: var(--nt-accent-hover); transform: scale(1.08); box-shadow: 0 5px 18px rgba(0,0,0,0.3); }

.nt-cp-panel {
  position: fixed;
  bottom: 76px;
  right: 20px;
  width: 252px;
  background: var(--nt-card-bg);
  border: 1px solid var(--nt-border);
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.18);
  z-index: 801;
  overflow: hidden;
}
.nt-cp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--nt-text);
  border-bottom: 2px solid var(--nt-accent);
}
[data-theme="dark"] .nt-cp-header { background: #1a1a1a; }
.nt-cp-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: #fff; }
.nt-cp-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  font-size: 14px;
  cursor: pointer;
  line-height: 1;
  transition: color 0.15s;
}
.nt-cp-close:hover { color: #fff; }
.nt-cp-hint { font-size: 12px; color: var(--nt-text-muted); margin: 12px 16px 0; }
.nt-cp-swatches {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 10px 16px 8px;
}
.nt-cp-swatch {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
  outline: none;
}
.nt-cp-swatch:hover { transform: scale(1.12); box-shadow: 0 3px 10px rgba(0,0,0,0.25); }
.nt-cp-swatch.nt-cp-active { border-color: #fff; box-shadow: 0 0 0 2px var(--nt-text), 0 3px 10px rgba(0,0,0,0.25); transform: scale(1.08); }
.nt-cp-custom-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-top: 1px solid var(--nt-border);
}
.nt-cp-custom-label { font-size: 12px; color: var(--nt-text-muted); }
.nt-cp-custom-input {
  width: 44px;
  height: 28px;
  border: 1px solid var(--nt-border);
  border-radius: 5px;
  cursor: pointer;
  padding: 2px;
  background: var(--nt-card-bg);
}
.nt-cp-reset-btn {
  display: block;
  width: calc(100% - 32px);
  margin: 8px 16px 14px;
  padding: 8px;
  background: var(--nt-bg);
  border: 1px solid var(--nt-border);
  border-radius: var(--nt-radius);
  font-size: 12px;
  font-weight: 600;
  color: var(--nt-text-muted);
  cursor: pointer;
  text-align: center;
  transition: background 0.2s, color 0.2s;
}
.nt-cp-reset-btn:hover { background: var(--nt-accent); border-color: var(--nt-accent); color: #fff; }

/* ── Small Card (sidebar sized) ──────────────────────────────────────────── */
.nt-small-card {
  display: flex;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--nt-border);
}
.nt-small-card:last-child { border-bottom: none; }
.nt-small-thumb { flex-shrink: 0; display: block; width: 64px; height: 48px; overflow: hidden; border-radius: 4px; }
.nt-small-thumb img { width: 100%; height: 100%; object-fit: cover; }
.nt-small-body { flex: 1; min-width: 0; }
.nt-small-cats { margin-bottom: 4px; }
.nt-small-title { font-size: 13px; font-weight: 600; margin: 0 0 3px; line-height: 1.3; }
.nt-small-title a { color: var(--nt-text); text-decoration: none; }
.nt-small-title a:hover { color: var(--nt-accent); }

/* ── EP image alignment (from markdown parser) ──────────────────────────── */
.ep-img-left  { float: left;  margin: 0.4em 1.2em 0.6em 0; }
.ep-img-right { float: right; margin: 0.4em 0 0.6em 1.2em; }
.ep-img-center { display: block; margin: 1em auto; text-align: center; }

/* ── HR styles ───────────────────────────────────────────────────────────── */
.ep-hr-dots {
  text-align: center !important;
  font-size: 20px;
  letter-spacing: 8px;
  color: var(--nt-text-muted);
  margin: 32px 0;
  border: none;
  background: none;
}
.nt-article-body .ep-hr-dots { text-align: center !important; }
.ep-code-sep       { display: block; width: 100%; margin: 6px 0; }
.ep-code-sep-line  { border-top: 1px solid currentColor; opacity: 0.35; }
.ep-code-sep-dots  { display: block; width: 100%; text-align: center !important; font-size: 14px; letter-spacing: 5px; opacity: 0.65; }

/* ══════════════════════════════════════════════════════════════════════════
   SYNTAX HIGHLIGHT CODE BLOCKS
   ══════════════════════════════════════════════════════════════════════════ */
.ep-code-block {
  --cb-bg:             #0d1117;
  --cb-border:         #30363d;
  --cb-toolbar-bg:     #161b22;
  --cb-toolbar-border: #30363d;
  --cb-code-text:      #e6edf3;
  font-family: var(--nt-font-mono);
  background: var(--cb-bg);
  border: 1px solid var(--cb-border);
  border-radius: var(--nt-radius);
  overflow: hidden;
  margin: 1em 0;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.ep-code-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 14px;
  background: var(--cb-toolbar-bg, #161b22);
  border-bottom: 1px solid var(--cb-toolbar-border, #30363d);
  transition: background 0.15s ease, border-color 0.15s ease;
}
.ep-code-toolbar-selects { display: flex; align-items: center; gap: 6px; }
.ep-code-lang-name {
  color: var(--cb-lang-color, #8b949e);
  font-size: 11px;
  font-family: var(--nt-font-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  user-select: none;
}
.ep-code-lang-select,
.ep-code-theme-select {
  -webkit-appearance: none;
  appearance: none;
  background: var(--cb-select-bg, #21262d);
  color: var(--cb-select-text, #c9d1d9);
  border: 1px solid var(--cb-select-border, #30363d);
  border-radius: 4px;
  font-size: 11px;
  font-family: var(--nt-font-mono);
  padding: 3px 22px 3px 8px;
  cursor: pointer;
  outline: none;
  background-repeat: no-repeat;
  background-position: right 6px center;
  background-size: 8px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%238b949e'/%3E%3C/svg%3E");
  transition: border-color 0.15s;
}
.ep-code-lang-select:hover, .ep-code-lang-select:focus,
.ep-code-theme-select:hover, .ep-code-theme-select:focus { border-color: #388bfd; }
.ep-code-wrap-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--cb-lang-color, #8b949e);
  font-size: 11px;
  font-family: var(--nt-font-mono);
  cursor: pointer;
  user-select: none;
}
.ep-code-wrap-toggle { margin: 0; cursor: pointer; accent-color: #00c853; }
input.ep-code-wrap-toggle:checked { outline: 2px solid #00c853; outline-offset: 1px; }
.ep-code-block.ep-code-wrap pre {
  white-space: pre-wrap;
  word-break: normal;
  overflow-wrap: break-word;
  overflow-x: hidden;
}
.ep-code-block pre {
  margin: 0;
  padding: 1em 1.2em;
  overflow-x: auto;
  background: transparent;
  border: none;
  border-radius: 0;
}
.ep-code-block pre code {
  background: transparent !important;
  border: none;
  padding: 0;
  font-family: var(--nt-font-mono);
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--cb-code-text, #e6edf3);
  border-radius: 0;
}
/* Override article-body defaults inside code blocks */
.nt-article-body .ep-code-block pre {
  background: transparent;
  border: none;
  padding: 1em 1.2em;
  margin: 0;
  border-radius: 0;
}
.nt-article-body .ep-code-block pre code {
  background: transparent !important;
  border: none;
  padding: 0;
  color: var(--cb-code-text, #e6edf3);
  font-size: inherit;
}
/* Inline code wrapper */
.ep-inline-code-wrap { position: relative; display: inline; }
.ep-inline-code-wrap code {
  font-family: var(--nt-font-mono);
  font-size: 0.875em;
  background: rgba(110,118,129,0.15);
  border: 1px solid rgba(110,118,129,0.25);
  border-radius: 4px;
  padding: 0.1em 0.4em;
}
.nt-article-body .ep-inline-code-wrap code {
  background: rgba(110,118,129,0.15);
  border: 1px solid rgba(110,118,129,0.25);
  padding: 0.1em 0.4em;
  color: inherit;
}
.ep-inline-lang-select {
  -webkit-appearance: none;
  appearance: none;
  position: absolute;
  top: -22px;
  right: -2px;
  background: #161b22;
  color: #8b949e;
  border: 1px solid #30363d;
  border-radius: 3px;
  font-size: 10px;
  padding: 1px 16px 1px 5px;
  cursor: pointer;
  outline: none;
  opacity: 0;
  pointer-events: none;
  z-index: 10;
  transition: opacity 0.15s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5'%3E%3Cpath d='M0 0l4 5 4-5z' fill='%238b949e'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 4px center;
  background-size: 6px;
}
.ep-inline-code-wrap:hover .ep-inline-lang-select,
.ep-inline-lang-select:focus { opacity: 1; pointer-events: auto; }

/* Bold inside inline-formatted code blocks */
.nt-article-body .ep-code-block[data-inline-formatted="true"] pre code strong,
.nt-article-body .ep-inline-code-wrap[data-inline-formatted="true"] code strong {
  color: var(--cb-code-text, #e6edf3) !important;
  font-weight: 800 !important;
}

/* Markdown code block syntax highlighting */
.nt-article-body .ep-code-block[data-lang="markdown"] .hljs-section   { font-weight: 700; font-size: 1.04em; letter-spacing: 0.01em; display: inline; }
.nt-article-body .ep-code-block[data-lang="markdown"] .hljs-strong     { color: inherit; font-weight: 800; }
.nt-article-body .ep-code-block[data-lang="markdown"] .hljs-emphasis   { font-style: italic; }
.nt-article-body .ep-code-block[data-lang="markdown"] .hljs-quote      { font-style: italic; opacity: 0.78; }
.nt-article-body .ep-code-block[data-lang="markdown"] .hljs-code       { background: rgba(110,118,129,0.18); border-radius: 3px; padding: 0.05em 0.35em; font-size: 0.88em; }
.nt-article-body .ep-code-block[data-lang="markdown"] .hljs-link       { text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
.nt-article-body .ep-code-block[data-lang="markdown"] .hljs-bullet     { font-weight: 600; }
.nt-article-body .ep-inline-code-wrap[data-lang="markdown"] .hljs-section { font-weight: 700; }
.nt-article-body .ep-inline-code-wrap[data-lang="markdown"] .hljs-strong  { color: inherit; font-weight: 800; }
.nt-article-body .ep-inline-code-wrap[data-lang="markdown"] .hljs-bullet  { font-weight: 600; }

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  :root { --nt-sidebar-width: 260px; }
  .nt-footer-inner { grid-template-columns: 1fr 1fr; gap: 28px; }
  .nt-news-grid { grid-template-columns: repeat(2, 1fr); }
  .nt-hero-card { grid-template-columns: 1fr; min-height: auto; }
  .nt-hero-image { height: 220px; }
}

@media (max-width: 768px) {
  #nt-wrapper {
    grid-template-columns: 1fr;
    padding: 16px;
  }
  #nt-sidebar { order: 2; }
  #nt-main    { order: 1; }

  .nt-news-grid { grid-template-columns: 1fr; }

  #nt-menu-toggle { display: block; }
  #nt-nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    padding: 8px 0;
  }
  #nt-nav-links.nt-nav-open { display: flex; }
  .nt-nav-link { padding: 10px 20px; border-bottom: none; border-left: 3px solid transparent; }
  .nt-nav-link:hover { border-left-color: var(--nt-accent); border-bottom-color: transparent; }

  .nt-logo-main { font-size: 22px; }
  .nt-article-header { padding: 20px; }
  .nt-article-title  { font-size: 24px; }
  .nt-article-body   { padding: 20px; }
  .nt-post-tags      { padding: 14px 20px 18px; }
  .nt-comments-section { padding: 20px; }
  .nt-author-box { padding: 18px; flex-direction: column; }
  .nt-share-bar { padding: 14px 20px; }

  .nt-footer-inner { grid-template-columns: 1fr; gap: 24px; padding: 32px 16px 24px; }

  .nt-hero-body { padding: 20px; }
  .nt-hero-title { font-size: 20px; }
  .nt-form-row { grid-template-columns: 1fr; }

  .nt-cp-panel { right: 10px; bottom: 68px; width: calc(100vw - 20px); max-width: 280px; }
  .nt-cp-btn   { right: 10px; bottom: 16px; }
  #nt-back-top { right: 10px; bottom: 68px; }
}

@media (max-width: 480px) {
  .nt-logo-main { font-size: 18px; }
  .nt-topbar-inner { flex-direction: column; gap: 4px; padding: 8px 14px; }
  .nt-header-inner { padding: 12px 14px; }
  .nt-search-input { width: 160px; }
}
