:root {
  --np-fs: 18px;
  --np-scale: 1;
  --np-bg: #F7F5EE;
  --np-surface: #FFFDF8;
  --np-card: #FFFFFF;
  --np-border: #D8C8A6;
  --np-text: #1E242B;
  --np-heading: #111827;
  --np-accent: #C76800;
}

html,
html[data-np-mode="dark"] {
  --np-bg: #081320;
  --np-surface: #11223A;
  --np-card: #162B47;
  --np-border: #2A466B;
  --np-text: #E8EEF5;
  --np-heading: #FFFFFF;
  --np-accent: #E14563;
}

html[data-np-mode="light"] {
  --np-bg: #F7F5EE;
  --np-surface: #FFFDF8;
  --np-card: #FFFFFF;
  --np-border: #C9B792;
  --np-text: #1E242B;
  --np-heading: #0F172A;
}

html[data-np-palette="saffron"] { --np-accent: #E39A1A; }
html[data-np-palette="ocean"] { --np-accent: #3FA9F5; }
html[data-np-palette="gold"] { --np-accent: #D4AF37; }
html[data-np-palette="midnight"] { --np-accent: #4FC1FF; --np-surface: #0D1E33; --np-card: #132842; }
html[data-np-palette="monsoon"] { --np-accent: #8CA6C1; }
html[data-np-palette="forest"] { --np-accent: #3FA35A; }
html[data-np-palette="rose"] { --np-accent: #D46AA3; }
html[data-np-palette="violet"] { --np-accent: #9D7CFF; }
html[data-np-palette="newspaper"] { --np-accent: #AA7B28; }

html { font-size: var(--np-fs); }
body {
  line-height: 1.72;
  overflow-x: clip;
  top: 0 !important;
  background-color: var(--np-bg);
  color: var(--np-text);
  opacity: 1 !important;
}
.goog-te-banner-frame.skiptranslate { display: none !important; }
#np-gt-inline-wrap { position: absolute; left: -9999px; height: 0; overflow: hidden; }

#np-fn-page .np-fn-top,
#np-fn-page .np-fn-selbar { display: none !important; }

html:not([data-np-mode="light"]) :is(
  h1, h2, h3, h4, h5, h6,
  .site-title, .entry-title, .page-title, .post-title, .np-masthead-title,
  a:not(.np-ui-pill):not(.np-ui-flag)
) {
  color: var(--np-heading) !important;
  opacity: 1 !important;
}

html:not([data-np-mode="light"]) :is(p, li, span, div, td, th, label, article, section, blockquote, figcaption) {
  color: var(--np-text);
  opacity: 1;
}

html[data-np-mode="light"] :is(h1, h2, h3, h4, .site-title, .entry-title, .page-title, .post-title) {
  color: var(--np-heading);
  opacity: 1 !important;
}

/* Single posts & pages readability */
body:is(.single, .page, .singular) :is(article, .entry-content, .page-content, .post-content) {
  max-width: 82ch;
  margin-inline: auto;
  padding: 18px 20px;
  background-color: var(--np-card);
  border: 1px solid var(--np-border);
  border-radius: 6px;
}

body:is(.single, .page, .singular) :is(.entry-content, .page-content, .post-content) > * + * {
  margin-top: 0.9rem;
}

body:is(.single, .page, .singular) :is(h1, .entry-title, .page-title) {
  line-height: 1.25;
  margin-bottom: 0.6rem;
}

body:is(.single, .page, .singular) :is(img, figure, iframe, video, table) {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

body:is(.single, .page, .singular) blockquote {
  margin: 1rem 0;
  padding: 10px 14px;
  border-left: 3px solid var(--np-accent);
  background-color: var(--np-surface);
}

/* Amazon affiliate cards with thumbnails, URLs & descriptions */
.np-aff-box {
  background-color: var(--np-surface) !important;
  border: 1px solid var(--np-border) !important;
  border-radius: 6px;
  padding: 12px 14px;
  margin: 14px 0;
  opacity: 1 !important;
}
.np-aff-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--np-accent) !important;
  margin-bottom: 10px;
}
.np-aff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}
.np-aff-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background-color: var(--np-card) !important;
  border: 1px solid var(--np-border) !important;
  border-radius: 6px;
  text-decoration: none !important;
  color: var(--np-heading) !important;
  opacity: 1 !important;
}
.np-aff-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
  border: 1px solid var(--np-border);
  background-color: var(--np-surface);
}
.np-aff-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.np-aff-title {
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--np-heading) !important;
}
.np-aff-desc {
  font-size: 0.76rem;
  line-height: 1.35;
  color: var(--np-text) !important;
}
.np-aff-cta {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--np-accent) !important;
}

/* AdSense slot styling */
.np-adsense-slot {
  background-color: var(--np-surface) !important;
  border: 1px dashed var(--np-border) !important;
  border-radius: 6px;
  padding: 10px 12px;
  margin: 14px 0;
  text-align: center;
  opacity: 1 !important;
}
.np-adsense-tag {
  display: block;
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--np-text) !important;
  margin-bottom: 6px;
  opacity: 0.85;
}

#np-fn-page *,
main *,
.site-main * {
  min-width: 0;
  overflow-wrap: break-word;
}

article,
.np-fn-card,
[class*="grid"] > div,
[class*="col"] > div {
  padding-inline: 10px;
}

#np-ui-top-bar,
#np-ui-control-strip {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 8px; row-gap: 6px; padding: 6px 10px; margin: 6px auto; max-width: 1320px;
  background-color: var(--np-surface); color: var(--np-heading);
  border: 1px solid var(--np-border); border-radius: 6px; font-size: 12px;
  opacity: 1 !important;
}
.np-lang-group {
  display: inline-flex; flex-wrap: wrap; align-items: center; gap: 5px; row-gap: 5px;
}
.np-lang-select {
  padding: 3px 6px; border-radius: 4px; border: 1px solid var(--np-border);
  background-color: var(--np-card); color: var(--np-heading);
  font-size: 11px; font-weight: 600; cursor: pointer; opacity: 1 !important;
  max-width: 170px;
}
html:not([data-np-mode="light"]) .np-lang-select {
  color: #FFFFFF;
}

#np-ui-controls-left { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
#np-ui-swatches-right { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-left: auto; }
.np-ui-palette-label { font-size: 11px; font-weight: 700; letter-spacing: 0.04em; color: var(--np-heading); }

#np-ui-control-strip .np-ui-pill,
#np-ui-top-bar .np-ui-pill {
  padding: 3px 8px; border-radius: 4px; border: 1px solid var(--np-border);
  background-color: var(--np-card); color: var(--np-heading) !important;
  font-weight: 600; font-size: 11px; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; opacity: 1 !important;
}
html:not([data-np-mode="light"]) #np-ui-control-strip .np-ui-pill,
html:not([data-np-mode="light"]) #np-ui-top-bar .np-ui-pill {
  color: #FFFFFF !important;
}

