/*
Theme Name: Blofinder NEXT2
Description: Standalone WordPress theme for Blofinder.
Version: 1.3.3
Text Domain: blofinder-next2
*/

.blofinder-next2 { color-scheme: light; }
.blofinder-next2[data-theme="dark"] { color-scheme: dark; }
@media (prefers-color-scheme: dark) {
	.blofinder-next2:not([data-theme]) { color-scheme: dark; }
}
.blofinder-next2 [hidden] { display: none !important; }
.blofinder-next2.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) {
	.blofinder-next2.admin-bar .site-header { top: 46px; }
}
@media (max-width: 600px) {
	.blofinder-next2.admin-bar .site-header { top: 0; }
}
.blofinder-next2 :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.next2-skip-link { position: fixed; top: 1rem; left: 1rem; z-index: 100000; background: var(--surface-color); padding: .5rem; }
.next2-skip-link:not(:focus) { clip-path: inset(50%); }
#next2-search:target { scroll-margin-top: 8rem; }
#next2-search > summary, .next2-reader-settings > summary { cursor: pointer; color: var(--text-muted); }
#next2-search > summary { padding: .25rem 0; }
#next2-search form { display: flex; gap: .5rem; }
#next2-search input { min-width: 0; }
.next2-reader-settings label { display: inline-block; padding: .35rem; }
.next2-article-content { overflow-wrap: anywhere; }
.next2-article-content :is(img, video, iframe, input) { max-width: 100%; }
.next2-article-content :is(pre, .wp-block-table) { overflow-x: auto; }
.blofinder-next2[data-font="small"] .next2-article-content { font-size: .9rem; }
.blofinder-next2[data-font="large"] .next2-article-content { font-size: 1.2rem; }
.next2-entries.post-grid-view .post-card { min-width: 0; }
.blofinder-next2 .nav-links { display: flex; flex-wrap: wrap; gap: .5rem; }
.blofinder-next2 .topic-section { margin-top: 2rem; }
.blofinder-next2 .menu { display: flex; flex-wrap: wrap; gap: .75rem; list-style: none; }
.blofinder-next2 .site-logo { min-width: 0; }
.blofinder-next2 .site-logo-text { overflow: hidden; text-overflow: ellipsis; }
.blofinder-next2 .header-actions { flex-shrink: 0; }
@media (max-width: 480px) {
	.blofinder-next2 .header-top { gap: .5rem; }
	.blofinder-next2 .site-logo { font-size: 1.05rem; }
}

/* Brand tokens and editorial layout. */
.blofinder-next2 {
  --bg-color: #f8fafc;
  --surface-color: #fff;
  --surface-glass: var(--surface-color);
  --text-main: #111827;
  --text-muted: #475569;
  --text-dim: #56657a;
  --border-color: #dce5f0;
  --border-light: #e8eef6;
  --accent: #2563eb;
  --accent-ink: #fff;
  --accent-light: #eff6ff;
  --code-bg: #edf2fa;
  --lead-bg: #0e2148;
  --lead-ink: #f8faff;
  --lead-muted: #c4d6f8;
  --page-width: 75rem;
  --home-columns: minmax(0, 68fr) minmax(0, 32fr);
  --home-gap: 1.1rem;
  --reading-width: 45rem;
}
.blofinder-next2[data-theme="dark"] {
  --bg-color: #0b1220;
  --surface-color: #111c2e;
  --text-main: #f1f5f9;
  --text-muted: #aabad0;
  --text-dim: #aabad0;
  --border-color: #344661;
  --border-light: #24354d;
  --accent: #93c5fd;
  --accent-ink: #102141;
  --accent-light: #142b50;
  --code-bg: #172840;
  --lead-bg: #102955;
}

