/*
Theme Name: NaruPress Slate
Theme URI: https://jmk28.com/
Author: NaruPress
Description: A lightweight, category-first information theme for finance, utilities, games and evergreen content sites.
Version: 0.1.8
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: narupress-slate
*/

:root {
  --np-bg: #ffffff;
  --np-soft: #f7f7f8;
  --np-text: #17191c;
  --np-muted: #6f747b;
  --np-line: #e3e5e8;
  --np-accent: #202833;
  --np-link: #1b4d77;
  --np-width: 1050px;
  --np-reading: 760px;
  --np-radius: 14px;
  --np-shadow: 0 6px 24px rgba(15, 23, 42, .055);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--np-bg);
  color: var(--np-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Apple SD Gothic Neo", "Malgun Gothic", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.7;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--np-link); }
button, input, textarea, select { font: inherit; }
.screen-reader-text {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.screen-reader-text:focus {
  width: auto; height: auto; clip: auto; margin: 8px; padding: 10px 14px;
  background: #fff; z-index: 100000; border: 1px solid var(--np-line);
}

.np-wrap { width: min(calc(100% - 40px), var(--np-width)); margin-inline: auto; }

/* Header */
.site-header { position: relative; z-index: 20; background: rgba(255,255,255,.97); border-bottom: 1px solid #edf0f2; }
.site-header__inner { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.site-branding { flex: 0 0 auto; min-width: 0; }
.custom-logo-link { display: inline-flex; align-items: center; }
.custom-logo { width: auto; max-height: 38px; }
.site-title { font-size: 18px; line-height: 1.2; font-weight: 850; letter-spacing: -.035em; }
.site-description { display: none; }
.primary-nav { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.primary-nav ul { list-style: none; display: flex; align-items: center; gap: 27px; margin: 0; padding: 0; }
.primary-nav a { display: block; font-size: 14px; font-weight: 650; color: #343a40; white-space: nowrap; }
.primary-nav .current-menu-item > a,.primary-nav .current-menu-ancestor > a { color: #111820; font-weight: 800; }
.np-header-finder { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 8px 14px; border: 1px solid #18212d; border-radius: 10px; background: #18212d; color: #fff !important; font-size: 13px !important; font-weight: 800 !important; white-space: nowrap; transition: transform .15s ease, background .15s ease; }
.np-header-finder:hover,.np-header-finder.is-current { color:#fff !important; background:#0f1720; transform:translateY(-1px); }
.nav-toggle { display: none; border: 0; background: transparent; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; margin: 4px 0; background: #222; }

/* Home intro */
.home-hero { background: linear-gradient(180deg,#f7f9fb 0%,#f4f7f9 100%); border-bottom: 0; }
.home-hero__inner { min-height: 210px; display: grid; place-items: center; text-align: center; padding: 38px 16px 66px; }
.home-hero h1 { margin: 0 0 11px; font-size: clamp(28px,3vw,34px); line-height: 1.2; font-weight: 850; letter-spacing: -.045em; }
.home-hero p { margin: 0; color: #65707a; font-size: 14.5px; }

/* Signature loan finder - interactive home form */
.np-finder-promo { position: relative; z-index: 4; margin-top: -38px; background: transparent; }
.np-finder-promo__inner { padding: 27px 30px 30px; border: 1px solid #e8ebef; border-radius: 20px; background: #fff; box-shadow: 0 16px 48px rgba(15,23,42,.09); }
.np-finder-promo__copy { margin-bottom: 20px; }
.np-finder-promo h2 { margin: 0 0 7px; font-size: 25px; line-height: 1.32; font-weight: 850; letter-spacing: -.045em; }
.np-finder-promo p { max-width: 760px; margin: 0; color: #65707a; font-size: 14px; line-height: 1.65; }
.np-finder-promo__form { min-width: 0; }

/* Category sections */
.home-content { padding: 42px 0 70px; }
.np-section { margin-bottom: 46px; }
.np-section__heading { display: flex; align-items: center; justify-content: flex-start; margin: 0 0 18px; padding-bottom: 12px; border-bottom: 1px solid #e8ebef; text-align: left; }
.np-section__heading::before { display:none; }
.np-section__heading h2,.np-section__heading .heading-link { margin: 0; padding: 0; background: transparent; font-size: 21px; font-weight: 850; line-height: 1.2; letter-spacing: -.035em; }
.np-section__heading .heading-link::after { content:' →'; color:#9aa2aa; font-size:.8em; font-weight:600; }
.np-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; }
.np-card { min-width: 0; overflow:hidden; background:#fff; border:1px solid #e8ebef; border-radius:14px; box-shadow:0 4px 18px rgba(15,23,42,.04); transition:transform .16s ease,box-shadow .16s ease; }
.np-card:hover { transform:translateY(-2px); box-shadow:0 12px 30px rgba(15,23,42,.075); }
.np-card__thumb { display:block; aspect-ratio:16/9; overflow:hidden; background:#eef1f4; }
.np-card__thumb img { width:100%; height:100%; object-fit:cover; transition:transform .22s ease; }
.np-card:hover .np-card__thumb img { transform:scale(1.018); }
.np-card__placeholder { width:100%; height:100%; display:grid; place-items:center; padding:14px; text-align:center; background:#eef1f4; color:#69717a; font-size:13px; font-weight:700; }
.np-card__body { padding:18px 19px 19px; }
.np-card__title { margin:0 0 8px; font-size:16.5px; line-height:1.48; font-weight:850; letter-spacing:-.03em; }
.np-card__excerpt { margin:0; color:#606a74; font-size:13px; line-height:1.7; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
.np-card__meta { margin-top:12px; color:#9299a1; font-size:11px; }

/* Archive */
.archive-header { background: var(--np-soft); border-bottom: 1px solid #f0f1f2; }
.archive-header__inner { padding: 44px 0 40px; text-align: center; }
.archive-title { margin: 0 0 8px; font-size: 27px; line-height: 1.3; letter-spacing: -.035em; }
.archive-description { max-width: 700px; margin: 0 auto; color: var(--np-muted); font-size: 14px; }
.archive-content { padding: 44px 0 64px; }
.pagination { margin-top: 36px; }
.nav-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; }
.page-numbers { min-width: 36px; height: 36px; display: inline-grid; place-items: center; border: 1px solid var(--np-line); padding: 0 10px; font-size: 13px; }
.page-numbers.current { background: var(--np-accent); border-color: var(--np-accent); color: #fff; }

/* Single / page */
.article-wrap { width: min(calc(100% - 40px), var(--np-reading)); margin-inline: auto; }
.single-main, .page-main { padding: 48px 0 72px; }
.breadcrumbs { margin-bottom: 22px; color: #878c92; font-size: 12px; }
.breadcrumbs a:hover { text-decoration: underline; }
.entry-header { margin-bottom: 26px; }
.entry-category { margin-bottom: 10px; color: var(--np-link); font-size: 12px; font-weight: 700; }
.entry-title { margin: 0 0 14px; font-size: clamp(28px, 4vw, 38px); line-height: 1.32; letter-spacing: -.045em; font-weight: 800; }
.entry-meta { color: #8b9096; font-size: 12px; }
.entry-featured { margin: 0 0 34px; }
.entry-featured img { width: 100%; }
.entry-content { font-size: 17px; line-height: 1.88; letter-spacing: -.012em; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content p { margin: 0 0 1.45em; }
.entry-content h2 { margin: 2.25em 0 .8em; font-size: 26px; line-height: 1.4; letter-spacing: -.035em; }
.entry-content h3 { margin: 1.9em 0 .7em; font-size: 21px; line-height: 1.45; letter-spacing: -.03em; }
.entry-content h4 { margin: 1.65em 0 .6em; font-size: 18px; }
.entry-content a { color: var(--np-link); text-decoration: underline; text-underline-offset: 3px; }
.entry-content ul, .entry-content ol { margin: 0 0 1.5em; padding-left: 1.5em; }
.entry-content li + li { margin-top: .4em; }
.entry-content blockquote { margin: 1.8em 0; padding: 16px 20px; border-left: 3px solid #2f3d4b; background: #f7f8f9; color: #444a50; }
.entry-content table { width: 100%; margin: 1.8em 0; border-collapse: collapse; font-size: 15px; }
.entry-content th, .entry-content td { border: 1px solid #dfe2e5; padding: 11px 12px; vertical-align: top; }
.entry-content th { background: #f6f7f8; font-weight: 700; }
.entry-content figure { margin: 1.8em 0; }
.entry-content .wp-block-image img { margin-inline: auto; }
.entry-content code { background: #f2f4f5; padding: .12em .32em; border-radius: 3px; font-size: .9em; }
.entry-content pre { overflow-x: auto; padding: 18px; background: #16191d; color: #fff; border-radius: 3px; }
.entry-content .wp-block-separator { border: 0; border-top: 1px solid var(--np-line); margin: 2.4em 0; }

.post-tags { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 7px; }
.post-tags a { border: 1px solid var(--np-line); padding: 5px 9px; color: #697078; font-size: 12px; }
.post-navigation { margin-top: 48px; border-top: 1px solid var(--np-line); border-bottom: 1px solid var(--np-line); }
.post-navigation .nav-links { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.post-navigation a { display: block; padding: 18px 0; font-size: 13px; }
.post-navigation .nav-next { text-align: right; }
.related-posts { width: min(calc(100% - 40px), var(--np-width)); margin: 0 auto 72px; }


/* Dedicated loan finder page */
.np-loan-finder-page-main { padding-top: 44px; }
.np-loan-finder-page .breadcrumbs { max-width: 1080px; margin: 0 auto 20px; }
.np-loan-finder-page .entry-header { max-width: 1080px; margin: 0 auto 24px; }
.np-loan-finder-page .entry-title { font-size: clamp(32px,4vw,44px); }
.np-loan-finder-page .entry-content { font-size: 16px; line-height: 1.75; }
.np-loan-finder-page .entry-content > p:empty { display:none; }

/* Search / 404 */
.search-form { display: flex; gap: 7px; max-width: 520px; margin: 26px auto 0; }
.search-field { flex: 1; min-width: 0; border: 1px solid #cfd3d7; padding: 10px 12px; }
.search-submit { border: 0; background: var(--np-accent); color: #fff; padding: 10px 18px; cursor: pointer; }
.empty-state { padding: 74px 20px; text-align: center; }
.empty-state h1 { margin: 0 0 10px; font-size: 30px; }
.empty-state p { color: var(--np-muted); }

/* Footer */
.site-footer { border-top: 1px solid var(--np-line); background: #fff; }
.site-footer__inner { padding: 30px 0 34px; color: #737981; font-size: 12px; }
.footer-nav ul { display: flex; flex-wrap: wrap; gap: 16px; list-style: none; margin: 0 0 12px; padding: 0; }
.site-footer__copy { margin: 0; }

/* WordPress alignment */
.alignwide { margin-left: max(-100px, calc((var(--np-reading) - var(--np-width)) / 2)); margin-right: max(-100px, calc((var(--np-reading) - var(--np-width)) / 2)); }
.alignfull { width: 100vw; max-width: 100vw; margin-left: calc(50% - 50vw); }

@media (max-width: 820px) {
  .np-wrap, .article-wrap, .related-posts { width: min(calc(100% - 32px), var(--np-width)); }
  .site-header__inner { min-height: 64px; }
  .nav-toggle { display: block; }
  .primary-nav {
    display: none; position: absolute; z-index: 9999; top: 64px; left: 0; right: 0;
    margin: 0; padding: 12px 16px 18px; background: #fff; border-bottom: 1px solid var(--np-line);
  }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { align-items: stretch; flex-direction: column; gap: 0; }
  .primary-nav a { padding: 10px 4px; border-bottom: 1px solid #f1f2f3; }

  .np-header-finder { display: flex; margin-top: 10px; padding: 11px 13px !important; border-radius: 9px; }
  .np-finder-promo { margin-top: -28px; }
  .np-finder-promo__inner { padding: 24px; }
  .home-hero__inner { min-height: 148px; }
  .home-content { padding-top: 38px; }
  .np-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .entry-title { font-size: 30px; }
  .entry-content { font-size: 16px; }
  .alignwide { margin-left: 0; margin-right: 0; }
}

@media (max-width: 560px) {
  .np-wrap, .article-wrap, .related-posts { width: min(calc(100% - 28px), var(--np-width)); }
  .custom-logo { max-height: 34px; }
  .site-title { font-size: 17px; }
  .home-hero h1 { font-size: 23px; }

  .np-finder-promo { margin-top: -22px; }
  .np-finder-promo__inner { padding: 21px 18px 20px; border-radius: 16px; }
  .np-finder-promo h2 { font-size: 21px; }
  .np-finder-promo p { font-size: 13px; }
  .np-grid { grid-template-columns: 1fr; gap: 14px; }
  .np-card { display: grid; grid-template-columns: 132px minmax(0, 1fr); }
  .np-card__thumb { aspect-ratio: 1 / 1; }
  .np-card__body { padding: 14px 14px 13px; }
  .np-card__title { font-size: 15px; margin-bottom: 6px; }
  .np-card__excerpt { -webkit-line-clamp: 2; font-size: 12px; }
  .np-card__meta { display: none; }
  .np-section { margin-bottom: 32px; }
  .single-main, .page-main { padding-top: 36px; }
  .entry-title { font-size: 28px; }
  .entry-content h2 { font-size: 23px; }
  .entry-content h3 { font-size: 20px; }
  .post-navigation .nav-links { grid-template-columns: 1fr; }
  .post-navigation .nav-next { text-align: left; border-top: 1px solid var(--np-line); }
}

/* Automatic H2 table of contents */
.np-toc {
  width: min(100%, var(--np-reading));
  margin: 0 auto 34px;
  padding: 0;
  border: 1px solid var(--np-line);
  background: #fafafa;
}
.np-toc summary {
  cursor: pointer;
  list-style: none;
  padding: 15px 18px;
  font-size: 14px;
  font-weight: 800;
  border-bottom: 1px solid var(--np-line);
}
.np-toc summary::-webkit-details-marker { display: none; }
.np-toc summary::after { content: '＋'; float: right; color: var(--np-muted); font-weight: 500; }
.np-toc[open] summary::after { content: '－'; }
.np-toc ol { margin: 0; padding: 14px 20px 15px 42px; }
.np-toc li { margin: 5px 0; color: #454a50; font-size: 13px; line-height: 1.55; }
.np-toc a:hover { color: var(--np-link); text-decoration: underline; text-underline-offset: 3px; }
.entry-content h2 { scroll-margin-top: 92px; }

/* Keep card thumbnails visually stable; text-heavy square thumbnails should use a centered safe area. */
.np-card__thumb img { object-position: 50% 50%; }

@media (max-width: 680px) {
  .np-toc { margin-bottom: 26px; }
  .np-toc summary { padding: 13px 15px; }
  .np-toc ol { padding: 12px 16px 13px 36px; }
}

/* v0.1.3 configurable listing styles */
.np-listing { display: grid; gap: 18px; }
.np-listing--cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.np-listing--list,
.np-listing--text { grid-template-columns: 1fr; gap: 14px; }

.np-listing--list .np-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 142px;
}
.np-listing--list .np-card__thumb { aspect-ratio: auto; min-height: 142px; height: 100%; }
.np-listing--list .np-card__body { padding: 18px 20px; }
.np-listing--list .np-card__title { font-size: 17px; }
.np-listing--list .np-card__excerpt { -webkit-line-clamp: 2; }

.np-listing--text .np-card {
  border: 0;
  border-bottom: 1px solid var(--np-line);
  box-shadow: none;
}
.np-listing--text .np-card__body { padding: 13px 2px 17px; }
.np-listing--text .np-card__title { margin-bottom: 6px; font-size: 17px; }
.np-listing--text .np-card__excerpt { max-width: 820px; -webkit-line-clamp: 2; }
.np-listing--text .np-card__meta { margin-top: 7px; }

@media (max-width: 820px) {
  .np-listing--cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .np-listing--list .np-card { grid-template-columns: 180px minmax(0, 1fr); }
}

@media (max-width: 560px) {
  .np-listing--cards { grid-template-columns: 1fr; gap: 14px; }
  .np-listing--cards .np-card { display: grid; grid-template-columns: 132px minmax(0, 1fr); }
  .np-listing--cards .np-card__thumb { aspect-ratio: 1 / 1; }
  .np-listing--cards .np-card__body { padding: 14px 14px 13px; }
  .np-listing--cards .np-card__title { font-size: 15px; margin-bottom: 6px; }
  .np-listing--cards .np-card__excerpt { -webkit-line-clamp: 2; font-size: 12px; }
  .np-listing--cards .np-card__meta { display: none; }

  .np-listing--list .np-card { grid-template-columns: 118px minmax(0, 1fr); min-height: 106px; }
  .np-listing--list .np-card__thumb { min-height: 106px; }
  .np-listing--list .np-card__body { padding: 12px 13px; }
  .np-listing--list .np-card__title { font-size: 14px; margin-bottom: 5px; }
  .np-listing--list .np-card__excerpt { font-size: 11px; -webkit-line-clamp: 2; }
  .np-listing--list .np-card__meta { display: none; }
}
@media (max-width: 560px) {
  .np-listing--text .np-card { display: block; grid-template-columns: none; }
  .np-listing--list .np-card__thumb { aspect-ratio: auto; }
}

/* v0.1.7 UI polish */
.archive-header{background:#f7f9fb;border-bottom:1px solid #eef1f3}.archive-header__inner{padding:48px 0 42px}.archive-title{font-size:31px}.page-numbers{border-radius:8px}.np-toc{overflow:hidden;border-radius:12px;background:#fafbfc}.post-tags a{border-radius:999px;background:#fafbfc}.search-field,.search-submit{border-radius:9px}.site-footer{border-top:1px solid #edf0f2;background:#fafbfc}.site-footer__inner{padding:34px 0 38px}.footer-nav a{font-size:13px}.entry-featured img{border-radius:12px}


/* v0.1.8 — automatic finance text thumbnails */
.np-auto-thumb {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 24px 28px;
  text-align: center;
  color: #fff;
  background: #06172b url('assets/images/finance-auto-bg.jpg') center/cover no-repeat;
}
.np-auto-thumb::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(2,11,24,.20), rgba(2,11,24,.38));
}
.np-auto-thumb__category {
  display: inline-block;
  padding: 2px 4px;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 750;
  letter-spacing: .02em;
  color: rgba(255,255,255,.94);
  text-shadow: 0 1px 2px rgba(0,0,0,.28);
}
.np-auto-thumb__title {
  max-width: 94%;
  font-size: clamp(21px, 2.45vw, 34px);
  line-height: 1.22;
  font-weight: 900;
  letter-spacing: -.055em;
  word-break: keep-all;
  overflow-wrap: anywhere;
  text-wrap: balance;
  text-shadow: 0 2px 8px rgba(0,0,0,.42);
}
.np-auto-thumb--long .np-auto-thumb__title { font-size: clamp(18px, 2.05vw, 29px); }
.np-auto-thumb--xlong .np-auto-thumb__title { font-size: clamp(16px, 1.72vw, 24px); }
.np-auto-thumb__sub {
  margin-top: 2px;
  font-size: 11px;
  line-height: 1.25;
  font-weight: 780;
  letter-spacing: .01em;
  color: rgba(255,255,255,.86);
  text-shadow: 0 1px 3px rgba(0,0,0,.35);
}
.entry-featured--auto { aspect-ratio: 1 / 1; border-radius: 12px; overflow: hidden; }
.entry-featured--auto .np-auto-thumb { min-height: 360px; padding: 46px 64px; gap: 18px; }
.entry-featured--auto .np-auto-thumb__category { font-size: 14px; padding: 5px 10px; }
.entry-featured--auto .np-auto-thumb__title { max-width: 760px; font-size: clamp(34px, 5.4vw, 64px); line-height: 1.16; }
.entry-featured--auto .np-auto-thumb--long .np-auto-thumb__title { font-size: clamp(30px, 4.6vw, 54px); }
.entry-featured--auto .np-auto-thumb--xlong .np-auto-thumb__title { font-size: clamp(27px, 4vw, 46px); }
.entry-featured--auto .np-auto-thumb__sub { font-size: 17px; }

@media (max-width: 820px) {
  .np-auto-thumb { padding: 18px 18px; gap: 8px; }
  .np-auto-thumb__title { font-size: 24px; }
  .np-auto-thumb--long .np-auto-thumb__title { font-size: 21px; }
  .np-auto-thumb--xlong .np-auto-thumb__title { font-size: 18px; }
  .entry-featured--auto .np-auto-thumb { min-height: 310px; padding: 36px 38px; }
}

@media (max-width: 560px) {
  .np-card__thumb .np-auto-thumb { padding: 12px 10px; gap: 5px; }
  .np-card__thumb .np-auto-thumb__category { font-size: 8px; padding: 1px 2px; }
  .np-card__thumb .np-auto-thumb__title,
  .np-card__thumb .np-auto-thumb--long .np-auto-thumb__title,
  .np-card__thumb .np-auto-thumb--xlong .np-auto-thumb__title {
    max-width: 100%;
    font-size: 13px;
    line-height: 1.25;
    letter-spacing: -.045em;
  }
  .np-card__thumb .np-auto-thumb__sub { font-size: 8px; line-height: 1.2; }
  .entry-featured--auto .np-auto-thumb { min-height: 0; padding: 34px 24px; }
  .entry-featured--auto .np-auto-thumb__title,
  .entry-featured--auto .np-auto-thumb--long .np-auto-thumb__title,
  .entry-featured--auto .np-auto-thumb--xlong .np-auto-thumb__title { font-size: clamp(27px, 9vw, 38px); }
}