#np-ui-control-strip .np-ui-pill.is-active,
#np-ui-top-bar .np-ui-pill.is-active,
#np-ui-top-bar .np-ui-flag.is-active {
  background-color: var(--np-accent) !important; border-color: var(--np-accent) !important; color: #FFFFFF !important;
}

.np-ui-sq-swatch {
  width: 20px !important; height: 20px !important; min-width: 20px !important; min-height: 20px !important;
  padding: 0 !important; border-radius: 3px !important; border: 1px solid rgba(255,255,255,0.4) !important;
  cursor: pointer; display: inline-block;
}

#np-ui-masthead {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  gap: 12px; padding: 12px 16px; margin: 6px auto; max-width: 1320px;
  background-color: #11223A; color: #FFFFFF;
  border-top: 2px solid var(--np-border); border-bottom: 2px solid var(--np-border);
  opacity: 1 !important;
}
#np-ui-masthead .np-masthead-side {
  border: 1px solid #2A466B; padding: 6px 10px; font-size: 11px;
  color: #E8EEF5; background-color: #162B47; border-radius: 4px;
}
#np-ui-masthead .np-masthead-side strong {
  display: block; color: var(--np-accent); font-size: 10px; letter-spacing: 0.05em;
}
#np-ui-masthead .np-masthead-title {
  margin: 0 auto; font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 800; letter-spacing: 0.04em;
  line-height: 1.05; color: #FFFFFF !important; text-decoration: none;
}

body.np-reader-mode aside, body.np-reader-mode .sidebar, body.np-reader-mode .widget-area { display: none !important; }
body.np-reader-mode :is(#np-fn-page, article, .entry-content, .page-content) {
  max-width: 76ch !important;
  margin-inline: auto !important;
}

@keyframes npPulseDot {
  0% { transform: scale(0.92); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55); }
  70% { transform: scale(1.08); box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
  100% { transform: scale(0.92); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

@keyframes npPulseLive {
  0% { transform: scale(0.92); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.65); }
  70% { transform: scale(1.12); box-shadow: 0 0 0 7px rgba(245, 158, 11, 0); }
  100% { transform: scale(0.92); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

.np-feed-card {
  background-color: var(--np-card) !important;
  color: var(--np-heading) !important;
  border: 1px solid var(--np-border) !important;
  border-radius: 6px;
  padding: 12px 14px;
  margin-top: 12px;
  opacity: 1 !important;
}
.np-feed-heading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  margin: 0 0 10px;
  color: var(--np-heading) !important;
  font-size: 1rem;
  opacity: 1 !important;
}
.np-feed-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  opacity: 1 !important;
}
.np-feed-dot.is-green {
  background-color: #22C55E !important;
  animation: npPulseDot 2.4s infinite;
}
.np-feed-dot.is-live {
  background-color: #F59E0B !important;
  animation: npPulseLive 1.5s infinite;
}
.np-recent-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.np-recent-list li {
  padding: 8px 0 8px 10px;
  border-bottom: 1px dashed var(--np-border);
  border-left: 2px solid var(--np-border);
  margin-left: 3px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.9rem;
  opacity: 1 !important;
}
.np-recent-list li:last-child {
  border-bottom: none;
}
.np-recent-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.np-recent-row .np-feed-dot {
  margin-top: 6px;
}
.np-recent-list a {
  color: var(--np-heading) !important;
  text-decoration: none;
  font-weight: 600;
  opacity: 1 !important;
}
.np-recent-list li.is-live-item {
  border-left-color: #F59E0B;
}
.np-recent-list li.is-live-item a {
  color: #FBBF24 !important;
  font-weight: 700;
}
.np-live-thread-note {
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--np-text) !important;
  padding-left: 17px;
  opacity: 0.92;
}