.blofinder-next2 :is(.header-top, .header-nav-container, .main-wrapper) { max-width: var(--page-width); }
.blofinder-next2 .site-header { background: var(--surface-color); box-shadow: none; border-bottom: 1px solid var(--border-color); }
.blofinder-next2 .header-top { padding-block: .7rem; }
.blofinder-next2 .site-logo-img { width: 36px; height: 36px; }
.blofinder-next2 .icon-btn { width: 44px; height: 44px; background: var(--surface-color); }
.next2-icon {
  display: inline-block;
  width: 20px;
  height: 20px;
  flex: none;
  background: currentColor;
  mask: var(--icon) center / contain no-repeat;
}
.next2-icon-search { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='10.8' cy='10.8' r='6.3'/%3E%3Cpath d='m16 16 4.1 4.1'/%3E%3C/svg%3E"); }
.next2-icon-settings { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'%3E%3Cpath d='m10 3-.8 2.7-2 .9-2.6-.9-2 3.5 2 1.9v2l-2 1.9 2 3.5 2.6-.9 2 .9.8 2.5h4l.8-2.5 2-.9 2.6.9 2-3.5-2-1.9v-2l2-1.9-2-3.5-2.6.9-2-.9L14 3z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E"); }
.next2-icon-bookmark { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'%3E%3Cpath d='M6 4h12v16l-6-4-6 4z'/%3E%3C/svg%3E"); }
.next2-icon-moon { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'%3E%3Cpath d='M20.8 15A9 9 0 0 1 9 3.2 9 9 0 1 0 20.8 15Z'/%3E%3C/svg%3E"); }
.next2-icon-sun { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cpath d='M12 2v2m0 16v2M2 12h2m16 0h2M5 5l1.5 1.5m11 11L19 19M5 19l1.5-1.5m11-11L19 5'/%3E%3C/svg%3E"); }
@media (forced-colors: active) {
  .next2-icon { forced-color-adjust: none; background: ButtonText; }
}
.blofinder-next2 .header-nav-bar { border-block-end: 0; }
.blofinder-next2 .cat-nav-list { gap: .85rem; padding-block: 0; }
.blofinder-next2 .cat-nav-link {
  background: transparent;
  border-radius: 0;
  min-height: 44px;
  padding-inline: .55rem;
  border-block-end: 2px solid transparent;
}
.blofinder-next2 .cat-nav-link:is(:hover, [aria-current="page"]) { color: var(--accent); border-block-end-color: var(--accent); }
.blofinder-next2 .pagination .current { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
#next2-settings { position: relative; }
.next2-reader-settings > summary {
  display: grid;
  place-items: center;
  min-height: 44px;
  padding-inline: .55rem;
  border: 1px solid var(--border-color);
  border-radius: .55rem;
  color: var(--text-main);
  font-size: .85rem;
  font-weight: 700;
  list-style: none;
}
.next2-reader-settings summary::-webkit-details-marker { display: none; }
.next2-reader-settings .next2-preferences {
  position: absolute;
  z-index: 2;
  inset: calc(100% + .5rem) 0 auto auto;
  width: min(18rem, calc(100vw - 2rem));
  padding: .8rem;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: .65rem;
  box-shadow: var(--shadow-md);
}
.next2-reader-settings .next2-preferences[popover] {
  position: fixed;
  inset: 4.1rem max(1rem, calc((100vw - var(--page-width)) / 2 + 1.25rem)) auto auto;
  margin: 0;
}
.next2-reader-settings .next2-preferences[popover]:not(:popover-open) { display: none; }
.admin-bar .next2-reader-settings .next2-preferences[popover] { inset-block-start: 7rem; }
.next2-preferences .next2-preference { width: 100%; justify-content: space-between; }

.blofinder-next2 .feed-view-container > h1 {
  font-size: clamp(1.75rem, 4vw, 2.65rem);
  letter-spacing: -.045em;
  line-height: 1.15;
  margin-block: .55rem 1.35rem;
  overflow-wrap: anywhere;
}
.next2-home-grid, .next2-home-rail { display: grid; align-content: start; gap: var(--home-gap); }
.blofinder-next2 .hero-post-card {
  display: grid;
  align-content: start;
  align-items: start;
  justify-content: stretch;
  gap: 0;
  margin: 0;
  padding: 0;
  border-radius: 1.1rem;
  border: 1px solid var(--border-color);
  background: var(--lead-bg);
  color: var(--lead-ink);
  box-shadow: none;
  transition: border-color .18s;
}
.blofinder-next2 .hero-post-card::before { content: none; }
.blofinder-next2 .hero-post-card:hover { transform: none; border-color: var(--accent); }
.hero-content { padding: clamp(1.1rem, 2.3vw, 2rem); }
.blofinder-next2 .hero-title { font-size: clamp(1.48rem, 3.1vw, 2.35rem); line-height: 1.28; letter-spacing: -.037em; overflow-wrap: anywhere; }
.blofinder-next2 .hero-featured-badge { padding: .2rem .62rem; background: #dbeafe; color: #1740a1; }
.blofinder-next2 .hero-excerpt { color: var(--lead-muted); -webkit-line-clamp: 2; }
.blofinder-next2 .hero-read-cta { color: #bfdbfe; text-decoration: underline; text-underline-offset: .2em; }
.blofinder-next2 .hero-thumb {
  width: 100%;
  height: auto;
  aspect-ratio: 2.35 / 1;
  border: 0;
  border-radius: 0;
  background: var(--lead-bg);
}
.blofinder-next2 .hero-thumb img { display: block; }
.blofinder-next2 .hero-post-card:hover .hero-thumb img { transform: none; }
.next2-story-meta { color: var(--text-muted); font-size: .83rem; margin-block: .3rem .55rem; }
.hero-content .next2-story-meta { color: var(--lead-muted); }
.next2-recent, .next2-recommendations {
  min-width: 0;
  padding: clamp(1rem, 2vw, 1.65rem);
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 1.1rem;
}
.next2-recent > h2, .next2-recommendations > h2 { font-size: 1.2rem; letter-spacing: -.03em; }
:is(.next2-recent, .next2-recommendations) ul { list-style: none; margin-block-start: .55rem; }
:is(.next2-recent, .next2-recommendations) li { padding-block: .75rem; border-block-start: 1px solid var(--border-light); }
.next2-recent li { position: relative; padding-inline-end: 2.6rem; }
.next2-recent li > [data-next2-bookmark] { position: absolute; inset: .45rem 0 auto auto; }
:is(.next2-recent, .next2-recommendations) h3 { font-size: 1rem; line-height: 1.48; overflow-wrap: anywhere; }
.next2-recommendations li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .75rem; }
.next2-recommendations li img { width: clamp(3.25rem, 6vw, 4.5rem); height: auto; aspect-ratio: 1; object-fit: cover; border-radius: .45rem; }
.next2-section-title { margin-block-end: .75rem; font-size: 1.4rem; letter-spacing: -.035em; }
.next2-index-feed { min-width: 0; }
.next2-recommendations { align-self: start; }
.blofinder-next2 .next2-entries {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  border-block-start: 1px solid var(--border-color);
}
.blofinder-next2 .next2-entries .post-card {
  container-type: inline-size;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: clamp(.65rem, 2vw, 1.45rem);
  padding: 1rem 0;
  background: transparent;
  border: 0;
  border-block-end: 1px solid var(--border-color);
  border-radius: 0;
  cursor: default;
  box-shadow: none;
  transform: none;
}
.blofinder-next2 .post-title { font-size: clamp(1.06rem, 2.3vw, 1.35rem); overflow-wrap: anywhere; }
.blofinder-next2 .post-thumb { width: clamp(5rem, 16vw, 11.5rem); height: auto; aspect-ratio: 1.4; }
.blofinder-next2 .post-categories { display: flex; flex-wrap: wrap; gap: .35rem .65rem; list-style: none; color: var(--accent); font-size: .85rem; }
.blofinder-next2 .card-bookmark-btn { width: 44px; min-height: 44px; opacity: 1; }
.blofinder-next2 button[aria-pressed="true"] { background: var(--accent-light); color: var(--accent); border-radius: .5rem; }
.blofinder-next2 [data-next2-read] { margin-inline-start: .45rem; color: var(--text-muted); font-size: .72rem; }
.blofinder-next2[data-view="grid"] .next2-entries {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  border: 0;
  gap: 1rem;
}
.blofinder-next2[data-view="grid"] .next2-entries .post-card {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  align-content: start;
  padding: .85rem;
  border: 1px solid var(--border-color);
  border-radius: .85rem;
  background: var(--surface-color);
}
.blofinder-next2[data-view="grid"] .next2-entries .post-thumb { order: -1; width: 100%; aspect-ratio: 1.65; }
@container (max-width: 23rem) {
  .next2-entries .post-excerpt { display: none; }
}
.next2-recent a:hover, #next2-topics a:hover, .next2-breadcrumb a:hover { color: var(--accent); text-decoration: underline; }
.next2-archive-description { margin-block: 0 1.4rem; color: var(--text-muted); }
.feed-view-container > .next2-not-found-search { margin-block: 1rem 1.5rem; }

.blofinder-next2 .single-article {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
}
.blofinder-next2 .single-header {
  text-align: start;
  padding-block: clamp(.75rem, 2vw, 1.5rem) 1.25rem;
  margin-block-end: 1.5rem;
  border-block-end: 1px solid var(--border-color);
}
.next2-breadcrumb, .next2-byline { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem 1rem; color: var(--text-muted); }
.next2-breadcrumb { margin-block-end: .65rem; font-size: .875rem; }
.next2-byline { font-size: .9rem; }
.next2-article-deck { margin-block: .85rem 0; color: var(--text-muted); font-size: clamp(1rem, 2vw, 1.2rem); }
.next2-article-cover { margin-block: 1.2rem 0; overflow: hidden; border-radius: .75rem; background: var(--code-bg); }
.next2-article-cover img { display: block; width: 100%; height: auto; }
.next2-reading-layout { min-width: 0; }
.next2-article > :is(.single-header, .next2-article-actions, .post-navigation, .next2-related, .comments-area),
.next2-reading-layout { width: min(100%, var(--reading-width)); margin-inline: auto; }
.blofinder-next2 .next2-article-content { min-width: 0; font-size: clamp(1.0625rem, 1.7vw, 1.1875rem); line-height: 1.8; }
.blofinder-next2[data-font="small"] .next2-article-content { font-size: 1rem; }
.blofinder-next2[data-font="large"] .next2-article-content { font-size: 1.3rem; }
.next2-article-content :is(.wp-block-table, .next2-table-scroll) { max-width: 100%; overflow-x: auto; }
.next2-article-content .next2-table-scroll table { min-width: 30rem; }
@media (min-width: 56rem) {
  .next2-home-grid.has-rail {
    grid-template-columns: var(--home-columns);
    grid-template-areas: "feed rail";
    align-items: start;
  }
  .next2-home-grid.has-hero.has-rail { grid-template-areas: "hero rail" "feed rail"; }
  .next2-home-grid.has-rail .hero-post-card { grid-area: hero; }
  .next2-home-grid.has-rail .next2-index-feed { grid-area: feed; }
  .next2-home-rail { grid-area: rail; min-width: 0; }
  .blofinder-next2 .hero-thumb { aspect-ratio: 3.2 / 1; }
}
@media (min-width: 56rem) and (min-height: 48rem) {
  .next2-home-rail {
    --recommendations-inset: 8rem;
    display: flex;
    flex-direction: column;
    align-self: stretch;
  }
  .admin-bar .next2-home-rail { --recommendations-inset: calc(8rem + 32px); }
  .next2-home-rail .next2-recommendations {
    position: sticky;
    inset-block-start: var(--recommendations-inset);
    align-self: stretch;
    max-block-size: calc(100vh - var(--recommendations-inset) - 1rem);
    max-block-size: calc(100dvh - var(--recommendations-inset) - 1rem);
    overflow-y: auto;
    scroll-padding-block: .5rem;
  }
}
@media (min-width: 68rem) {
  .next2-reading-layout:has(#next2-reading-tools > .next2-toc) {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, var(--reading-width)) minmax(0, 1fr);
    column-gap: 1rem;
  }
  .next2-reading-layout > #next2-reading-tools { grid-column: 1; align-self: start; position: sticky; top: 8.3rem; }
  .next2-reading-layout > .next2-article-content { grid-column: 2; }
}
@media (max-width: 25rem) {
  .blofinder-next2 .header-top { padding-inline: .75rem; }
  .blofinder-next2 .site-logo-img { width: 29px; height: 29px; }
  .blofinder-next2 .site-logo-text { font-size: .91rem; }
  .blofinder-next2 .header-actions { gap: .2rem; }
  .blofinder-next2 .next2-theme-toggle { display: none; }
}
.blofinder-next2 .next2-action-button {
	min-height: 44px;
	padding: .4rem .75rem;
	background: var(--surface-color);
	color: var(--text-main);
	border: 1px solid var(--border-color);
	border-radius: .5rem;
	cursor: pointer;
	font: inherit;
	font-size: .9rem;
}
.blofinder-next2 .post-navigation { margin-top: 1.5rem; border-top: 1px solid var(--border-color); padding-top: 1rem; }
.blofinder-next2 .post-navigation .nav-links > div { flex: 1 1 12rem; }
.blofinder-next2 .post-navigation a { display: block; padding: .6rem 0; font-weight: 700; }
.blofinder-next2 .post-navigation a span { display: block; color: var(--accent); font-size: .85rem; }
.blofinder-next2 .single-title {
  font-size: clamp(1.55rem, 1.1rem + 2vw, 2.25rem);
  line-height: 1.25;
  letter-spacing: -.035em;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
.blofinder-next2 .single-content a { color: var(--accent); text-decoration: underline; }
.blofinder-next2 .single-content pre { background: var(--code-bg); padding: 1rem; border-radius: .5rem; }
.blofinder-next2 .single-content :is(h2, h3), .blofinder-next2 :is(#next2-main, #next2-bookmarks, #next2-topics) { scroll-margin-top: 12rem; }
.blofinder-next2 .next2-toc { background: var(--accent-light); padding: .8rem 1rem; border-radius: .6rem; margin-bottom: 1.5rem; }
.blofinder-next2 .next2-toc summary { cursor: pointer; font-weight: 700; }
.blofinder-next2 .next2-toc ol { margin: .5rem 0 0 1.25rem; }
@media (max-width: 420px) {
	.blofinder-next2 .header-actions { gap: .25rem; }
	.blofinder-next2 .post-thumb { width: 5.25rem; height: 4.25rem; }
}
@media (prefers-reduced-motion: reduce) {
	.blofinder-next2, .blofinder-next2 * { animation: none !important; transition: none !important; }
}

#next2-react-root { display: flex; align-items: center; gap: inherit; }
.next2-preferences { display: flex; flex-wrap: wrap; gap: .35rem .65rem; padding-block: .45rem; }
.next2-preference { display: inline-flex; align-items: center; gap: .5rem; }
.next2-preference label { padding: 0; }
.next2-preferences select {
  min-height: 44px;
  padding-inline: .55rem;
  background: var(--surface-color);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: .45rem;
  font: inherit;
}
.next2-saved-panel, .next2-related {
  margin-block: 1.25rem;
  padding: 1rem 1.2rem;
  border: 1px solid var(--border-color);
  border-radius: .65rem;
  background: var(--surface-color);
}
aside.next2-saved-panel { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.next2-saved-panel strong { color: var(--accent); margin-inline-end: .45rem; }
.next2-saved-panel ul, .next2-related ul { margin-inline-start: 1.2rem; }
.next2-saved-panel a, .next2-related a { text-decoration: underline; text-underline-offset: .2em; overflow-wrap: anywhere; }
.next2-saved-panel a:hover, .next2-related a:hover { color: var(--accent); }
.next2-related h2, .next2-saved-panel h2 { font-size: 1.2rem; margin-bottom: .4rem; }
.next2-progress { position: fixed; inset: 0 0 auto; height: 3px; z-index: 1001; pointer-events: none; }
.next2-progress span { display: block; height: 100%; background: var(--accent); }
.next2-toc-subheading { margin-inline-start: 1rem; }
.next2-image-tools { display: block; margin-block: .4rem; }
.next2-code-tools { display: flex; justify-content: end; margin-top: 1rem; }
.next2-article-actions, .next2-not-found-search { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; }
.next2-not-found-search { margin-top: 1rem; max-width: 32rem; }
.next2-not-found-search input { min-width: 0; }
.next2-image-dialog {
  width: fit-content;
  max-width: calc(100% - 2rem);
  max-height: calc(100% - 2rem);
  margin: auto;
  padding: .75rem;
  overflow: auto;
  border: 1px solid var(--border-color);
  border-radius: .75rem;
  color: var(--text-main);
  background: var(--surface-color);
}
.next2-image-dialog::backdrop { background: rgb(5 12 29 / 82%); }
.next2-image-dialog form { display: flex; justify-content: end; margin-bottom: .5rem; }
.next2-image-dialog img { display: block; max-width: 100%; max-height: 75vh; object-fit: contain; }
.next2-image-dialog figcaption { margin-top: .5rem; text-align: center; color: var(--text-muted); }
