/* psychoSocial — Components CSS (v0.3)
   Buttons, cards, dropdowns, micro-interactions, utilities.
*/
.blogSection .postTitle,
.blogArchive .postTitle{
  color:var(--fg);
}
.blogSection .postTitle:before,
.blogArchive .postTitle:before{
  content:"⋄";
  display:inline-block;
  margin-right:10px;
  opacity:.9;
  color:var(--accentGreenReadable);
}

.resourcesSection .postTitle,
.resourcesArchive .postTitle{
  color:var(--fg);
}
.resourcesSection .postTitle:before,
.resourcesArchive .postTitle:before{
  content:"⋄";
  display:inline-block;
  margin-right:10px;
  opacity:.9;
  color:rgba(255,90,90,.86);
}

.pubdate{
  color:var(--muted);
  font-size:var(--font-size-xs);
  letter-spacing:.10em;
  font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace;
  margin:6px 0 14px 0;
}
.meta{
  color:var(--muted);
  font-size:var(--font-size-xs);
  letter-spacing:.12em;
  text-transform:uppercase;
  font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace;
  white-space:nowrap;
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  display:flex;
  align-items:center;
  gap:10px;
}
.meta .metaText{
  min-width:0;
  flex:1 1 auto;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

/* META PACK
   - metaLeft: section/tags/category (compact)
   - metaRight: date/time (kept readable)
   This keeps the "wide desktop" meta from feeling like a single long code-string. */
.meta .metaLeft{
  min-width:0;
  flex:1 1 auto;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  opacity:.85;
}
.meta .metaRight{
  flex:0 0 auto;
  opacity:.95;
}
.meta .newBadge{ flex:0 0 auto; }
.sigil{ opacity:.9; }
.excerpt{ margin-top:var(--spacing-sm); color:var(--muted); font-size:var(--font-size-sm); line-height:1.5; }

.articleTitle{ margin:6px 0 6px; font-size:22px; color:var(--fg); font-weight:800; }
body[data-page="post"] .articleTitle::before{
  content:"⋄";
  display:inline-block;
  margin-right:10px;
  color:var(--accentGreenReadable);
  opacity:.92;
}
body[data-page="resource"] .articleTitle::before{
  content:"⋄";
  display:inline-block;
  margin-right:10px;
  color:var(--accent);
  opacity:.88;
}



.articleMeta{
  color:var(--muted);
  font-size:var(--font-size-xs);
  letter-spacing:.12em;
  text-transform:uppercase;
  font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace;
  margin-bottom:12px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}
/*
  Base article content.
  NOTE: default is pre-wrap because blog entries are often stored as plain text.
  Resource pages inject richer HTML (headings, lists, details, TOC), so we
  override whitespace rules in the scoped .resourceContent block below.
*/
.content{ color:var(--muted); line-height:1.75; font-size:15px; white-space:pre-wrap; }
.quote{
  margin:14px 0;
  padding:12px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(0,0,0,.22);
  color:rgba(242,242,242,.88);
  font-style:italic;
  line-height:1.6;
  white-space:pre-wrap;
}

.embedVideo{
  margin:14px 0 12px;
  border-radius:var(--border-radius-lg);
  overflow:hidden;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.02);
  box-shadow:0 10px 24px rgba(0,0,0,.35);
}
.embedVideo video{
  width:100%;
  height:auto;
  display:block;
  background:#000;
}
.embedVideo iframe{
  width:100%;
  aspect-ratio:16/9;
  height:auto;
  display:block;
  border:0;
  background:#000;
}

.embedVideo .videoShell{
  position:relative;
  width:100%;
  overflow:hidden;
  border-radius:var(--border-radius-lg);
}
.embedVideo .videoPoster{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  z-index:2;
  display:block;
  cursor:pointer;
}
.embedVideo .videoShell.is-playing .videoPoster{
  display:none;
}
.media{
  margin-top:14px;
  border-radius:var(--border-radius-lg);
  overflow:hidden;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.22);
}
.media img{ width:100%; height:auto; display:block; filter:contrast(1.05); }

.outLink{
  margin-top:20px;
  display:inline-flex;
  align-items:center;
  gap:14px;
  padding:var(--spacing-md) 20px;
  border-radius:var(--border-radius-lg);
  border:1px solid rgba(255,255,255,.28);
  background:rgba(255,255,255,.10);
  color:var(--fg);
  text-decoration:none;
  font-size:15.5px;
  letter-spacing:.14em;
  line-height:1.3;
  font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace;
  opacity:.9;
  box-shadow:0 0 0 1px rgba(255,255,255,.10) inset, 0 10px 22px rgba(0,0,0,.55);
  transition:opacity .15s ease, background .15s ease, border-color .15s ease, transform .08s ease;
}
.outLink:hover{
  opacity:1;
  background:rgba(255,255,255,.16);
  border-color:rgba(255,255,255,.45);
  transform:translateY(-1px);
}
.outLink .sigil{ opacity:.85; font-size:var(--font-size-base); }
.ytIcon{ width:22px; height:22px; fill:currentColor; opacity:.85; }
.outLink:hover .ytIcon{ opacity:1; }

@media (prefers-reduced-motion: reduce){
  .banner img{ animation:none !important; }
  .ritualStrip{ animation:none !important; }
  .ritualStrip::before{ animation:none !important; }
  .ritualStrip::after{ animation:none !important; }
  .menu-item:not(.drawerLink){
    transition: none !important;
  }
}

.ritualTop{
  position:sticky;
  top:0;
  z-index:var(--z-ritual-top);
  margin:0;
  padding:12px 10px;
  border-top:0;
}
.ritualTop .ritualInner{
  width:100%;
  max-width:860px;
  margin:0 auto;
  padding:0 14px;
}
.ritualNoise{
  flex:1;
  height:14px;
  border-radius:var(--border-radius-full);
  opacity:.55;
  background-image: radial-gradient(rgba(0,0,0,.55) 1px, transparent 1px);
  background-size: 4px 4px;
}
.ritualBracket{ opacity:.9; }

@media (max-width:420px){
  .ritualText{ font-size:var(--font-size-xs); letter-spacing:.14em; }
  .ritualIcon{ width:32px; height:32px; }
  .ritualNoise{ height:12px; }
}

.sectionTitle{
  margin:0 0 10px;
  font-size:var(--font-size-base);
  letter-spacing:.14em;
  text-transform:uppercase;
  opacity:.9;
}

.resourceGrid{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.resourceCard{
  border:1px solid rgba(255,255,255,.14);
  background:rgba(0,0,0,.22);
  border-radius:var(--border-radius-lg);
  padding:14px;
}
.resourceTitle{
  margin:0 0 10px;
  
  color:var(--accent);
  font-weight:800;
  letter-spacing:.02em;
  font-size:15px;
}
.resourceList{
  margin:0;
  padding-left:18px;
  color:rgba(242,242,242,.86);
  line-height:1.55;
  font-size:var(--font-size-sm);
}
.resourceList li{ margin:6px 0; }
.resourceList a{ color:rgba(242,242,242,.9); text-decoration:none; border-bottom:1px solid rgba(255,255,255,.18); }
.resourceList a:hover{ border-bottom-color:rgba(255,90,90,.45); color:#fff; }

.resourceFull{
  margin-top:14px;
  padding:14px;
  border-radius:var(--border-radius-lg);
  border:1px solid rgba(255,255,255,.14);
  background:rgba(0,0,0,.22);
}

.resourceMeta{
  margin-top:10px;
  font-size:var(--font-size-xs);
  letter-spacing:.12em;
  text-transform:uppercase;
  opacity:.75;
  font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace;
}

.resourceMetaLabel{ opacity:.85; }
.resourceMetaValue{ opacity:1; }
.resourceMetaSep{ opacity:.55; }

.resourceRefs{
  margin-top:12px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.04);
  box-shadow:0 0 0 1px rgba(255,255,255,.05) inset;
  padding:10px 12px;
}

.resourceRefsSummary{
  cursor:pointer;
  font-size:var(--font-size-xs);
  letter-spacing:.18em;
  text-transform:uppercase;
  font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace;
  opacity:.9;
}

.resourceRefsList{
  margin:10px 0 0;
  padding-left:18px;
  color:rgba(242,242,242,.86);
  line-height:1.55;
  font-size:var(--font-size-sm);
}

.resourceCta{
  margin-top:14px;
  padding-top:12px;
  border-top:1px solid rgba(255,255,255,.10);
}

.resourceCtaBtn{ display:inline-flex; }

.resourceFull[hidden]{ display:none; }

/*
  Resource article typography (resource.html).
  Goals:
  - Remove "fake" blank lines coming from injected HTML/newlines.
  - Improve scanning: tighter rhythm, consistent margins, clearer blocks.
  - Keep blog post rendering untouched (blog content remains pre-wrap).
*/
.resourceArticle .resourceContent{
  white-space:normal; /* HTML content should not preserve raw newlines */
  line-height:1.65;
}

/* Resource page: avoid pre-wrapped whitespace that wastes horizontal space */
.resourceArticle .content{
  white-space: normal;
}

/* Top-of-article helper blocks used by our bilingual resource template. */
.resourceArticle .resourceContent .sectionTitle{
  margin:14px 0 6px;
}
.resourceArticle .resourceContent .resourceCredit{
  margin:6px 0 12px;
  color:rgba(242,242,242,.72);
  font-size:var(--font-size-xs);
  letter-spacing:.12em;
  text-transform:uppercase;
}
.resourceArticle .resourceContent .muted{
  color:rgba(242,242,242,.70);
}


/* Breadcrumbs: minimal path with ⋄ separators (ritual, not UI status). */
.psBreadcrumbBar{
  margin:6px 0 8px;
  padding:0 2px;
  overflow:hidden;
}
/* Home: hide redundant "Home" label when breadcrumb is single item */
body[data-page="home"] .psBreadcrumbBar{
  display:none;
}
.psCrumbs{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:var(--spacing-sm);
  margin:0 0 6px;
  padding:0;
  font-size:11px;
  letter-spacing:.18em;
  text-transform:uppercase;
  opacity:.72;
  min-width:0;
}
body.psBreadcrumbOn #pageTag .psCrumbs{
  display:none;
}
/* Hide legacy in-card breadcrumb on detail pages when global breadcrumb is active */
body.psBreadcrumbOn #pageTag:empty{
  display:none;
}
.psCrumbs a{
  display:inline-flex;
  align-items:center;
  min-width:0;
  padding:2px 4px;
  border-radius:6px;
  color:rgba(242,242,242,.86);
  text-decoration:none;
}
.psCrumbs a:hover{
  color:#fff;
  text-decoration: underline;
  text-underline-offset: .18em;
}
.psCrumbs a:focus-visible{
  outline:2px solid var(--accent);
  outline-offset:2px;
}
.psCrumbSep{
  opacity:.65;
  font-size:var(--font-size-xs);
  margin:0 2px;
}
.psCrumbHere{
  display:inline-flex;
  align-items:center;
  min-width:0;
  color:rgba(242,242,242,.92);
  opacity:.92;
}
.psBreadcrumbBar .psCrumbHere{
  font-weight:700;
  opacity:.98;
}

html[data-theme="light"] .psCrumbs a{
  color:rgba(0,0,0,.78);
}
html[data-theme="light"] .psCrumbs a:hover{
  color:#000;
  text-decoration: underline;
  text-underline-offset: .18em;
}
html[data-theme="light"] .psCrumbHere{ color:rgba(0,0,0,.84); }
.resourceArticle .resourceContent > *:first-child{ margin-top:0; }

@media (max-width: 640px){
  .psBreadcrumbBar{ margin:4px 0 6px; }
  .psBreadcrumbBar .psCrumbs{
    display:block;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }
  .psBreadcrumbBar .psCrumbs > *{
    display:inline;
  }
}

.resourceArticle .resourceContent p{ margin:10px 0; }
.resourceArticle .resourceContent ul,
.resourceArticle .resourceContent ol{ margin:10px 0 10px 20px; }
.resourceArticle .resourceContent li{ margin:6px 0; }

.resourceArticle .resourceContent h2{
  margin:20px 0 10px;
  letter-spacing:.06em;
}
.resourceArticle .resourceContent h3{
  margin:14px 0 8px;
  letter-spacing:.05em;
}

.resourceArticle .resourceContent hr{
  border:0;
  height:1px;
  background:rgba(255,255,255,.10);
  margin:18px 0;
}

.resourceToc{
  margin-top:12px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.04);
  /* Slightly tighter than default cards to reduce vertical bloat on long resources. */
  padding:10px 12px;
  box-shadow:0 0 0 1px rgba(255,255,255,.06) inset;
}

.resourceTocTitle{
  font-size:var(--font-size-xs);
  letter-spacing:.18em;
  text-transform:uppercase;
  font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace;
  opacity:.9;
  margin-bottom:var(--spacing-sm);
}

.resourceTocList{
  list-style:none;
  margin:0;
  padding-left:0;
  color:rgba(242,242,242,.86);
  line-height:1.45;
  font-size:var(--font-size-sm);
}

.resourceTocList li{
  position:relative;
  padding-left:var(--spacing-md);
  margin:var(--spacing-xs) 0;
}

.resourceTocList li::before{
  content:'⋄';
  position:absolute;
  left:0;
  top:0;
  color:rgba(242,242,242,.78);
}

html[data-theme="light"] .resourceTocList{
  color:rgba(20,20,20,.78);
}
html[data-theme="light"] .resourceTocList li::before{
  color:rgba(20,20,20,.55);
}
.resourceTocList a{
  color:rgba(242,242,242,.9);
  text-decoration:none;
  border-bottom:1px solid rgba(255,255,255,.18);
}

.resourceTocList a:hover{ border-bottom-color:rgba(255,255,255,.45); color:#fff; }

.langTabs{
  margin-top:10px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.langTab{
  /* Slightly tighter to reduce vertical bloat (especially under the header). */
  padding:9px 11px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(0,0,0,.26);
  color:rgba(242,242,242,.92);
  cursor:pointer;
  font-size:var(--font-size-xs);
  letter-spacing:.14em;
  text-transform:uppercase;
  font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace;
  transition:background .15s ease, border-color .15s ease, transform .06s ease;
}

.langTab:hover{ background:rgba(255,255,255,.08); }
.langTab:active{ transform:scale(.995); }

.langTab.is-active{
  background:rgba(255,255,255,.10);
  border-color:rgba(255,255,255,.32);
  box-shadow:0 0 0 1px rgba(255,255,255,.08) inset;
}

.langPanel[hidden]{ display:none; }

.langBlock{
  margin-top:10px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.04);
  box-shadow:0 0 0 1px rgba(255,255,255,.05) inset;
  overflow:hidden;
}

.langBlock > summary{
  list-style:none;
  cursor:pointer;
  padding:14px 14px;
  font-size:var(--font-size-xs);
  letter-spacing:.18em;
  text-transform:uppercase;
  font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace;
  color:rgba(242,242,242,.92);
  background:rgba(0,0,0,.28);
  border-bottom:1px solid rgba(255,255,255,.10);
}

.langBlock[open] > summary{
  background:rgba(255,255,255,.06);
}

.langBlock > summary::-webkit-details-marker{ display:none; }

.resourceBody{ padding:var(--spacing-md) var(--spacing-md) 12px; }

.resourceH{
  margin:0 0 10px;
  color:rgba(242,242,242,.96);
  font-weight:800;
  letter-spacing:.04em;
}

.resourceBody h4.resourceH{
  margin-top:14px;
  font-size:13px;
  letter-spacing:.14em;
  text-transform:uppercase;
  opacity:.95;
}

.resourceBody h3.resourceH{
  font-size:var(--font-size-base);
  letter-spacing:.12em;
  text-transform:uppercase;
}

.resourceP{
  margin:0 0 10px;
  color:rgba(242,242,242,.82);
  line-height:1.65;
  font-size:var(--font-size-sm);
}

.resourceNote{
  margin:12px 0 12px;
  padding:12px 14px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.05);
  color:rgba(242,242,242,.84);
  line-height:1.65;
  font-size:var(--font-size-sm);
}

.resourceAction{
  display:inline-block;
  margin-top:6px;
  padding:6px 10px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(0,0,0,.22);
  color:rgba(242,242,242,.92);
  font-size:var(--font-size-xs);
}

.muted{ opacity:.78; }

.resourceBullets{
  margin:0 0 10px;
  padding-left:18px;
  color:rgba(242,242,242,.82);
  line-height:1.6;
  font-size:var(--font-size-sm);
}

.resourceBullets li{ margin:var(--spacing-sm) 0; }


/* Sigil lists: ⋄ is the central marker (top level), · for sub lists. */
.resourceBullets li::marker{ content:"⋄  "; }
.resourceBullets.sub li::marker{ content:"·  "; }
.resourceLinks li::marker{ content:"⋄  "; }

.resourceBullets.sub{
  margin-top:var(--spacing-sm);
  margin-bottom:0;
  opacity:.98;
}

.resourceTableWrap{
  margin:10px 0 12px;
  border:1px solid rgba(255,255,255,.10);
  border-radius:14px;
  overflow:auto;
  background:rgba(0,0,0,.18);
}

.resourceTable{
  width:100%;
  border-collapse:collapse;
  min-width:520px;
}

.resourceTable th,
.resourceTable td{
  text-align:left;
  padding:10px 12px;
  border-bottom:1px solid rgba(255,255,255,.08);
  font-size:13px;
  color:rgba(242,242,242,.86);
}

.resourceTable th{
  font-size:var(--font-size-xs);
  letter-spacing:.14em;
  text-transform:uppercase;
  color:rgba(242,242,242,.92);
  background:rgba(255,255,255,.04);
}

.resourceTable tr:last-child td{ border-bottom:none; }

.resourceLinks{
  margin:0;
  color:rgba(242,242,242,.86);
  line-height:1.6;
  font-size:var(--font-size-sm);
}

.resourceLinks:is(ul,ol){
  padding-left:18px;
}

.resourceLinks:is(ul,ol) li{ margin:7px 0; }

.resourceLinks:is(ul,ol) a{
  color:rgba(242,242,242,.92);
  text-decoration:none;
  border-bottom:1px solid rgba(255,255,255,.18);
}

.resourceLinks:is(ul,ol) a:hover{
  border-bottom-color:rgba(255,255,255,.45);
  color:#fff;
}

/* Action buttons row (div.resourceLinks) */
.resourceLinks:not(ul):not(ol){
  padding-left:0;
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin:10px 0 2px;
}
.resourceLinks:not(ul):not(ol) .btn{
  margin:0;
}
@media (max-width: 560px){
  .resourceLinks:not(ul):not(ol){
    flex-direction:column;
    align-items:stretch;
  }
  .resourceLinks:not(ul):not(ol) .btn{
    width:100%;
    justify-content:flex-start;
  }
}

/* Light theme: resource typography (fix invisible content in light mode) */
html[data-theme="light"] .resourceH{ color:rgba(0,0,0,.88); }
html[data-theme="light"] .resourceP,
html[data-theme="light"] .resourceBullets,
html[data-theme="light"] .resourceLinks,
html[data-theme="light"] .resourceCredit{
  color:rgba(0,0,0,.78);
}
html[data-theme="light"] .resourceLinks:is(ul,ol) a{
  color:rgba(0,0,0,.86);
  border-bottom-color:rgba(0,0,0,.18);
}
html[data-theme="light"] .resourceLinks:is(ul,ol) a:hover{
  color:#000;
  border-bottom-color:rgba(0,0,0,.45);
}
html[data-theme="light"] .resourceNote{
  border-color:rgba(0,0,0,.12);
  background:rgba(0,0,0,.03);
  color:rgba(0,0,0,.80);
}
html[data-theme="light"] .resourceAction{
  border-color:rgba(0,0,0,.14);
  background:rgba(255,255,255,.70);
  color:rgba(0,0,0,.86);
}
html[data-theme="light"] .resourceTableWrap{
  border-color:rgba(0,0,0,.10);
  background:rgba(255,255,255,.70);
}
html[data-theme="light"] .resourceTable th,
html[data-theme="light"] .resourceTable td{
  border-bottom-color:rgba(0,0,0,.10);
  color:rgba(0,0,0,.82);
}

/* Light theme: glossary / FAQ containers */
html[data-theme="light"] details.glossaryItem{
  border-color:rgba(0,0,0,.14);
  background:rgba(255,255,255,.70);
}
html[data-theme="light"] details.glossaryItem > summary{
  color:var(--accentGreenReadable);
}
html[data-theme="light"] details.faqItem{
  border-color:rgba(0,0,0,.12);
  background:rgba(0,0,0,.03);
}
html[data-theme="light"] details.faqItem > summary{
  color:rgba(0,0,0,.86);
}
.searchRow{
  display:flex;
  gap:10px;
  align-items:center;
  margin:4px 0 12px;
}
.searchInput{
  flex:1;
  padding:12px 14px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(0,0,0,.26);
  color:var(--fg);
  outline:none;
  font-size:var(--font-size-sm);
}
.searchInput:focus{
  border-color:rgba(255,90,90,.35);
  box-shadow:0 0 0 3px rgba(255,90,90,.08);
}
.searchMeta{
  opacity:.7;
  font-size:var(--font-size-xs);
  letter-spacing:.08em;
  text-transform:uppercase;
}

/* Glossary (Resources template)
   UX goal: show terms only by default; reveal definitions on tap/click.
*/
.glossaryWrap{ margin-top:6px; }
.glossarySearch{ width:100%; }
.glossaryList{ display:flex; flex-direction:column; gap:10px; margin-top:10px; }

details.glossaryItem{
  border:1px solid rgba(255,255,255,.14);
  background:rgba(0,0,0,.20);
  border-radius:16px;
  overflow:hidden;
}

details.glossaryItem > summary{
  cursor:pointer;
  padding:12px 14px;
  list-style:none;
  font-weight:800;
  color:var(--accentGreenReadable);
  letter-spacing:.01em;
}
details.glossaryItem > summary::-webkit-details-marker{ display:none; }

.glossaryDef{ padding:0 14px 12px; }
.glossaryDef .resourceP{ margin:0; }
.glossaryRelated{
  margin-top:10px;
  font-size:var(--font-size-xs);
  letter-spacing:.10em;
  text-transform:uppercase;
  opacity:.75;
  font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace;
}
.glossaryEmpty{
  margin-top:var(--spacing-sm);
  opacity:.7;
  font-size:var(--font-size-xs);
  letter-spacing:.10em;
  text-transform:uppercase;
}

details.faqItem{
  margin-top:10px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.04);
  border-radius:14px;
  overflow:hidden;
}
details.faqItem > summary{
  cursor:pointer;
  padding:10px 12px;
  list-style:none;
  font-weight:700;
  letter-spacing:.02em;
}
details.faqItem > summary::-webkit-details-marker{ display:none; }
.faqA{
  padding:0 12px 12px;
  color:rgba(242,242,242,.86);
  line-height:1.55;
  font-size:13px;
}
.resultList{
  display:grid;
  gap:10px;
  margin-top:10px;
}
.resultItem{
  display:block;
  text-decoration:none;
  color:var(--fg);
  border:1px solid rgba(255,255,255,.14);
  background:rgba(0,0,0,.20);
  border-radius:16px;
  padding:12px 14px;
}
.resultTitle{
  margin:0 0 6px;
  font-weight:800;
  color:var(--fg);
  font-size:var(--font-size-sm);
}
.resultMeta{
  margin:0 0 6px;
  opacity:.7;
  font-size:var(--font-size-xs);
  letter-spacing:.10em;
  text-transform:uppercase;
}

.resultItem--blog .resultTitle{ color:var(--fg); }
.resultItem--blog .resultTitle:before{ content:"⋄"; display:inline-block; margin-right:10px; opacity:.9; color:var(--accentGreenReadable); }
.resultItem--blog .resultMeta{ color:var(--accentGreenReadable); }

.resultItem--resources .resultTitle{ color:var(--fg); }
.resultItem--resources .resultTitle:before{ content:"⋄"; display:inline-block; margin-right:10px; opacity:.9; color:rgba(255,90,90,.86); }
.resultItem--resources .resultMeta{ color:rgba(255,90,90,.86); opacity:.78; }

.resultSnippet{
  margin:0;
  color:rgba(242,242,242,.82);
  font-size:13px;
  line-height:1.5;
}

.outBadge{ width:22px; height:22px; display:grid; place-items:center; border:1px solid rgba(255,255,255,.28); border-radius:var(--border-radius-md); font-weight:900; letter-spacing:.02em; opacity:.85; }

@media (max-width:360px){
  .topbarCenter{ gap:var(--spacing-sm); }
  .pageTag{ padding:9px 10px; }
}

.tagRow{
  display:flex;
  align-items:center;
  gap:10px;
  width:100%;
}

.tagRow .pageTag{
  flex:1;
  margin:0;
}

/* Resources page: keep section filter on its own row */
body[data-page="resources"] .tagRow.tagRowFilter{
  margin-top:10px;
}
body[data-page="resources"] .tagRow.tagRowFilter .filterSelect{
  width:100%;
  max-width:none;
  font-size: 15px;
  line-height: 1.2;
}

.filterSelect:focus,
.filterSelect:focus-visible{
  outline: 2px solid rgba(255,255,255,0.18);
  outline-offset: 2px;
  background: rgba(0,0,0,0.55);
  color: var(--fg);
}


/*
  Centered tag row variant (used on Archive page for the page title).
  Overrides the default "flex: 1" stretching so a single tag can sit centered.
*/
.tagRowCentered{
  justify-content:center;
}

.tagRowCentered .pageTag{
  flex:0;
  width:auto;
  min-width:160px;
  text-align:center;
}

.sigilNav{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  flex-wrap:wrap;
}

.sigilBtns{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  flex-wrap:nowrap;
}

.sigilRowPost{
  margin-top:0;
  margin-bottom:12px;
}

.sigilRowPost{ position:relative; }
.sigilRowPost #backBtn{
  position:absolute;
  left:0;
  top:0;
  z-index:3;
}
.postBottomNav{
  display:flex;
  justify-content:center;
  margin:18px 0 6px;
}

/* Prev/Next cards (detail pages) */
.psPrevNext{
  display:flex;
  gap:12px;
  align-items:stretch;
  margin:12px 0 14px;
}
.psPrevNextLink{
  flex:1 1 0;
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:6px;
  padding:12px 14px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.16);
  background:rgba(0,0,0,.18);
  text-decoration:none;
  color:var(--fg);
  box-shadow:0 0 0 1px rgba(255,255,255,.05) inset;
}
.psPrevNextLink[data-dir="next"]{
  align-items:flex-end;
  text-align:right;
}
.psPrevNextLabel{
  font-size:11px;
  letter-spacing:.18em;
  text-transform:uppercase;
  opacity:.7;
  font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace;
}
.psPrevNextTitle{
  font-size:var(--font-size-sm);
  font-weight:700;
  line-height:1.3;
  opacity:.9;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.psPrevNextLink:focus-visible{
  outline:2px solid var(--accent);
  outline-offset:2px;
}
@media (max-width:640px){
  .psPrevNext{ flex-direction:column; }
  .psPrevNextLink{ width:100%; }
}

/* v1.12.7 — group content nav (prev/next) vs site nav (back/home/share) */
.postBottomNav .psNavBar{
  display:flex;
  align-items:center;
  gap:12px;
}
.postBottomNav .psNavGroup{
  display:flex;
  align-items:center;
  gap:12px;
}
.postBottomNav .psNavSep{
  width:1px;
  height:34px;
  border-radius:1px;
  background: rgba(0,0,0,.18);
  opacity:.35;
}
/* If no content buttons exist, hide the separator entirely. */
.postBottomNav .psNavGroupContent:empty + .psNavSep{ display:none; }

/* v1.12.6 — unified bottom navigation: icon + explicit label (less ambiguity vs prev/next/back) */
.postBottomNav .psNavBtn{
  width:56px;
  height:56px;
  padding:6px 8px;
  display:inline-flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  /* v1.12.21 — icon-only buttons (labels hidden globally) */
  gap:0;
  text-decoration:none;
}
.postBottomNav .psNavIco{
  /* Use a fixed box to prevent font-glyph overflow (notably iOS). */
  width:20px;
  height:20px;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  line-height:0;
}
.postBottomNav .psNavLbl{
  /* v1.12.21 — hide text inside nav buttons (icons are self-explanatory).
     Keep the element in DOM so aria/JS fallbacks remain stable. */
  display:none;
}
@media (max-width:420px){
  .postBottomNav .psNavBtn{ width:52px; height:52px; gap:0; }
}

@media (max-width:560px){
  /* Mobile: long localized labels can overflow on back/share; use icon-only for clarity. */
  .postBottomNav .psNavBtn[data-ps-nav-role="back"] .psNavLbl,
  .postBottomNav .psNavBtn[data-ps-nav-role="home"] .psNavLbl,
  .postBottomNav .psNavBtn[data-ps-nav-role="share"] .psNavLbl{ display:none; }
  .postBottomNav .psNavBtn[data-ps-nav-role="back"],
  .postBottomNav .psNavBtn[data-ps-nav-role="home"],
  .postBottomNav .psNavBtn[data-ps-nav-role="share"]{ gap:0; }

  /* Extra safety: if a page ends up without data-ps-nav-role attrs (cached HTML / custom
     markup), hide labels for the *site* group regardless, while leaving archive PREV/NEXT intact. */
  .postBottomNav .psNavGroupSite .psNavLbl{ display:none; }
  .postBottomNav .psNavGroupSite .psNavBtn{ gap:0; }
}

.tagRow .iconBtn{
  width:50px;
  height:50px;
  border-radius:16px;
  font-size:22px;
}

.tagRow .pageTag{
  font-size:17px;
  padding:12px 16px;
  border-radius:16px;
}

@media (max-width:420px){
  .tagRow .iconBtn{ width:46px; height:46px; border-radius:15px; font-size:var(--font-size-lg); }
  .tagRow .pageTag{ font-size:15px; padding:11px 14px; border-radius:15px; }
}

.ytFallback{
  margin-top:10px;
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:12px 14px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.18);
  background:rgba(255,255,255,.06);
  color:rgba(242,242,242,.88);
  text-decoration:none;
  font-size:13px;
  letter-spacing:.12em;
  font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace;
  opacity:.9;
}
.ytFallback:hover{
  opacity:1;
  background:rgba(255,255,255,.10);
  border-color:rgba(255,255,255,.28);
}

.resourceCredit{
  margin: 10px 0 18px;
  opacity: .85;
  font-size: var(--font-size-sm);
}
.resourceCredit a{
  color:inherit;
  text-decoration:none;
  border-bottom:1px solid rgba(255,255,255,.22);
}
.resourceCredit a:visited{ color:inherit; }
.resourceCredit a:hover{
  border-bottom-color:rgba(255,255,255,.55);
}
html[data-theme="light"] .resourceCredit a{
  border-bottom-color:rgba(0,0,0,.22);
}
html[data-theme="light"] .resourceCredit a:hover{
  border-bottom-color:rgba(0,0,0,.55);
}

.drawerExitRow{
  display:flex;
  justify-content:center;
  margin-top:4px;
}

.drawerExitBtn{
  width:50px;
  height:50px;
  border-radius:17px;
  font-size:22px;
}

.drawerExit{
  width:50px;
  height:50px;
  border-radius:17px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.08);
  color:var(--fg);
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:22px;
  line-height:1;
  margin:8px auto 0;
  transition:background .15s ease, transform .06s ease;
}
.drawerExit:hover{ background:rgba(255,255,255,.12); }
.drawerExit:active{ transform:scale(.99); }

.viewSection{ display:block; }
body.view-blog-only #resourcesSection[hidden]{ display:none; }
#resourcesSection:not([hidden]){ display:block; }
body.view-resources-only #blogSection[hidden]{ display:none; }
#blogSection:not([hidden]){ display:block; }

body.view-blog-only .sectionDivider{ display:none; }
body.view-resources-only .sectionDivider{ display:none; }


body.view-blog-only .sectionScroller.posts{
  max-height:none;
  overflow:visible;
  padding-right:0;
}


body.view-resources-only .sectionScroller.resourcesScroller{
  max-height:none;
  overflow:visible;
  padding-right:0;
}

.hidden{ display:none !important; }


.scrollNav{
  position:fixed;
  right:14px;
  bottom:14px;
  display:flex;
  flex-direction:column;
  gap:10px;
  z-index:var(--z-controls);
}

.scrollBtn{
  width:50px;
  height:50px;
  border-radius:17px;
}

@media (max-width:420px){
  .scrollNav{ right:12px; bottom:12px; }
  .scrollBtn{ width:46px; height:46px; border-radius:15px; }
}


.siteCopyright{
  text-align:center;
  margin:18px 0 6px;
  opacity:.78;
  letter-spacing:.06em;
}

/* Move build stamp into Settings tray (keep DOM in pages but hide footer row on mobile). */
@media (max-width:720px){
  main .siteCopyright{ display:none; }
}

.siteCopyright .siteSep{
  opacity:.55;
  margin:0 .4em;
}

.siteCopyright .siteVersion{
  opacity:.75;
  font-size:.92em;
  letter-spacing:.05em;
}

.siteCopyright .siteMode{
  opacity:.7;
  font-size:.92em;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.splashOverlay{
  position:fixed;
  inset:0;
  display:none;
  align-items:center;
  justify-content:center;
  background:rgba(0,0,0,.94);
  z-index:var(--z-splash);
}
.splashOverlay.open{ display:flex; }
.splashOverlay .splashMedia{
  width:100%;
  height:100%;
  object-fit:contain;
}
.splashOverlay .splashSkip{
  position:absolute;
  top:16px;
  right:16px;
}

/* Gate/banner splash: make “Skip” explicit (top-center). */
.splashOverlay .splashHint{
  position:absolute;
  top:var(--spacing-md);
  left:50%;
  transform:translateX(-50%);
  padding:6px 12px;
  border-radius:var(--border-radius-full);
  border:1px solid rgba(255,255,255,.22);
  background:rgba(255,255,255,.06);
  color:rgba(255,255,255,.92);
  font-size:var(--font-size-xs);
  letter-spacing:.16em;
  text-transform:uppercase;
  font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace;
  user-select:none;
  pointer-events:none; /* click anywhere still skips */
}
body.splashOpen{ overflow:hidden; }


.homeToggles{
  display:flex;
  flex-direction:column;
  gap:14px;
  margin-top:12px;
}
.homeToggles .pageTag{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:center;
}

/* v1.06.8 — HOME accordion hint
   UX: arrows instead of Open/Close text.
   Down arrow = closed, Up arrow = open.
*/
.homeAccState{
  margin-left:10px;
  opacity:.70;
  font-size:1.05em;
  letter-spacing:0;
  text-transform:none;
  line-height:1;
}


body[data-page="home"] .sectionScroller{
  max-height:none;
  overflow:visible;
}


/* HOME dashboard (BLOG / RESOURCES) */
.homeSummary{
  margin:10px 0 14px;
  padding:10px 12px;
  border-radius:var(--border-radius-lg);
  border:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.40);
}
html[data-theme="light"] .homeSummary{
  border:1px solid rgba(0,0,0,.12);
  background:rgba(255,255,255,.62);
}
.homeSummaryLine{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  font-size:.92em;
  letter-spacing:.04em;
}
.homeSummaryK{ opacity:.75; }
.homeSummaryV{ opacity:.95; }
.homeSummaryLink{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:6px 10px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.16);
  text-decoration:none;
}
html[data-theme="light"] .homeSummaryLink{ border:1px solid rgba(0,0,0,.16); }

.homeChips{
  display:flex;
  flex-wrap:wrap;
  gap:var(--spacing-sm);
  margin-top:10px;
}
.homeChip{
  display:inline-flex;
  padding:var(--spacing-xs) var(--spacing-sm);
  border-radius:var(--border-radius-full);
  border:1px solid rgba(255,255,255,.12);
  font-size:.82em;
  opacity:.9;
}
html[data-theme="light"] .homeChip{ border:1px solid rgba(0,0,0,.12); }

.homeMore{
  width:100%;
  margin-top:10px;
  padding:10px 12px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.03);
  color:inherit;
  cursor:pointer;
  letter-spacing:.08em;
  text-transform:uppercase;
  font-size:11px;
  opacity:.92;
}
.homeMore:hover{ opacity:1; }
html[data-theme="light"] .homeMore{
  border:1px solid rgba(0,0,0,.14);
  background:rgba(0,0,0,.03);
}

.newBadge{
  margin-left:var(--spacing-sm);
  padding:2px 6px;
  border-radius:var(--border-radius-full);
  border:1px solid var(--accent);
  font-size:.72em;
  letter-spacing:.08em;
  opacity:.95;
}

.psBadge{
  padding:2px var(--spacing-sm);
  border-radius:var(--border-radius-full);
  border:1px solid var(--border);
  font-size:11px;
  letter-spacing:.14em;
  text-transform:uppercase;
  opacity:.95;
  white-space:nowrap;
}
.psBadgeOfficial{
  border-color:var(--accent);
  color:var(--accent);
  background:rgba(255,255,255,.04);
}
html[data-theme="light"] .psBadgeOfficial{
  background:rgba(0,0,0,.04);
}

#backBtnBottom, #homeBtnBottom{
  width:52px;
  height:52px;
  border-radius:16px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
body[data-page="home"] #backBtnBottom{
  display:none !important;
}
body[data-page="home"] .postBottomNav #backBtnBottom{
  display:none !important;
}
body[data-page="home"] #scrollNav{
  display:none !important;
}

.prefsBar{
  
  padding:0 var(--gutter) 12px;
}
.prefsBarInner{
  
  max-width:calc(var(--pageW) - (var(--gutter) * 2));
  width:100%;
  margin:0 auto;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:12px;
  padding:10px 14px;
  border-radius:22px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.58);
  backdrop-filter:none;
  -webkit-backdrop-filter:none;
}
html[data-theme="light"] .prefsBarInner{
  border:1px solid rgba(0,0,0,.12);
  background:rgba(255,255,255,.72);
}

.prefsBarIndex{
  position:fixed;
  top:0;
  left:0;
  right:0;
  z-index:var(--z-prefs);
  padding:12px var(--gutter) 0;
  display:flex;
  justify-content:center;
  pointer-events:none;
}

@media (max-height:760px){
  .prefsBarIndex{ padding:10px var(--gutter) 0; }
}
.prefsBarIndex .prefsBarInner{
  
  
  width:var(--indexAlignW, 100%);
  max-width:var(--indexAlignW, calc(var(--pageW-narrow) - (var(--gutter) * 2)));
  
  justify-content:space-between;
  pointer-events:auto;
}

@media (max-width:520px){
  .prefsBarInner{
    justify-content:flex-start;
  }

  
  .prefsBarIndex .prefsBarInner{
    justify-content:space-between;
  }
}

/* v1.07.3 — Removed duplicate header offset rules.
   Header offset is now applied ONLY via body.hasFixedHeader in css/base.css,
   toggled by header.js (desktop >= 900px).
   This prevents the mobile "gap" caused by applying --fixedHeaderH while
   the header is static/in-flow.
*/

.topBarInner.topBarInnerStack{
  display:flex;
  flex-direction:column;
  align-items:stretch;
  justify-content:center;
  gap:10px;
}

/* === Desktop header compaction (v1.0 / 2026-01-14)
   Intent:
   - On desktop, reduce header height by switching from 3 stacked rows to a single row:
     prefs (left) • brand (center) • contacts (right).
   - On mobile/tablet, keep the original stacked layout unchanged.
   Regression notes:
   - If a page embeds a different header variant, verify it still uses .topBarInnerStack.
*/
@media (min-width:900px){
  .topBarInner.topBarInnerStack{
    display:grid;
    grid-template-columns: 1fr auto 1fr;
    grid-template-rows: auto;
    align-items:center;
    gap:14px;
  }
  .topRowPrefs{ grid-column:1; }
  .topRowBrand{ grid-column:2; }
  .topRowContacts{ grid-column:3; }

  .brandImgHeader{
    width: min(340px, 100%);
  }

  .contactHeaderRow{
    width:auto;
    margin:0 0 0 auto;
    grid-template-columns: repeat(4, auto);
  }
}

.topRowPrefs .prefsInline{
  width:100%;
  padding:0 6px;
}

/* Header v1.2: theme left, mask centered, language right */
.prefsInline.prefsGrid{
  display:grid;
  grid-template-columns: 1fr auto 1fr;
  align-items:center;
  gap:12px;
}
.prefsInline.prefsGrid .prefsLeft{ justify-self:start; }
.prefsInline.prefsGrid .prefsRight{ justify-self:end; }
.prefsInline.prefsGrid .sigilLink{ justify-self:center; display:inline-flex; }
.prefsInline.prefsGrid .sigilImg{ width:56px; height:56px; border-radius:var(--border-radius-lg); display:block; }


/* Settings button (Theme Pack) */
.prefsSettingsBtn{
  width:46px; height:46px;
  border-radius:15px;
  border:1px solid var(--border);
  background:var(--card);
  color:var(--fg);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:var(--font-size-md);
  line-height:1;
  cursor:pointer;
}
.prefsSettingsBtn:active{ transform:translateY(1px); }

/* Mask moved to contacts row */
.contactHeaderRow .iconMaskLink{ display:flex; align-items:center; justify-content:center; }
.contactHeaderRow .contactMaskImg{ width:30px; height:30px; border-radius:10px; display:block; }


.brandHeaderRow{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
}
.brandImgHeader{
  display:block;
  width:min(320px, 100%);
  height:auto;
  opacity:.95;
}


.contactHeaderRow{
  display:grid;
  grid-template-columns:repeat(5, 1fr);
  gap:var(--spacing-sm);
  align-items:center;
  width:min(360px, 100%);
  margin:0 0 0 auto;
}
.contactHeaderRow .iconBtn{
  width:42px;
  height:42px;
  border-radius:12px;
  display:grid;
  place-items:center;
  margin:0 auto;
}


.fixedHeader{ z-index:var(--z-ritual-top); }

a, button, .btn, .menuBtn, .homeBtn, .resourceCard, .postCard{
  transition: transform 120ms ease, filter 120ms ease, opacity 120ms ease, background-color 120ms ease, border-color 120ms ease;
}

button:active, .btn:active, .menuBtn:active, .homeBtn:active{
  transform: translateY(1px);
}

a:focus-visible, button:focus-visible, .btn:focus-visible, .menuBtn:focus-visible, .homeBtn:focus-visible{
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}


/* Resources index (blog-like) */
.filterSelect{
  max-width:260px;
  flex:0 0 auto;
  appearance:none;
  /* Use theme tokens so the select matches both dark and light mode. */
  background:var(--card);
  border:1px solid var(--border);
  color:var(--fg);
  border-radius:12px;
  padding:10px 12px;
  font-size:var(--font-size-sm);
  font-weight:700;
  letter-spacing:0.04em;
  color-scheme: dark;
}

body[data-theme="light"] .filterSelect{ color-scheme: light; }

.filterSelect option,
.filterSelect optgroup{
  background: var(--card);
  color: var(--fg);
}
.resourceError{
  padding:14px 2px;
  opacity:.75;
  font-size:13px;
  letter-spacing:.04em;
}


/* HOME — prevent NEW badge overflow on narrow screens (Resources panel) */
@media (max-width: 520px){
  #resourcesSection .postTop{
    flex-direction:column;
    align-items:flex-start;
    gap:var(--spacing-sm);
  }
  #resourcesSection .meta{
    white-space:normal;
    flex-wrap:wrap;
    gap:var(--spacing-sm);
  }
  #resourcesSection .newBadge{
    margin-left:0;
  }
}

/* v1.01 — Non-invasive fetch error banner (appears only on data load failures) */
.psBannerError{
  position:fixed;
  left:var(--gutter);
  right:var(--gutter);
  bottom:var(--gutter);
  z-index:var(--z-notify);
  padding:12px 14px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.22);
  background: rgba(255,70,70,.14);
  color: var(--fg);
  font-family: ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace;
  font-size:var(--font-size-xs);
  line-height:1.35;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
[data-theme="light"] .psBannerError{
  border-color: rgba(0,0,0,.14);
}
.psBannerError a{
  color: inherit;
  text-decoration: underline;
}


/* v1.06.4.2 UX refinements: dropdown background (light->white, dark->black) and keep controls readable */
html[data-theme="dark"] .homeDropdown .iconBtn,
html[data-theme="dark"] .homeDropdown .langOpt,
html[data-theme="dark"] .homeDropdown .themeOpt{
  border-color:rgba(255,255,255,.14);
  background:rgba(255,255,255,.06);
  color:#f2f2f2;
}
html[data-theme="dark"] .homeDropdown .iconBtn:hover{ background:rgba(255,255,255,.10); }

html[data-theme="light"] .homeDropdown .iconBtn,
html[data-theme="light"] .homeDropdown .langOpt,
html[data-theme="light"] .homeDropdown .themeOpt{
  border-color:rgba(0,0,0,.14);
  background:rgba(0,0,0,.02);
  color:#0b0b0b;
}
html[data-theme="light"] .homeDropdown .iconBtn:hover{ background:rgba(0,0,0,.05); }

/* Exit button: centered, bold, no mark */
.drawerExitLink{
  justify-content:center;
  font-weight:800;
  letter-spacing:.14em;
  text-transform:uppercase;
}
.drawerExitText{
  display:inline-block;
}

/* Search page: make bottom nav stick to end even with short content */
.searchCard{
  display:flex;
  flex-direction:column;
  min-height:calc(100vh - var(--fixedHeaderH) - 110px);
}
.searchCard #resultList{ flex:1 1 auto; }
.searchCard .postBottomNav{ margin-top:auto; }



/* Dashboard accordion panel (kept for v1.13; hidden in v1.12 via feature flags) */
.dashHeaderHome{
  margin: 10px 0 8px;
}
/* tighten spacing so the embedded dashboard reads as a section, not a new page */
#dashboardSection .dashGrid{
  margin-top: 10px;
}

/* === Global toast stack (SW update + Theme undo) === */
.psToastStack{
  position:fixed;
  left:50%;
  bottom:calc(12px + env(safe-area-inset-bottom));
  transform:translateX(-50%);
  display:flex;
  flex-direction:column;
  gap:var(--spacing-sm);
  width:min(420px, calc(100% - 24px));
  z-index:var(--z-toast);
  pointer-events:none;
}
html.psDockOn .psToastStack{
  bottom:calc(var(--psPack-nav-h, 64px) + 12px + env(safe-area-inset-bottom));
}
.psToastItem{
  pointer-events:auto;
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border-radius:var(--border-radius-lg);
  border:1px solid rgba(255,255,255,.16);
  background:rgba(0,0,0,.62);
  color:#fff;
  font:12px/1.15 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  box-shadow:0 12px 24px rgba(0,0,0,.35);
  transition:opacity .18s ease, transform .18s ease;
}
html[data-theme="light"] .psToastItem{
  background:rgba(0,0,0,.06);
  color:#0b0b0b;
  border-color:rgba(0,0,0,.14);
}
.psToastItem.isLeaving{
  opacity:0;
  transform:translateY(4px);
}
.psToastMsg{ flex:1 1 auto; }
.psToastAction{
  border:0;
  border-radius:14px;
  padding:7px 10px;
  cursor:pointer;
  background:#fff;
  color:#000;
  font-weight:600;
}
html[data-theme="light"] .psToastAction{
  background:#000;
  color:#fff;
}
.psToastClose{
  border:0;
  background:transparent;
  color:inherit;
  opacity:.85;
  padding:0 6px;
  font-size:var(--font-size-base);
  line-height:1;
  cursor:pointer;
}
@media (prefers-reduced-motion: reduce){
  .psToastItem{ transition:none; }
}

.modal{
  position:fixed;
  inset:0;
  display:none;
  align-items:center;
  justify-content:center;
  z-index:var(--z-dialog);
  background:rgba(0,0,0,.72);
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  padding:18px;
}
.modal.open{ display:flex; }
html[data-theme="light"] .modal{ background: rgba(0,0,0,.38); }
.modalCard{
  width:min(560px, 94vw);
  border-radius:var(--border-radius-lg);
  border:1px solid rgba(255,255,255,.12);
  background:rgba(18,18,18,.88);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  box-shadow:0 18px 60px rgba(0,0,0,.75), inset 0 1px 0 rgba(255,255,255,.08);
  padding:16px 16px 14px;
  display:grid;
  gap:14px;
  max-height:min(420px, 80dvh);
  overflow:auto;
}
.modalTitle{
  color:rgba(255,255,255,.92);
  line-height:1.35;
  font-size:var(--font-size-sm);
  letter-spacing:.2px;
}
.modalBody{
  color:rgba(255,255,255,.86);
  line-height:1.45;
  font-size:13px;
  font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace;
  white-space:pre-wrap;
}
.modalBtns{
  display:flex;
  gap:10px;
  justify-content:flex-end;
  flex-wrap:wrap;
}

html[data-theme="light"] .modalCard{
  border:1px solid rgba(0,0,0,.14);
  background:rgba(255,255,255,.94);
  box-shadow:0 18px 60px rgba(0,0,0,.25), inset 0 1px 0 rgba(0,0,0,.06);
}
html[data-theme="light"] .modalTitle{ color:rgba(0,0,0,.88); }
html[data-theme="light"] .modalBody{ color:rgba(0,0,0,.78); }
.modal .btn{ width:auto; }




/* (visual-upgrade.css lives in /css/visual-upgrade.css — single source of truth) */

/* rc1.25 — Resources & Glossary polish
   - Native paragraphs support (content.paragraphs) wants long-read rhythm.
   - Glossary 2.0: desktop grid + snippets + clickable related terms.
   - Official badge + crumbs micro cues (reduced-motion aware).
*/

/* Reading rhythm: prefer bottom spacing for long resources. */
.resourceArticle .resourceContent p{
  margin:0 0 1.6em;
}
.resourceArticle .resourceContent p:last-child{
  margin-bottom:0;
}

/* Breadcrumb cue: “you are here” (very subtle). */
.psCrumbHere{
  animation: psCrumbHerePulse 2.6s ease-in-out infinite;
}
@keyframes psCrumbHerePulse{
  0%,100%{ opacity:.82; }
  50%{ opacity:1; }
}

/* Premium / sacro: Official badge (books). */
.psBadgeOfficial{
  border-color: rgba(255,185,120,.55);
  color: rgba(255,210,165,.92);
  background: rgba(255,185,120,.08);
  box-shadow:
    0 0 0 1px rgba(255,185,120,.16) inset,
    0 6px 16px rgba(0,0,0,.28),
    0 0 14px rgba(255,185,120,.10);
  animation: psOfficialGlow 3.2s ease-in-out infinite;
}
html[data-theme="light"] .psBadgeOfficial{
  color: rgba(120,70,20,.86);
  border-color: rgba(150,90,30,.40);
  background: rgba(255,210,150,.28);
  box-shadow:
    0 0 0 1px rgba(150,90,30,.12) inset,
    0 8px 18px rgba(0,0,0,.10),
    0 0 10px rgba(255,185,120,.10);
}
@keyframes psOfficialGlow{
  0%,100%{ filter:saturate(1) brightness(1); }
  50%{ filter:saturate(1.12) brightness(1.06); }
}

/* Glossary 2.0 structure */
.glossarySnippet{ display:none; }
.glossaryTermTxt{ display:block; }

.glossaryDef .resourceP{
  margin:0 0 .9em;
}
.glossaryDef .resourceP:last-child{ margin-bottom:0; }

.glossaryRelated{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:var(--spacing-sm);
}
.glossaryRelatedLabel{
  font-size:var(--font-size-xs);
  letter-spacing:.10em;
  text-transform:uppercase;
  opacity:.75;
  font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace;
}
.glossaryTag{
  appearance:none;
  border:1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.06);
  color: rgba(242,242,242,.92);
  padding:6px 10px;
  border-radius:var(--border-radius-full);
  font-size:11px;
  letter-spacing:.10em;
  text-transform:uppercase;
  font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace;
  cursor:pointer;
  transition: background .15s ease, border-color .15s ease, transform .06s ease, opacity .15s ease;
  opacity:.92;
}
.glossaryTag:hover{
  background: rgba(255,255,255,.10);
  border-color: rgba(255,185,120,.35);
  opacity:1;
}
.glossaryTag:active{ transform:scale(.99); }

html[data-theme="light"] .glossaryTag{
  border-color: rgba(0,0,0,.14);
  background: rgba(0,0,0,.03);
  color: rgba(0,0,0,.82);
}
html[data-theme="light"] .glossaryTag:hover{
  background: rgba(0,0,0,.06);
  border-color: rgba(150,90,30,.35);
}

/* Flash highlight when jumping to a related term. */
details.glossaryItem.glossaryFlash{
  box-shadow:
    0 0 0 1px rgba(255,185,120,.16) inset,
    0 0 0 3px rgba(255,185,120,.10);
}

@media (min-width: 900px){
  .glossaryList{
    display:grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap:12px;
  }
  .glossarySnippet{
    display:block;
    margin-top:8px;
    font-weight:400;
    color: rgba(242,242,242,.78);
    opacity:.88;
    font-size:13px;
    line-height:1.45;
    letter-spacing:0;
    text-transform:none;
  }
  html[data-theme="light"] .glossarySnippet{
    color: rgba(0,0,0,.70);
  }
}

@media (prefers-reduced-motion: reduce){
  .psCrumbHere{ animation:none !important; }
  .psBadgeOfficial{ animation:none !important; }
  details.glossaryItem.glossaryFlash{ box-shadow: 0 0 0 1px rgba(255,185,120,.14) inset; }
  .glossaryTag{ transition:none !important; }
}

/* v1.13 — Pillole: embedded interactive guide (iframe)
   Kept isolated via iframe so external CSS in the guide can't leak into psychoSocial.
*/
.pilloleFrameWrap{
  margin: 14px 0;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(0,0,0,.25);
}
html[data-theme="light"] .pilloleFrameWrap{
  border-color: rgba(0,0,0,.12);
  background: rgba(0,0,0,.04);
}
.pilloleFrame{
  display:block;
  width:100%;
  height: min(78vh, 760px);
  min-height: 520px;
  border: 0;
  background: #000;
}

/* v1.13 — Pillole: recap + macro folds (Slide / Guida base / Approfondimenti) */
.pilloleRecap{
  margin: 14px 0 12px;
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 14px;
  background: rgba(0,0,0,.18);
}
html[data-theme="light"] .pilloleRecap{
  border-color: rgba(0,0,0,.12);
  background: rgba(0,0,0,.035);
}
.pilloleRecapTitle{
  margin: 0 0 6px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-size: var(--font-size-xs);
  opacity: .86;
}
.pilloleRecapList{
  margin: 0;
  padding-left: 18px;
}
.pilloleRecapList li{
  margin: var(--spacing-xs) 0;
  line-height: 1.45;
  opacity: .92;
}


/* Books hub: quick picker cards (visible before folds) */
.psBookPicker{
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 14px 0 18px;
}
@media (min-width: 760px){
  .psBookPicker{
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }
}

.psBookCard{
  display: block;
  padding: var(--spacing-md) var(--spacing-md) 14px;
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,0) 65%),
    var(--card);
  box-shadow: 0 0 0 1px rgba(255,255,255,.03) inset, 0 10px 24px rgba(0,0,0,.28);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}
html[data-theme="light"] .psBookCard{
  box-shadow: 0 0 0 1px rgba(0,0,0,.04) inset, 0 10px 18px rgba(0,0,0,.10);
}

.psBookCard:focus-visible{
  outline: 2px solid rgba(255,255,255,.35);
  outline-offset: 2px;
}
html[data-theme="light"] .psBookCard:focus-visible{
  outline-color: rgba(0,0,0,.35);
}

.psBookCardHead{
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-sm);
}
.psBookSigil{
  font-size: var(--font-size-xs);
  line-height: 1;
  opacity: .95;
}
.psBookCardKicker{
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}
.psBookCardTitle{
  font-size: 15px;
  font-weight: 800;
  color: var(--fg);
  margin: 0 0 6px;
  line-height: 1.22;
}
.psBookCardDesc{
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
  margin: 0 0 10px;
}
.psBookCardFoot{
  font-size: var(--font-size-xs);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: .9;
}

.psBookCard--btc{ border-left: 3px solid rgba(255,90,90,.35); }
.psBookCard--ln{ border-left: 3px solid rgba(30,200,110,.35); }

.psBookCard--btc .psBookSigil,
.psBookCard--btc .psBookCardFoot{ color: rgba(255,90,90,.90); }

.psBookCard--ln .psBookSigil,
.psBookCard--ln .psBookCardFoot{ color: rgba(30,200,110,.90); }

@media (hover:hover){
  .psBookCard:hover{
    border-color: rgba(255,255,255,.22);
    box-shadow: 0 0 0 1px rgba(255,255,255,.06) inset, 0 12px 26px rgba(0,0,0,.34);
    transform: translateY(-1px);
  }
  html[data-theme="light"] .psBookCard:hover{
    border-color: rgba(0,0,0,.20);
    box-shadow: 0 0 0 1px rgba(0,0,0,.06) inset, 0 12px 22px rgba(0,0,0,.12);
  }
}
.psFold{
  margin: 12px 0;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 14px;
  background: rgba(0,0,0,.16);
  overflow: hidden;
}
html[data-theme="light"] .psFold{
  border-color: rgba(0,0,0,.12);
  background: rgba(0,0,0,.03);
}
.psFold > summary{
  list-style: none;
  cursor: pointer;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: .02em;
}
.psFold > summary::-webkit-details-marker{ display:none; }
.psFold[open] > summary{
  border-bottom: 1px solid rgba(255,255,255,.10);
}
html[data-theme="light"] .psFold[open] > summary{
  border-bottom-color: rgba(0,0,0,.12);
}
.psFoldMark{
  display:inline-block;
  opacity: .9;
  transform: translateY(-.5px);
}
.psFoldBody{
  padding: 12px 14px;
}

/* Pillole iframe: soften seams + avoid bright/dark flashes */
.pilloleFrameWrap{
  border-radius: var(--border-radius-lg);
  background: rgba(255,255,255,.96);
}
html[data-theme="dark"] .pilloleFrameWrap{
  background: rgba(255,255,255,.92);
}
.pilloleFrame{
  background: transparent;
  height: min(78vh, 760px);
}


/* --- Guest UX: warn before Gate + parity (HOME) --- */
.psLockedLink{
  cursor:not-allowed !important;
  opacity:.92;
  pointer-events:auto !important; /* clickable only to show the warning */
}


/* v2.0 Alpha 02 — pre-click feedback for locked items (guest) */
.psLockedHit{
  position: relative;
  outline: 1px solid rgba(255,90,90,.32);
  outline-offset: 2px;
}

html[data-theme="light"] .psLockedHit{
  outline-color: rgba(255,90,90,.26);
}

.psLockedHit::after{
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  pointer-events: none;
  background: rgba(255,90,90,.10);
  opacity: 0;
  transform: scale(.985);
  animation: psLockedHitFlash .32s ease-out;
}

html[data-theme="light"] .psLockedHit::after{
  background: rgba(255,90,90,.08);
}

@keyframes psLockedHitFlash{
  0%{ opacity: 0; transform: scale(.985); }
  35%{ opacity: 1; transform: scale(1); }
  100%{ opacity: 0; transform: scale(1.01); }
}

@media (prefers-reduced-motion: reduce){
  .psLockedHit::after{ animation: none; opacity: .18; transform: none; }
}

html.psGuestModalOpen, html.psGuestModalOpen body{ overflow:hidden; }

.psGuestPrompt{
  position:fixed;
  inset:0;
  z-index:var(--z-guest-prompt);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px;
  background:rgba(0,0,0,.55);
  backdrop-filter:blur(6px);
  overscroll-behavior: contain;
}
html[data-theme="light"] .psGuestPrompt{ background:rgba(0,0,0,.35); }

.psGuestPromptCard{
  width:min(520px,92vw);
  border-radius:var(--border-radius-lg);
  background:var(--cardBg, rgba(0,0,0,.92));
  border:1px solid var(--cardBorder, rgba(255,255,255,.10));
  overflow:hidden;
  box-shadow:0 18px 70px rgba(0,0,0,.60);
  color:rgba(255,255,255,.92);
}
html[data-theme="light"] .psGuestPromptCard{
  background:rgba(255,255,255,.92);
  border-color:rgba(0,0,0,.12);
  color:rgba(0,0,0,.86);
  box-shadow:0 18px 70px rgba(0,0,0,.22);
}

.psGuestPromptTop{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:12px 14px;
}
.psGuestPromptTitle{
  font-weight:700;
  letter-spacing:.08em;
  text-transform:uppercase;
  font-size:var(--font-size-xs);
  opacity:.92;
}
.psGuestPromptClose{
  background:transparent;
  border:1px solid var(--cardBorder, rgba(255,255,255,.12));
  border-radius:12px;
  padding:6px 10px;
  cursor:pointer;
}

html[data-theme="light"] .psGuestPromptClose{ border-color:rgba(0,0,0,.12); }
html[data-theme="light"] .psGuestPromptTitle{ color:rgba(0,0,0,.86); opacity:.88; }
.psGuestPromptBody{
  padding:0 14px 14px;
  font-size:13px;
  line-height:1.45;
  opacity:.92;
}
.psGuestPromptActions{
  display:flex;
  gap:10px;
  padding:12px 14px 14px;
  justify-content:flex-end;
}
.psGuestPromptBtn{
  display:inline-flex;
  align-items:center;
  gap:var(--spacing-sm);
  padding:10px 12px;
  border-radius:12px;
  border:1px solid var(--cardBorder, rgba(255,255,255,.12));
  background:rgba(255,255,255,.04);
  color:inherit;
  text-decoration:none;
  cursor:pointer;
}
html[data-theme="light"] .psGuestPromptBtn{ background:rgba(0,0,0,.03); border-color:rgba(0,0,0,.12); color:rgba(0,0,0,.86); }

.psGuestBlocked{
  cursor:not-allowed !important;
  opacity:.75;
  filter:saturate(.80);
}

.guestNotice{
  width:100%;
  margin:10px 0 6px;
}
.guestNoticeRow{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.04);
  box-shadow:0 10px 22px rgba(0,0,0,.50);
}
html[data-theme="light"] .guestNoticeRow{
  border-color:rgba(0,0,0,.10);
  background:rgba(0,0,0,.02);
  box-shadow:0 10px 22px rgba(0,0,0,.18);
}

.guestTitle{
  background:transparent;
  border:0;
  padding:0;
  margin:0;
  color:inherit;
  font-weight:700;
  letter-spacing:.14em;
  text-transform:uppercase;
  font-size:var(--font-size-xs);
  opacity:.92;
  cursor:pointer;
}

.guestGateBtn{
  display:inline-flex;
  align-items:center;
  gap:var(--spacing-sm);
  padding:var(--spacing-sm) 10px;
  border-radius:var(--border-radius-full);
  border:1px solid rgba(255,255,255,.14);
  background:rgba(0,0,0,.22);
  text-decoration:none;
  color:inherit;
  white-space:nowrap;
}
html[data-theme="light"] .guestGateBtn{
  border-color:rgba(0,0,0,.12);
  background:rgba(0,0,0,.03);
}

.guestDetails{
  margin-top:var(--spacing-sm);
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(0,0,0,.18);
  font-size:13px;
  line-height:1.45;
  opacity:.90;
}
html[data-theme="light"] .guestDetails{
  border-color:rgba(0,0,0,.10);
  background:rgba(0,0,0,.02);
}

/* --- guestupd-theme: light/dark parity (specular depth, color-only differences) --- */
html[data-theme="light"] .pageTag:active,
html[data-theme="light"] #menuBtn:active{
  border-color: rgba(0,0,0,.22);
}

html[data-theme="light"] .pageTag.blogTag:hover{
  box-shadow: 0 0 12px rgba(0,0,0,.08), 0 0 12px rgba(60,255,140,.22), inset 0 0 10px rgba(60,255,140,.06);
  text-shadow: none;
  transform: translateY(-1px);
}

html[data-theme="light"] .pageTag.resourcesTag:hover{
  box-shadow: 0 0 12px rgba(0,0,0,.08), 0 0 12px rgba(255,90,90,.20), inset 0 0 10px rgba(255,90,90,.05);
  text-shadow: none;
  transform: translateY(-1px);
}


/* Resources: spacing polish */
body[data-page="resources"] .articleMeta{ margin:10px 0 16px; }

/* Resource page: references styling */
.resourceRefsList{
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.resourceRefsList li{
  margin: 0;
  padding: 0;
}

.resourceRefsList a{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.035);
  color: var(--text);
  text-decoration: none;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}

.resourceRefsList a:visited{
  color: var(--text);
}

.resourceRefsList a:hover{
  background: rgba(255,255,255,0.055);
  border-color: rgba(255,255,255,0.18);
  transform: translateY(-1px);
}

.resourceRefsList a:active{
  transform: translateY(0px);
}

.resourceRefsList a::after{
  content: "↗";
  font-size: var(--font-size-xs);
  opacity: .7;
}

@media (max-width: 420px){
  .resourceRefsList a{
    padding: 10px 10px;
    border-radius: 12px;
  }
}


/* Home: Resources quick nav */
.homeResNav{
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
  margin-top: 10px;
}

.homeResNavBtn{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  width: var(--homeResNavW, auto);
  border-radius: var(--border-radius-full);
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.03);
  color: var(--text);
  text-decoration: none;
  font-size: var(--font-size-xs);
  line-height: 1;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.homeResNavBtn:hover{
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.18);
}

.homeResNavCount{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--border-radius-full);
  font-size: 11px;
  letter-spacing: 0;
  color: var(--text);
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.08);
}

@media (max-width: 420px){
  .homeResNavBtn{
    padding: 7px 9px;
    font-size: 11px;
  }
}



/* Home: Resources quick nav — Light theme parity (keep dark as reference) */
:root[data-theme="light"] .homeResNavBtn{
  border: 1px solid rgba(0,0,0,0.10);
  background: rgba(0,0,0,0.03);
  color: var(--text);
}
:root[data-theme="light"] .homeResNavBtn:hover{
  background: rgba(0,0,0,0.05);
  border-color: rgba(0,0,0,0.18);
}
:root[data-theme="light"] .homeResNavCount{
  background: rgba(0,0,0,0.04);
  border: 1px solid rgba(0,0,0,0.10);
  color: var(--text);
}

/* Blog Highlights nav parity */
.homeResNavBtn--open .homeResNavCount{ font-size: var(--font-size-xs); opacity:.9; }



/* v0.2 — Design System optional classes (safe: not wired by default)
   Goal: enable progressive migration without touching existing DOM contracts.
*/

/* Identity utilities (v0.2)
   - Use these ONLY where intended to avoid global regressions.
   - These are opt-in classes: no impact unless you add the class in markup.
*/

/* Diamond list: replaces bullets with ⋄ */
.ps-diamond-list{ list-style:none; padding-left:0; margin-left:0; }
.ps-diamond-list > li{ position:relative; padding-left:1.1em; }
.ps-diamond-list > li:before{
  content:"⋄";
  position:absolute; left:0;
  opacity:.9;
  color:var(--color-accent-primary, var(--accent));
  font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace;
}

/* Breadcrumb container: children separated by ⋄ (supports links/spans) */
.ps-crumbs{ display:flex; flex-wrap:wrap; gap:.35rem; align-items:baseline; }
.ps-crumbs > * + *:before{
  content:"⋄";
  margin-right:.35rem;
  opacity:.55;
  color:var(--color-text-tertiary, var(--muted, #777));
}

/* Breadcrumb links should be quiet (avoid default browser blue/purple). */
.ps-crumbs a,
.ps-crumbs a:visited{
  color: var(--color-text-secondary, rgba(255,255,255,.72));
  text-decoration: none;
}
.ps-crumbs a:hover{
  color: var(--color-text-primary, var(--fg));
  text-decoration: underline;
  text-underline-offset: .18em;
}
.ps-crumbs a:focus-visible{
  outline: 2px solid var(--color-accent-primary, var(--accent));
  outline-offset: 2px;
  border-radius: 6px;
}

/* Signature: small brand mark prefix */
.ps-signature{ display:inline-flex; gap:.35rem; align-items:baseline; }
.ps-signature:before{
  content:"⋄";
  opacity:.9;
  color:var(--color-accent-primary, var(--accent));
  font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace;
}


.section-title:not(.pageTag){
  font-size: var(--font-size-lg, 20px);
  font-weight: var(--font-weight-bold, 700);
  line-height: var(--line-height-tight, 1.2);
  letter-spacing: var(--letter-spacing-wide, .05em);
  text-transform: uppercase;
  color: var(--color-text-primary, var(--fg));
  margin: 0;
  padding: var(--spacing-md, 16px) var(--spacing-lg, 24px);
  box-shadow: inset 0 -1px 0 var(--color-border-primary, rgba(255,255,255,.12));
}
.section-title.blog-section{ color: var(--color-accent-blog, var(--accentGreen)); }
.section-title.resources-section{ color: var(--color-accent-resources, var(--accent)); }
.section-title.dashboard-section{ color: var(--color-accent-dashboard, #94a3b8); }

.entry-card:not(.post),
.resource-card:not(.post){
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md, 16px);
  padding: var(--spacing-lg, 24px);
  border-radius: var(--border-radius-lg, var(--radius));
  border: var(--border-width-thin, 1px) solid var(--color-border-primary, rgba(255,255,255,.14));
  background: var(--color-bg-secondary, rgba(0,0,0,.22));
  color: var(--color-text-primary, var(--fg));
  text-decoration: none;
  box-shadow: 0 0 0 1px rgba(255,255,255,.06) inset;
  will-change: transform;
  transition:
    background var(--transition-fast, 150ms ease),
    border-color var(--transition-fast, 150ms ease),
    box-shadow var(--transition-fast, 150ms ease),
    transform .10s ease;
}
.entry-card:not(.post):hover,
.resource-card:not(.post):hover{
  background: var(--color-bg-tertiary, rgba(255,255,255,.08));
  border-color: var(--color-border-secondary, rgba(255,255,255,.22));

  box-shadow: var(--shadow-md, 0 6px 16px rgba(0,0,0,.22)), 0 0 0 1px rgba(255,255,255,.10) inset;
  transform: translateY(-1px);
}
.entry-card:not(.post):active,
.resource-card:not(.post):active{ transform: translateY(0) scale(.995); }

html[data-theme="light"] .entry-card:not(.post),
html[data-theme="light"] .resource-card:not(.post){
  box-shadow: 0 0 0 1px rgba(0,0,0,.06) inset;
}
html[data-theme="light"] .entry-card:not(.post):hover,
html[data-theme="light"] .resource-card:not(.post):hover{
  box-shadow: var(--shadow-md, 0 6px 16px rgba(0,0,0,.22)), 0 0 0 1px rgba(0,0,0,.10) inset;
}

.entry-card:not(.post):focus-visible,
.resource-card:not(.post):focus-visible{
  outline: 2px solid var(--color-accent-primary, var(--accent));
  outline-offset: 2px;
}


.entry-card .title,
.resource-card .title{
  margin: 0;
  font-size: var(--font-size-lg, 20px);
  font-weight: var(--font-weight-bold, 700);
  line-height: var(--line-height-normal, 1.4);
  color: var(--color-text-primary, var(--fg));
}
.entry-card .description,
.resource-card .description{
  margin: 0;
  font-size: var(--font-size-base, 16px);
  line-height: var(--line-height-relaxed, 1.6);
  color: var(--color-text-secondary, var(--muted));
}
.entry-card .metadata,
.resource-card .metadata{
  margin: 0;
  font-size: var(--font-size-sm, 14px);
  line-height: var(--line-height-normal, 1.4);
  color: var(--color-text-tertiary, rgba(242,242,242,.60));
}

.menu-item:not(.drawerLink){
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  height: 48px;
  width: 100%;
  padding: 0 var(--spacing-lg, 24px);
  margin: var(--spacing-sm, 8px) 0;
  border-radius: var(--border-radius-md, 8px);
  border: var(--border-width-thin, 1px) solid var(--color-border-primary, rgba(255,255,255,.14));
  background: transparent;
  color: var(--color-text-primary, var(--fg));
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 0 0 1px rgba(255,255,255,.06) inset;
  transition: background var(--transition-fast, 150ms ease), border-color var(--transition-fast, 150ms ease);
}
.menu-item:not(.drawerLink):hover{
  background: var(--color-bg-tertiary, rgba(255,255,255,.08));
  border-color: var(--color-border-secondary, rgba(255,255,255,.22));
}

.menu-item:not(.drawerLink):focus-visible{
  outline: 2px solid var(--color-accent-primary, var(--accent));
  outline-offset: 2px;
  background: var(--color-bg-tertiary, rgba(255,255,255,.08));
}

.menu-item:not(.drawerLink).active,
.menu-item:not(.drawerLink)[aria-current="page"]{
  border-left: var(--border-width-base, 2px) solid var(--color-accent-primary, var(--accent));
  padding-left: calc(var(--spacing-lg, 24px) - 2px);
}
.menu-item.isCurrent{
  font-weight: 700;
}
.menu-item.isCurrent .drawerMark{
  color: var(--color-accent-primary, var(--accent));
  opacity: 1;
}

@media (prefers-reduced-motion: reduce){
  .entry-card:not(.post),
  .resource-card:not(.post),
  .menu-item:not(.drawerLink){
    transition: none !important;
  }
  .entry-card:not(.post):hover,
  .resource-card:not(.post):hover,
  .entry-card:not(.post):active,
  .resource-card:not(.post):active{
    transform: none !important;
  }
}

.input-field,
input,
select,
textarea{
  background: var(--color-bg-tertiary, rgba(255,255,255,.08));
  color: var(--color-text-primary, var(--fg));
  border: var(--border-width-thin, 1px) solid var(--color-border-primary, rgba(255,255,255,.14));
  border-radius: var(--border-radius-md, 8px);
  padding: var(--spacing-md, 16px);
  font-family: var(--font-family-primary, system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif);
  font-size: var(--font-size-base, 16px);
  transition: border-color var(--transition-fast, 150ms ease);
}
input:focus,
select:focus,
textarea:focus{
  outline: 2px solid var(--color-accent-primary, var(--accent));
  outline-offset: 2px;
}
input::placeholder{ color: var(--color-text-tertiary, rgba(242,242,242,.60)); }


/* ──────────────────────────────────────────────────────────────
   v0.5 — Landing pages (Blog + Resources)
   Guardrail: ONLY new classes; no global overrides.
   Goal: mobile-first, low-click navigation, safe hover/focus.
────────────────────────────────────────────────────────────── */

.blogLandingView,
.resourcesLandingView{
  padding-top: 6px;
}

/* HERO blocks */
.blogHero,
.resourcesHero{
  border-radius: var(--border-radius-lg, 18px);
  border: 1px solid var(--color-border-primary, rgba(255,255,255,.14));
  background: var(--color-bg-tertiary, rgba(255,255,255,.08));
  padding: var(--spacing-lg, 24px);
  box-shadow: var(--shadow-sm, 0 1px 2px rgba(0,0,0,.12));
}
.blogLandingView .blogHero{
  /* Manifesto treatment: premium rim + soft gradient fill (Blog accent). */
  border: 1px solid transparent;
  background:
    radial-gradient(
      120% 120% at 18% 0%,
      rgb(from var(--accentGreenReadable) r g b / .18),
      transparent 62%
    ) padding-box,
    linear-gradient(
      180deg,
      rgba(255,255,255,.10),
      rgba(255,255,255,.06) 45%,
      rgba(0,0,0,.20)
    ) padding-box,
    linear-gradient(
      135deg,
      rgb(from var(--accentGreen) r g b / .55),
      rgb(from var(--accentGreenReadable) r g b / .10) 38%,
      rgba(255,255,255,.10) 62%,
      rgb(from var(--accentGreenReadable) r g b / .28)
    ) border-box;
  box-shadow:
    0 12px 32px rgba(0,0,0,.42),
    0 0 0 1px rgba(255,255,255,.06) inset,
    0 0 26px rgb(from var(--accentGreenReadable) r g b / .10);
}
html[data-theme="light"] .blogLandingView .blogHero{
  background:
    radial-gradient(
      120% 120% at 18% 0%,
      rgb(from var(--accentGreenReadable) r g b / .10),
      transparent 62%
    ) padding-box,
    linear-gradient(
      180deg,
      rgba(255,255,255,.86),
      rgba(255,255,255,.74) 55%,
      rgba(0,0,0,.03)
    ) padding-box,
    linear-gradient(
      135deg,
      rgb(from var(--accentGreenReadable) r g b / .34),
      rgba(0,0,0,.06) 48%,
      rgb(from var(--accentGreenReadable) r g b / .18)
    ) border-box;
  box-shadow:
    0 14px 34px rgba(0,0,0,.14),
    0 0 0 1px rgba(0,0,0,.06) inset;
}
.blogHeroTitle{
  display:flex;
  align-items:baseline;
  gap:10px;
  font-size: var(--font-size-3xl, 32px);
  letter-spacing: var(--letter-spacing-tight, -0.01em);
  font-weight: var(--font-weight-semibold, 600);
}
.blogHeroSub{
  margin-top: 6px;
  font-size: var(--font-size-md, 18px);
  color: var(--color-text-secondary, rgba(242,242,242,.7));
}
.blogHeroLead,
.resourcesHeroLead{
  margin-top: 12px;
  font-size: var(--font-size-base, 16px);
  color: var(--color-text-secondary, rgba(242,242,242,.7));
  line-height: var(--line-height-relaxed, 1.6);
}
.resourcesHeroTitle{
  font-size: var(--font-size-2xl, 28px);
  font-weight: var(--font-weight-semibold, 600);
  letter-spacing: var(--letter-spacing-tight, -0.01em);
}
.resourcesHeroCtas{
  margin-top: 14px;
  display:flex;
  justify-content:flex-start;
  gap:10px;
  flex-wrap:wrap;
}

/* Locked block (Blog guest view) */
.lockedInline{
  margin-top: 14px;
  border-radius: var(--border-radius-lg, 18px);
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,70,70,.10);
  padding: var(--spacing-md, 16px);
}
html[data-theme="light"] .lockedInline{
  border-color: rgba(0,0,0,.14);
  background: rgba(239,68,68,.10);
}
.lockedInlineTitle{
  font-weight: var(--font-weight-semibold, 600);
  letter-spacing: var(--letter-spacing-tight, -0.01em);
}
.lockedInlineBody{
  margin-top: 6px;
  color: var(--color-text-secondary, rgba(242,242,242,.7));
}
.lockedInline .btnSecondary{
  margin-top: 12px;
  display:inline-flex;
}

/* Blog landing blocks */
.blogLandingBlock,
.resourcesLandingBlock{
  margin-top: var(--spacing-lg, 24px);
}
/* PATCH v2: Blog landing simplification (no hero, no featured block). */
.blogLandingView #blogLandingContent > .blogLandingBlock:first-child{
  margin-top: var(--spacing-sm, 8px);
}
.blogBlockTitle,
.resourcesBlockTitle{
  margin-bottom: 10px;
  font-size: var(--font-size-lg, 20px);
  font-weight: var(--font-weight-medium, 500);
  color: var(--color-text-primary, var(--fg));
}
.sigil{ color: var(--color-accent-primary, var(--accent)); }
.blogLandingView .blogHeroTitle .sigil,
.blogLandingView .blogBlockTitle .sigil{
  color: var(--accentGreenReadable);
}
.blogLandingView .blogHeroTitle .blogHeroWord{ letter-spacing: 0.06em; }
.blogHeroWord{ letter-spacing: var(--letter-spacing-wider, 0.1em); }

.blogFeatureCard{
  border-radius: var(--border-radius-lg, 18px);
  border: 1px solid var(--color-border-primary, rgba(255,255,255,.14));
  background: rgba(255,255,255,.06);
  padding: var(--spacing-md, 16px);
}
html[data-theme="light"] .blogFeatureCard{
  background: rgba(0,0,0,.03);
}
.blogKicker{
  font-size: var(--font-size-xs, 12px);
  letter-spacing: var(--letter-spacing-wider, 0.1em);
  color: var(--color-text-tertiary, rgba(242,242,242,.6));
  text-transform: uppercase;
}
.blogFeatureTitle{
  margin-top: 6px;
  font-size: var(--font-size-xl, 24px);
  font-weight: var(--font-weight-semibold, 600);
}
.blogFeatureMeta{
  margin-top: 4px;
  font-size: var(--font-size-sm, 14px);
  color: var(--color-text-tertiary, rgba(242,242,242,.6));
}
.blogFeatureExcerpt{
  margin-top: 10px;
  color: var(--color-text-secondary, rgba(242,242,242,.7));
}
.blogFeatureActions{
  margin-top: 12px;
  display:flex;
  justify-content:flex-end;
}

.moodGrid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.moodCard{
  display:flex;
  flex-direction:column;
  gap: var(--spacing-sm);
  padding: 14px;
  border-radius: var(--border-radius-lg, 18px);
  border: 1px solid var(--color-border-primary, rgba(255,255,255,.14));
  background: rgba(255,255,255,.05);
  text-decoration:none;
  color: var(--color-text-primary, var(--fg));
  transition: transform var(--transition-fast, 150ms ease), border-color var(--transition-fast, 150ms ease), background var(--transition-fast, 150ms ease);
}
.moodCard:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,.07);
  border-color: var(--color-border-secondary, rgba(255,255,255,.22));
}
.moodCard:focus-visible{
  outline: 2px solid var(--color-accent-primary, var(--accent));
  outline-offset: 2px;
}
.moodTitle{ font-weight: var(--font-weight-semibold, 600); }
.moodDesc{ color: var(--color-text-secondary, rgba(242,242,242,.7)); font-size: var(--font-size-sm, 14px); }
.moodCount{ color: var(--color-text-tertiary, rgba(242,242,242,.6)); font-size: var(--font-size-sm, 14px); }

.blogRecentList{ display:flex; flex-direction:column; gap: 10px; }
.blogRecentRow{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--border-radius-md, 8px);
  border: 1px solid var(--color-border-primary, rgba(255,255,255,.14));
  background: rgba(255,255,255,.04);
  text-decoration:none;
  color: var(--color-text-primary, var(--fg));
  transition: background var(--transition-fast, 150ms ease), border-color var(--transition-fast, 150ms ease);
}
.blogRecentRow:hover{ background: rgba(255,255,255,.06); border-color: var(--color-border-secondary, rgba(255,255,255,.22)); }
.blogRecentRow:focus-visible{ outline: 2px solid var(--color-accent-primary, var(--accent)); outline-offset: 2px; }
.blogRecentLeft{ display:flex; align-items:center; gap: 10px; min-width:0; }
.blogRecentTitle{ white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.blogRecentRight{ font-size: var(--font-size-sm, 14px); color: var(--color-text-tertiary, rgba(242,242,242,.6)); white-space:nowrap; }
.blogMoodDot{ width:10px; height:10px; border-radius:var(--border-radius-full); flex:0 0 auto; background: var(--color-text-tertiary, rgba(242,242,242,.6)); }
.blogMoodDot.mood-audio{ background: rgba(147,197,253,.95); }
.blogMoodDot.mood-bitcoin{ background: rgba(247,147,38,.95); }
.blogMoodDot.mood-personal{ background: rgba(34,197,94,.95); }

/* Resources landing */
.resourcesCardGrid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.resourcesTopicChips{
  display:flex;
  flex-wrap:wrap;
  gap: 10px;
}
.topicChip{
  display:inline-flex;
  align-items:center;
  padding: 10px 12px;
  border-radius: var(--border-radius-full);
  border: 1px solid var(--color-border-primary, rgba(255,255,255,.14));
  background: rgba(255,255,255,.05);
  color: var(--color-text-primary, var(--fg));
  text-decoration:none;
  font-size: var(--font-size-sm, 14px);
  transition: background var(--transition-fast, 150ms ease), border-color var(--transition-fast, 150ms ease);
}
.topicChip:hover{ background: rgba(255,255,255,.07); border-color: var(--color-border-secondary, rgba(255,255,255,.22)); }
.topicChip:focus-visible{ outline: 2px solid var(--color-accent-primary, var(--accent)); outline-offset: 2px; }

@media (max-width: 720px){
  .moodGrid{ grid-template-columns: 1fr; }
  .resourcesCardGrid{ grid-template-columns: 1fr; }

  /* Mobile harmony: keep blog second row stylistically aligned with other top-level pages. */
  .blogLandingView .blogHero{
    padding: 10px 12px;
    border-radius: 12px;
    border-color: rgba(255,255,255,.16);
    background:
      radial-gradient(120% 120% at 12% 0%, rgba(247,147,26,.10), transparent 62%),
      linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.03));
    box-shadow: 0 0 0 1px rgba(255,255,255,.07) inset;
  }
  .blogHeroTitle{
    font-size: 16px;
    letter-spacing: .08em;
    text-transform: uppercase;
    gap: 6px;
    font-weight: 800;
  }
  .blogHeroSub{ margin-top: 2px; font-size: 13px; opacity: .88; }
  .blogHeroWord{ letter-spacing: .06em; }
  .blogLandingView .blogHeroTitle .sigil{ font-size: 14px; }

  /* Mobile usability: keep "Leggi" CTA right-aligned and easy to tap. */
  .blogFeatureCard{
    padding: 14px;
    border-radius: 14px;
  }
  .blogFeatureTitle{
    font-size: 18px;
    line-height: 1.28;
  }
  .blogFeatureActions{
    justify-content: flex-end;
    margin-top: 10px;
    padding-inline-end: 2px;
  }
  .blogFeatureActions .btnPrimary{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    min-width: 86px;
    padding: 8px 14px;
    border-radius: 12px;
    line-height: 1.2;
  }
}

@media (prefers-reduced-motion: reduce){
  .moodCard,
  .blogRecentRow,
  .topicChip{ transition: none !important; }
  .moodCard:hover{ transform:none !important; }
}


/* v0.8 — Buttons + Locked placeholders
   WHY: prevent raw blue links on WIP pages and keep CTAs consistent with the shell.
*/
.btnPrimary{
  background: rgba(60,255,140,.14);
  border-color: rgba(60,255,140,.28);
}
.btnPrimary:hover{ background: rgba(60,255,140,.20); }

.btnSecondary{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.18);
  color: var(--fg);
  text-decoration: none;
}
.btnSecondary:hover{ background: rgba(255,255,255,.10); }
.btnSecondary:focus-visible{
  outline: 2px solid var(--accentGreenReadable);
  outline-offset: 2px;
  text-decoration: none;
}

.blogLandingCta{
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: var(--border-radius-full);
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.08);
  font-size: var(--font-size-xs);
  letter-spacing: .08em;
  font-weight: 700;
  text-transform: uppercase;
}
.blogLandingCta::before{
  content: "⋄";
  display: inline-block;
  opacity: .86;
}
.blogLandingCta:hover{
  border-color: rgba(255,255,255,.30);
  background: rgba(255,255,255,.13);
}
html[data-theme="light"] .blogLandingCta{
  border-color: rgba(0,0,0,.16);
  background: rgba(0,0,0,.04);
  color: rgba(25,25,25,.88);
}
html[data-theme="light"] .blogLandingCta:hover{
  border-color: rgba(0,0,0,.24);
  background: rgba(0,0,0,.07);
}

/* Prose links (resource detail + content blocks) */
.resourceContent a,
.content a{
  color: var(--accentGreenReadable);
  text-decoration: none;
  border-bottom: 1px solid rgba(60,255,140,.22);
}
.resourceContent a:hover,
.content a:hover{
  border-bottom-color: rgba(60,255,140,.46);
}
.resourceContent a:focus-visible,
.content a:focus-visible{
  outline: 2px solid rgba(60,255,140,.45);
  outline-offset: 2px;
  border-bottom-color: transparent;
}

.lockedCard{ padding:var(--spacing-md); }
.lockedHead{ display:flex; align-items:center; gap:10px; margin-bottom:var(--spacing-sm); }
.lockedDot{ display:inline-flex; width:22px; height:22px; align-items:center; justify-content:center; border-radius:10px; border:1px solid rgba(255,255,255,.16); background:rgba(255,255,255,.06); }
.lockedPill{ margin-left:auto; font-size:11px; letter-spacing:.12em; opacity:.75; padding:var(--spacing-xs) var(--spacing-sm); border-radius:var(--border-radius-full); border:1px solid rgba(255,255,255,.14); background:rgba(255,255,255,.05); }
.btnRow{ display:flex; gap:10px; flex-wrap:wrap; margin-top:10px; }

/* v0.10 — Guest markers: lock icon where navigation is locked (Blog only). */
.psLockedLink::after{ content:" ⋄"; opacity:.85; }
html.psGuest #homeBlogToggle .homeAccLabel::after{ content:" ⋄"; opacity:.85; }
/* Gate keypad (touch) */
body.psGate .psKeypad{
  width:min(320px, 100%);
  margin:4px auto 0;
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:var(--spacing-sm);
  justify-items:stretch;
}
body.psGate .psKeypadBtn{
  min-height:44px;
  border-radius:12px;
  border:1px solid var(--border);
  background:var(--card);
  color:var(--fg);
  font-size:15px;
  letter-spacing:.08em;
  font-weight:700;
  text-transform:uppercase;
  cursor:pointer;
  touch-action:manipulation;
  transition:transform .05s ease, background .15s ease, border-color .15s ease;
}
body.psGate .psKeypadBtn:active{
  transform:translateY(1px);
}
body.psGate .psKeypadBtn:focus-visible{
  outline:2px solid var(--accentGreenReadable);
  outline-offset:2px;
}
body.psGate .psKeypadBtn.is-correct{
  border-color:var(--accentGreenReadable);
  background:rgba(40,180,120,.12);
  box-shadow:0 0 0 2px rgba(40,180,120,.18);
  animation:psKeyOk 220ms ease;
}
body.psGate .psKeypadBtn.is-wrong{
  border-color:var(--accent);
  background:rgba(255,80,80,.12);
  box-shadow:0 0 0 2px rgba(255,80,80,.20);
  animation:psKeyBad 220ms ease;
}
@keyframes psKeyOk{
  0%{ transform:translateY(0); }
  50%{ transform:translateY(-1px); }
  100%{ transform:translateY(0); }
}
@keyframes psKeyBad{
  0%{ transform:translateX(0); }
  25%{ transform:translateX(-2px); }
  50%{ transform:translateX(2px); }
  75%{ transform:translateX(-1px); }
  100%{ transform:translateX(0); }
}
@media (prefers-reduced-motion: reduce){
  body.psGate .psKeypadBtn.is-correct,
  body.psGate .psKeypadBtn.is-wrong{
    animation:none;
    transform:none;
  }
}
body.psGate .psKeypadOk{
  grid-column:1 / -1;
  border-color:var(--accentGreenReadable);
}

@media (max-width: 720px){
  body.index-gate main.wrap.narrow{
    min-height: auto;
    padding-bottom: 0;
  }
  body.index-gate .metaRow{
    margin-top: 6px;
    padding-bottom: 0;
    min-height: 0;
    gap: 6px;
  }
  body.index-gate #helpInlineBtn.isHidden{
    display: none;
  }
  body.index-gate .siteCopyright{
    margin-top: 10px;
    padding-top: 0;
  }
}

/* Home dash links -> card buttons */
body[data-page="home"] .psDashNavBtn{
  position:relative;
  display:flex;
  align-items:center;
  gap:10px;
  padding:14px 16px;
  border-radius:16px;
  border:1px solid var(--border);
  background:var(--card);
  color:var(--fg);
  text-decoration:none;
  font-weight:650;
  letter-spacing:.06em;
  text-transform:uppercase;
  font-size:var(--font-size-xs);
  line-height:1.1;
  box-shadow:0 10px 22px rgba(0,0,0,.26);
}
html[data-theme="light"] body[data-page="home"] .psDashNavBtn{
  box-shadow:0 10px 22px rgba(0,0,0,.12);
}
body[data-page="home"] .psDashNavBtn::before{
  content:"⋄";
  color:var(--psdash-accent, var(--accentGreenReadable));
  font-size:13px;
  opacity:.9;
  flex:0 0 auto;
}
body[data-page="home"] .psDashNavBtn .homeDashTileMark{
  display:none;
}
body[data-page="home"] .psDashNavBtn[data-psdash="stats"]{ --psdash-accent: var(--accentGreenReadable); }
body[data-page="home"] .psDashNavBtn[data-psdash="nostr"]{ --psdash-accent: var(--accent); }
body[data-page="home"] .psDashNavBtn[data-psdash="rss"]{ --psdash-accent: var(--color-accent-dashboard); }
body[data-page="home"] .psDashNavBtn:focus-visible{
  outline:2px solid rgba(60,255,140,.45);
  outline-offset:2px;
}
@media (prefers-reduced-motion: no-preference){
  body[data-page="home"] .psDashNavBtn{
    transition:transform .12s ease, box-shadow .18s ease, border-color .18s ease;
  }
body[data-page="home"] .psDashNavBtn:hover{
    transform:translateY(-2px);
    box-shadow:0 14px 28px rgba(0,0,0,.32);
  }
  html[data-theme="light"] body[data-page="home"] .psDashNavBtn:hover{
    box-shadow:0 14px 28px rgba(0,0,0,.18);
  }
}

/* Topbar mask button */
.psMaskBtn{
  position:relative;
  overflow:visible;
}
.psMaskImg{
  width:20px;
  height:20px;
  border-radius:6px;
  display:block;
  object-fit:cover;
  filter:contrast(1.05);
}
.psMaskLabel{
  position:absolute;
  left:50%;
  top:-10px;
  transform:translate(-50%, -8px);
  opacity:0;
  pointer-events:none;
  font-size:10px;
  letter-spacing:.42em;
  padding:3px 6px;
  border-radius:8px;
  border:1px solid var(--border);
  background:var(--card);
  color:var(--fg);
  text-transform:uppercase;
  white-space:nowrap;
}
@media (hover: hover) and (pointer: fine){
  .psMaskBtn:hover .psMaskLabel{
    opacity:1;
    transform:translate(-50%, -12px);
  }
}
@media (hover: none), (pointer: coarse){
  .psMaskLabel{
    display:none;
  }
}

/* Home guest badge */
body[data-page="home"] .psShellBrandRow{ position:relative; }
body[data-page="home"] .psGuestBadge{
  position:absolute;
  right:10px;
  top:4px;
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:var(--spacing-xs) var(--spacing-sm);
  border-radius:var(--border-radius-full);
  border:1px solid rgba(255,255,255,.16);
  background:rgba(0,0,0,.45);
  color:var(--fg);
  font-size:11px;
  letter-spacing:.08em;
  text-transform:uppercase;
  box-shadow:0 8px 18px rgba(0,0,0,.35);
}
html[data-theme="light"] body[data-page="home"] .psGuestBadge{
  border-color:rgba(0,0,0,.14);
  background:rgba(0,0,0,.06);
  color:rgba(0,0,0,.72);
  box-shadow:0 8px 18px rgba(0,0,0,.14);
}
body[data-page="home"] .psGuestBadgeLabel{ opacity:.78; }
body[data-page="home"] .psGuestBadgeLink{
  text-decoration:none;
  font-weight:650;
  letter-spacing:.06em;
  color:inherit;
}
body[data-page="home"] .psGuestBadgeLink:focus-visible{
  outline:2px solid rgba(60,255,140,.45);
  outline-offset:2px;
  border-radius:10px;
}
@media (max-width: 420px){
  body[data-page="home"] .psGuestBadge{ right:8px; top:2px; font-size:10px; }
}

/* Gate: guest button alignment */
body.psGate .psGateGuestBtn{
  width:100%;
  min-height:56px;
  height:56px;
  justify-content:center;
}

/* v2.0 Beta 12 — Markets polish pack (bitcoin preset)
   Applies globally when Bitcoin preset is active.
*/
html[data-ps-preset="bitcoin"]{
  /* make numbers align naturally across the UI */
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
}

/* Numeric emphasis (best-effort selectors, no markup changes required) */
html[data-ps-preset="bitcoin"] .price,
html[data-ps-preset="bitcoin"] .value,
html[data-ps-preset="bitcoin"] .metric,
html[data-ps-preset="bitcoin"] .stat,
html[data-ps-preset="bitcoin"] .statValue,
html[data-ps-preset="bitcoin"] .stat-value,
html[data-ps-preset="bitcoin"] [class*="num"],
html[data-ps-preset="bitcoin"] [class*="Num"],
html[data-ps-preset="bitcoin"] [class*="price"],
html[data-ps-preset="bitcoin"] [class*="Price"],
html[data-ps-preset="bitcoin"] [class*="metric"],
html[data-ps-preset="bitcoin"] [class*="Metric"]{
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
}

/* Use mono only where it helps (metrics, prices, codes) */
html[data-ps-preset="bitcoin"] .price,
html[data-ps-preset="bitcoin"] .value,
html[data-ps-preset="bitcoin"] .metric,
html[data-ps-preset="bitcoin"] [class*="num"],
html[data-ps-preset="bitcoin"] [class*="price"],
html[data-ps-preset="bitcoin"] [class*="metric"]{
  font-family: var(--font-mono);
  color: var(--num-fg);
}

/* Cards & panels: consistent borders/shadows in Markets */
html[data-ps-preset="bitcoin"] .entry-card,
html[data-ps-preset="bitcoin"] .resource-card,
html[data-ps-preset="bitcoin"] .dashPanel,
html[data-ps-preset="bitcoin"] .dashCard,
html[data-ps-preset="bitcoin"] .card,
html[data-ps-preset="bitcoin"] [class*="card"],
html[data-ps-preset="bitcoin"] [class*="Card"],
html[data-ps-preset="bitcoin"] [class*="panel"],
html[data-ps-preset="bitcoin"] [class*="Panel"]{
  border-radius: var(--card-radius);
  background: var(--card-bg);
  border-color: var(--card-border);
  box-shadow: var(--card-shadow-soft);
}

/* Stronger outline on hover/active where supported */
@media (hover:hover){
  html[data-ps-preset="bitcoin"] .entry-card:hover,
  html[data-ps-preset="bitcoin"] .resource-card:hover,
  html[data-ps-preset="bitcoin"] .dashPanel:hover,
  html[data-ps-preset="bitcoin"] .dashCard:hover,
  html[data-ps-preset="bitcoin"] .card:hover,
  html[data-ps-preset="bitcoin"] [class*="card"]:hover,
  html[data-ps-preset="bitcoin"] [class*="panel"]:hover{
    border-color: var(--card-border-strong);
    box-shadow: var(--card-shadow);
  }
}

/* LAB · FEATURE/UX — BUNDLE B · HOME TRACK (micro rhythm)
   Intent: less "UI talking", more editorial thresholds.
*/
body[data-page="home"] .homeAccState{
  opacity:.62;
  font-size:1.0em;
}
body[data-page="home"] #dashboardSection{
  margin-bottom: 6px;
}
body[data-page="home"] #blogSection{
  margin-top: 4px;
}
body[data-page="home"] #resourcesSection{
  margin-top: 4px;
}

/* v2.1 PATCH — Resources index editorial refresh (desktop-first + mobile fixes) */
body[data-page="resources"] #resourcesIndexView{
  margin-top: 8px;
}
body[data-page="resources"] .sectionScroller.posts{
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
}
body[data-page="resources"] .resourcesGroupBlock{
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  padding: 12px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.015)),
    rgba(10,12,20,.34);
  box-shadow: 0 10px 24px rgba(0,0,0,.18);
}
body[data-page="resources"] .resourcesGroupBlock.is-focused{
  border-color: rgba(247,147,26,.45);
  box-shadow: 0 0 0 1px rgba(247,147,26,.20) inset, 0 14px 30px rgba(0,0,0,.24);
}
body[data-page="resources"] .resourcesGroupHead{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
body[data-page="resources"] .resourcesGroupTitle{
  margin: 0;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: rgba(236,236,236,.86);
}
body[data-page="resources"] .resourcesGroupCount{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  min-height: 22px;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18);
  font-size: 11px;
  letter-spacing: .09em;
  font-weight: 700;
  color: rgba(236,236,236,.88);
  background: rgba(255,255,255,.06);
}
body[data-page="resources"] .resourcesGroupTags{
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed rgba(255,255,255,.11);
}
body[data-page="resources"] .resourcesGroupTag{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  min-width: 88px;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.03);
  color: rgba(229,233,240,.72);
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: .06em;
  font-weight: 600;
}
body[data-page="resources"] .resourcesGroupTag:nth-child(n+4){
  display: none;
}
body[data-page="resources"] .resourcesGroupList{
  margin-top: 11px;
  display: grid;
  gap: 10px;
}
body[data-page="resources"] .tagRow.tagRowFilter{
  margin-top: 12px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12);
  background:
    radial-gradient(120% 180% at 0% 0%, rgba(247,147,26,.10), rgba(247,147,26,0) 62%),
    linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  box-shadow: 0 0 0 1px rgba(255,255,255,.04) inset;
}
body[data-page="resources"] .tagRow.tagRowFilter .filterSelect{
  width: 100%;
  max-width: none;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.16);
  background-color: rgba(0,0,0,.42);
  color: var(--fg);
  padding: 11px 40px 11px 13px;
  letter-spacing: .04em;
  font-weight: 700;
  appearance: none;
  -webkit-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(242,242,242,.88) 50%),
    linear-gradient(135deg, rgba(242,242,242,.88) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 3px),
    calc(100% - 12px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}
body[data-page="resources"] .tagRow.tagRowFilter .filterSelect:focus,
body[data-page="resources"] .tagRow.tagRowFilter .filterSelect:focus-visible{
  outline: 2px solid rgba(247,147,26,.40);
  outline-offset: 2px;
  border-color: rgba(247,147,26,.42);
  background-color: rgba(0,0,0,.58);
}

body[data-page="resources"] .resourcesQuickFilters{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed rgba(255,255,255,.14);
}
body[data-page="resources"] .resourceQuickChip{
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.05);
  color: rgba(242,242,242,.92);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
body[data-page="resources"] .resourceQuickChip:hover{
  border-color: rgba(255,255,255,.30);
  background: rgba(255,255,255,.10);
}
body[data-page="resources"] .resourceQuickChip.is-active{
  border-color: rgba(247,147,26,.55);
  background: rgba(247,147,26,.16);
  color: rgba(255,230,200,.98);
  box-shadow: 0 0 0 1px rgba(247,147,26,.22) inset;
}
body[data-page="resources"] .resourceQuickChip[data-value="__all__"]{
  border-style: dashed;
}
body[data-page="resources"] .resourceQuickChip:focus-visible{
  outline: 2px solid rgba(247,147,26,.45);
  outline-offset: 2px;
}

body[data-page="resources"] .sectionScroller.posts{
  margin-top: 16px;
  align-items: stretch;
  gap: 14px;
}
body[data-page="resources"] .post.resource-card{
  border: 1px solid rgba(255,255,255,.14);
  background:
    linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.03)),
    rgba(0,0,0,.24);
  box-shadow: 0 10px 24px rgba(0,0,0,.34);
  padding: 16px 16px 14px;
}
body[data-page="resources"] .post.resource-card .postTop{
  align-items: flex-start;
  gap: 10px;
}
body[data-page="resources"] .post.resource-card .postTitle{
  font-size: 17px;
  line-height: 1.35;
  letter-spacing: .01em;
  font-weight: 760;
  color: rgba(242,242,242,.97);
}
body[data-page="resources"] .post.resource-card .postExcerpt{
  margin-top: 8px;
  color: rgba(242,242,242,.78);
  line-height: 1.52;
  font-size: 14px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: hidden;
}
body[data-page="resources"] .post.resource-card .meta{
  margin-top: 1px;
  font-size: 12px;
  letter-spacing: .05em;
  gap: 8px;
  color: rgba(242,242,242,.64);
}
body[data-page="resources"] .post.resource-card .meta .metaLeft{
  display: none;
}
body[data-page="resources"] .post.resource-card .meta .metaRight{
  opacity: .9;
}
body[data-page="resources"] .post.resource-card .psBadge{
  font-size: 9px;
  letter-spacing: .08em;
  opacity: .88;
}
body[data-page="resources"] .post.resource-card .psBadgeOfficial{
  opacity: .82;
  border-color: rgba(255,190,122,.34);
  background: rgba(255,190,122,.10);
}
body[data-page="resources"] .post.resource-card:focus-visible{
  outline: 2px solid rgba(247,147,26,.45);
  outline-offset: 2px;
}

@media (min-width: 900px){
  body[data-page="resources"] .sectionScroller.posts{
    margin-top: 18px;
  }
  body[data-page="resources"] .resourcesGroupList{
    grid-template-columns: repeat(2, 1fr);
  }
  body[data-page="resources"] .post.resource-card.resource-card-hero{
    grid-column: span 2;
  }
  body[data-page="resources"] .post.resource-card .postTop{
    flex-wrap: nowrap;
  }
  body[data-page="resources"] .post.resource-card .meta{
    margin-left: auto;
    max-width: 52%;
  }
}

@media (max-width: 520px){
  body[data-page="resources"] .sectionScroller.posts{
    margin-top: 10px;
    gap: 10px;
  }
  body[data-page="resources"] .resourcesGroupBlock{
    padding: 9px;
    border-radius: 12px;
  }
  body[data-page="resources"] .resourcesGroupHead{
    gap: 6px;
  }
  body[data-page="resources"] .resourcesGroupTitle{
    font-size: 11px;
    letter-spacing: .12em;
  }
  body[data-page="resources"] .resourcesGroupCount{
    min-width: 24px;
    min-height: 20px;
    padding: 1px 8px;
    font-size: 10px;
  }
  body[data-page="resources"] .resourcesGroupTags{
    margin-top: 8px;
    padding-top: 8px;
    gap: 6px;
  }
  body[data-page="resources"] .resourcesGroupTag{
    min-height: 23px;
    min-width: 74px;
    padding: 3px 8px;
    font-size: 9px;
    letter-spacing: .06em;
  }
  body[data-page="resources"] .resourcesGroupList{
    margin-top: 9px;
    gap: 8px;
  }
  body[data-page="resources"] .tagRow.tagRowFilter{
    padding: 9px;
  }
  body[data-page="resources"] .tagRow.tagRowFilter .filterSelect{
    min-height: 42px;
    font-size: 14px;
  }
  body[data-page="resources"] .resourcesQuickFilters{
    gap: 7px;
  }
  body[data-page="resources"] .resourceQuickChip{
    min-height: 32px;
    padding: 6px 11px;
    letter-spacing: .06em;
    font-size: 10px;
  }
  body[data-page="resources"] .post.resource-card{
    padding: 12px 12px 11px;
    border-radius: 12px;
  }
  body[data-page="resources"] .post.resource-card .postTop{
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  body[data-page="resources"] .post.resource-card .postTitle{
    font-size: 15px;
    line-height: 1.3;
  }
  body[data-page="resources"] .post.resource-card .postExcerpt{
    margin-top: 6px;
    font-size: 13px;
    line-height: 1.44;
  }
  body[data-page="resources"] .post.resource-card .meta{
    width: 100%;
    margin-left: 0;
    white-space: normal;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 11px;
  }
  body[data-page="resources"] .post.resource-card .postExcerpt{
    -webkit-line-clamp: 3;
  }
}

html[data-theme="light"] body[data-page="resources"] .tagRow.tagRowFilter{
  border-color: rgba(0,0,0,.14);
  background:
    radial-gradient(120% 180% at 0% 0%, rgba(247,147,26,.10), rgba(247,147,26,0) 64%),
    linear-gradient(180deg, rgba(255,255,255,.86), rgba(255,255,255,.74));
  box-shadow: 0 0 0 1px rgba(0,0,0,.04) inset;
}
html[data-theme="light"] body[data-page="resources"] .tagRow.tagRowFilter .filterSelect{
  border-color: rgba(0,0,0,.18);
  background-color: rgba(255,255,255,.92);
  color: rgba(0,0,0,.86);
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(0,0,0,.65) 50%),
    linear-gradient(135deg, rgba(0,0,0,.65) 50%, transparent 50%);
}
html[data-theme="light"] body[data-page="resources"] .tagRow.tagRowFilter .filterSelect:focus,
html[data-theme="light"] body[data-page="resources"] .tagRow.tagRowFilter .filterSelect:focus-visible{
  outline-color: rgba(247,147,26,.42);
  border-color: rgba(247,147,26,.46);
  background-color: #fff;
}
html[data-theme="light"] body[data-page="resources"] .resourceQuickChip{
  border-color: rgba(0,0,0,.16);
  background: rgba(255,255,255,.84);
  color: rgba(0,0,0,.78);
}
html[data-theme="light"] body[data-page="resources"] .resourcesQuickFilters{
  border-top-color: rgba(0,0,0,.16);
}
html[data-theme="light"] body[data-page="resources"] .resourcesGroupBlock{
  border-color: rgba(0,0,0,.14);
  background:
    linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,.84)),
    rgba(255,255,255,.9);
  box-shadow: 0 10px 20px rgba(0,0,0,.10);
}
html[data-theme="light"] body[data-page="resources"] .resourcesGroupTitle{
  color: rgba(16,24,34,.84);
}
html[data-theme="light"] body[data-page="resources"] .resourcesGroupCount{
  color: rgba(20,30,42,.76);
  border-color: rgba(0,0,0,.18);
  background: rgba(255,255,255,.82);
}
html[data-theme="light"] body[data-page="resources"] .resourcesGroupTags{
  border-top-color: rgba(0,0,0,.14);
}
html[data-theme="light"] body[data-page="resources"] .resourcesGroupTag{
  color: rgba(28,38,52,.72);
  border-color: rgba(0,0,0,.15);
  background: rgba(255,255,255,.8);
}
html[data-theme="light"] body[data-page="resources"] .resourceQuickChip:hover{
  border-color: rgba(0,0,0,.26);
  background: rgba(255,255,255,.96);
}
html[data-theme="light"] body[data-page="resources"] .resourceQuickChip.is-active{
  border-color: rgba(247,147,26,.56);
  background: rgba(247,147,26,.18);
  color: rgba(80,45,12,.94);
  box-shadow: 0 0 0 1px rgba(247,147,26,.25) inset;
}
html[data-theme="light"] body[data-page="resources"] .post.resource-card{
  border-color: rgba(0,0,0,.14);
  background:
    linear-gradient(180deg, rgba(255,255,255,.94), rgba(255,255,255,.84)),
    rgba(255,255,255,.88);
  box-shadow: 0 10px 22px rgba(0,0,0,.12);
}
html[data-theme="light"] body[data-page="resources"] .post.resource-card .postTitle{
  color: rgba(0,0,0,.86);
}
html[data-theme="light"] body[data-page="resources"] .post.resource-card .postExcerpt{
  color: rgba(0,0,0,.72);
}
html[data-theme="light"] body[data-page="resources"] .post.resource-card .meta{
  color: rgba(0,0,0,.56);
}
html[data-theme="light"] body[data-page="resources"] .post.resource-card .psBadgeOfficial{
  opacity: .86;
  border-color: rgba(168,118,52,.32);
  background: rgba(168,118,52,.10);
}

@media (hover: hover){
  body[data-page="resources"] .post.resource-card:hover{
    transform: translateY(-1px);
    border-color: rgba(247,147,26,.28);
    box-shadow: 0 14px 28px rgba(0,0,0,.42);
  }
  html[data-theme="light"] body[data-page="resources"] .post.resource-card:hover{
    border-color: rgba(247,147,26,.34);
    box-shadow: 0 14px 28px rgba(0,0,0,.16);
  }
}

@media (prefers-reduced-motion: reduce){
  body[data-page="resources"] .resourceQuickChip,
  body[data-page="resources"] .post.resource-card{
    transition: none !important;
  }
  body[data-page="resources"] .post.resource-card:hover{
    transform: none !important;
  }
}

/* v2.1 — Resources card enrichment (hero, badge, chips, overview) */
body[data-page="resources"] .post.resource-card.resource-card-hero{
  border-color: rgba(255,79,207,.45);
  border-width: 1.5px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.05)),
    rgba(0,0,0,.32);
  box-shadow: 0 0 0 1px rgba(255,79,207,.12) inset, 0 16px 36px rgba(0,0,0,.48);
}
body[data-page="resources"] .post.resource-card.resource-card-hero .postTitle{
  font-size: 19px;
}
body[data-page="resources"] .post.resource-card.resource-card-hero .postExcerpt{
  -webkit-line-clamp: unset;
  overflow: visible;
}

body[data-page="resources"] .resourceCardSigil{
  display: inline;
  font-size: 15px;
  opacity: .55;
  vertical-align: baseline;
  margin-right: 2px;
}

body[data-page="resources"] .resourceDifficultyBadge{
  display: inline-flex;
  align-items: center;
  margin-top: 10px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  pointer-events: none;
}
body[data-page="resources"] .resourceDifficultyBadge.diffBase{
  color: rgba(90,255,160,.92);
  border: 1px solid rgba(90,255,160,.30);
  background: rgba(90,255,160,.10);
}
body[data-page="resources"] .resourceDifficultyBadge.diffIntermedio{
  color: rgba(255,200,80,.92);
  border: 1px solid rgba(255,200,80,.30);
  background: rgba(255,200,80,.10);
}
body[data-page="resources"] .resourceDifficultyBadge.diffAvanzato{
  color: rgba(255,90,90,.92);
  border: 1px solid rgba(255,90,90,.30);
  background: rgba(255,90,90,.10);
}

body[data-page="resources"] .resourceTopics{
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
body[data-page="resources"] .resourceTopicChip{
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.05);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .04em;
  color: rgba(242,242,242,.68);
  pointer-events: none;
}

body[data-page="resources"] .resourcesGroupBlock[data-group-type="libri"]{
  border-color: rgba(255,190,122,.28);
}

.resourceOverview{
  border: 1px solid rgba(255,255,255,.18);
  border-left: 3px solid rgba(255,255,255,.28);
  border-radius: 12px;
  background: rgba(255,255,255,.06);
  padding: 16px 18px;
  margin: 16px 0;
}
.resourceOverview p{
  margin: 0 0 10px;
  font-size: 15px;
  line-height: 1.58;
  color: rgba(242,242,242,.88);
}
.resourceOverview p:last-child{
  margin-bottom: 0;
}
.resourceOverview strong{
  color: rgba(242,242,242,.96);
}

/* Light theme — new resource elements */
html[data-theme="light"] body[data-page="resources"] .post.resource-card.resource-card-hero{
  border-color: rgba(168,118,52,.38);
  border-width: 1.5px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(255,255,255,.92)),
    rgba(255,255,255,.96);
  box-shadow: 0 0 0 1px rgba(168,118,52,.10) inset, 0 16px 36px rgba(0,0,0,.16);
}
html[data-theme="light"] body[data-page="resources"] .resourceDifficultyBadge.diffBase{
  color: rgba(20,120,60,.88);
  border-color: rgba(20,120,60,.28);
  background: rgba(20,120,60,.08);
}
html[data-theme="light"] body[data-page="resources"] .resourceDifficultyBadge.diffIntermedio{
  color: rgba(160,120,20,.88);
  border-color: rgba(160,120,20,.28);
  background: rgba(160,120,20,.08);
}
html[data-theme="light"] body[data-page="resources"] .resourceDifficultyBadge.diffAvanzato{
  color: rgba(180,40,40,.88);
  border-color: rgba(180,40,40,.28);
  background: rgba(180,40,40,.08);
}
html[data-theme="light"] body[data-page="resources"] .resourceTopicChip{
  border-color: rgba(0,0,0,.14);
  background: rgba(255,255,255,.82);
  color: rgba(0,0,0,.62);
}
html[data-theme="light"] body[data-page="resources"] .resourcesGroupBlock[data-group-type="libri"]{
  border-color: rgba(168,118,52,.28);
}
html[data-theme="light"] .resourceOverview{
  border-color: rgba(0,0,0,.16);
  border-left-color: rgba(0,0,0,.28);
  background: rgba(0,0,0,.04);
}
html[data-theme="light"] .resourceOverview p{
  color: rgba(0,0,0,.78);
}
html[data-theme="light"] .resourceOverview strong{
  color: rgba(0,0,0,.88);
}

@media (max-width: 520px){
  body[data-page="resources"] .post.resource-card.resource-card-hero .postTitle{
    font-size: 16px;
  }
  body[data-page="resources"] .resourceDifficultyBadge{
    margin-top: 8px;
    font-size: 9px;
    padding: 2px 8px;
  }
  body[data-page="resources"] .resourceTopics{
    gap: 5px;
    margin-top: 6px;
  }
  body[data-page="resources"] .resourceTopicChip{
    font-size: 9px;
    padding: 2px 7px;
  }
  .resourceOverview{
    padding: 12px 14px;
    margin: 12px 0;
  }
  .resourceOverview p{
    font-size: 14px;
    line-height: 1.52;
  }
}

/* v2.1 PATCH - Multi-page visual parity (sobria)
   Shared shell/card rhythm outside Home.
*/
body[data-page="blog"] main.wrap > section.card,
body[data-page="resources"] main.wrap > section.card,
body[data-page="archive"] main.wrap > section.card,
body[data-page="dashboard"] main.wrap > section.card,
body[data-page="post"] main.wrap > section.card,
body[data-page^="dash-"] main.wrap > section.card{
  padding-bottom: 14px;
}

body[data-page="blog"] .postBottomNav,
body[data-page="resources"] .postBottomNav,
body[data-page="archive"] .postBottomNav,
body[data-page="dashboard"] .postBottomNav,
body[data-page="post"] .postBottomNav,
body[data-page^="dash-"] .postBottomNav{
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,.09);
}

html[data-theme="light"] body[data-page="blog"] .postBottomNav,
html[data-theme="light"] body[data-page="resources"] .postBottomNav,
html[data-theme="light"] body[data-page="archive"] .postBottomNav,
html[data-theme="light"] body[data-page="dashboard"] .postBottomNav,
html[data-theme="light"] body[data-page="post"] .postBottomNav,
html[data-theme="light"] body[data-page^="dash-"] .postBottomNav{
  border-top-color: rgba(0,0,0,.11);
}

body[data-page="blog"] .siteCopyright,
body[data-page="resources"] .siteCopyright,
body[data-page="archive"] .siteCopyright,
body[data-page="dashboard"] .siteCopyright,
body[data-page="post"] .siteCopyright,
body[data-page^="dash-"] .siteCopyright{
  margin-top: 12px;
  opacity: .78;
}

body[data-page="blog"] .post.entry-card,
body[data-page="archive"] .post.entry-card,
body[data-page="resources"] .post.resource-card{
  border-radius: 14px;
  border-color: rgba(255,255,255,.14);
  box-shadow: 0 10px 24px rgba(0,0,0,.28);
}

html[data-theme="light"] body[data-page="blog"] .post.entry-card,
html[data-theme="light"] body[data-page="archive"] .post.entry-card,
html[data-theme="light"] body[data-page="resources"] .post.resource-card{
  border-color: rgba(0,0,0,.14);
  box-shadow: 0 9px 20px rgba(0,0,0,.12);
}

body[data-page="blog"] .post.entry-card .postTop,
body[data-page="archive"] .post.entry-card .postTop,
body[data-page="resources"] .post.resource-card .postTop{
  align-items: flex-start;
  gap: 10px;
}

body[data-page="blog"] .post.entry-card .postTitle,
body[data-page="archive"] .post.entry-card .postTitle{
  font-size: 17px;
  line-height: 1.32;
  letter-spacing: .01em;
}

body[data-page="blog"] .post.entry-card .excerpt,
body[data-page="archive"] .post.entry-card .excerpt{
  font-size: 14px;
  line-height: 1.5;
  color: rgba(242,242,242,.78);
}

html[data-theme="light"] body[data-page="blog"] .post.entry-card .excerpt,
html[data-theme="light"] body[data-page="archive"] .post.entry-card .excerpt{
  color: rgba(0,0,0,.72);
}

body[data-page="archive"] #archiveSection,
body[data-page="archive"] #archiveResourcesSection{
  margin-top: 6px;
}

body[data-page="archive"] #archiveResourcesSection .pageRow{
  margin-top: 10px;
}
body[data-page="archive"] #archiveResourcesList{
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 4px;
}
body[data-page="archive"] .archiveResourceGroup{
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  padding: 12px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.015)),
    rgba(10,12,20,.30);
  box-shadow: 0 10px 24px rgba(0,0,0,.20);
}
body[data-page="archive"] .archiveResourceGroupHead{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
body[data-page="archive"] .archiveResourceGroupTitle{
  margin: 0;
  font-size: 12px;
  letter-spacing: .14em;
  color: rgba(236,236,236,.86);
}
body[data-page="archive"] .archiveResourceGroupCount{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  min-height: 22px;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.06);
  color: rgba(236,236,236,.88);
  font-size: 11px;
  letter-spacing: .09em;
  font-weight: 700;
}
body[data-page="archive"] .archiveResourceGroupTags{
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed rgba(255,255,255,.11);
}
body[data-page="archive"] .archiveResourceGroupTag{
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.03);
  color: rgba(229,233,240,.74);
  font-size: 9px;
  letter-spacing: .06em;
  font-weight: 620;
}
body[data-page="archive"] .archiveResourceGroupList{
  margin-top: 11px;
  display: grid;
  gap: 10px;
}
html[data-theme="light"] body[data-page="archive"] .archiveResourceGroup{
  border-color: rgba(0,0,0,.14);
  background:
    linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,.84)),
    rgba(255,255,255,.90);
  box-shadow: 0 9px 20px rgba(0,0,0,.10);
}
html[data-theme="light"] body[data-page="archive"] .archiveResourceGroupTitle{
  color: rgba(16,24,34,.84);
}
html[data-theme="light"] body[data-page="archive"] .archiveResourceGroupCount{
  color: rgba(20,30,42,.76);
  border-color: rgba(0,0,0,.18);
  background: rgba(255,255,255,.82);
}
html[data-theme="light"] body[data-page="archive"] .archiveResourceGroupTags{
  border-top-color: rgba(0,0,0,.14);
}
html[data-theme="light"] body[data-page="archive"] .archiveResourceGroupTag{
  color: rgba(28,38,52,.64);
  border-color: rgba(0,0,0,.14);
  background: rgba(255,255,255,.74);
}

body[data-page="post"] article.card,
body[data-page="resources"] article.card.resourceArticle{
  border-radius: 16px;
  box-shadow: 0 10px 26px rgba(0,0,0,.30);
}

html[data-theme="light"] body[data-page="post"] article.card,
html[data-theme="light"] body[data-page="resources"] article.card.resourceArticle{
  box-shadow: 0 10px 22px rgba(0,0,0,.12);
}

body[data-page="post"] .articleTitle,
body[data-page="resources"] .resourceArticle .articleTitle{
  font-size: clamp(20px, 2.2vw, 28px);
  line-height: 1.22;
  letter-spacing: .012em;
}

body[data-page="post"] .articleMeta,
body[data-page="resources"] .resourceArticle .articleMeta{
  margin-bottom: 14px;
  opacity: .88;
}

body[data-page="post"] .content,
body[data-page="resources"] .resourceArticle .resourceContent{
  font-size: 15px;
  line-height: 1.72;
}

@media (hover: hover){
  body[data-page="blog"] .post.entry-card:hover,
  body[data-page="archive"] .post.entry-card:hover{
    transform: translateY(-1px);
    border-color: rgba(60,255,140,.26);
    box-shadow: 0 14px 30px rgba(0,0,0,.34);
  }

  body[data-page="archive"] #archiveResourcesSection .post.entry-card:hover,
  body[data-page="resources"] .post.resource-card:hover{
    border-color: rgba(247,147,26,.30);
  }

  html[data-theme="light"] body[data-page="blog"] .post.entry-card:hover,
  html[data-theme="light"] body[data-page="archive"] .post.entry-card:hover{
    border-color: rgba(22,120,78,.34);
    box-shadow: 0 12px 24px rgba(0,0,0,.16);
  }
}

@media (max-width: 640px){
  body[data-page="blog"] .post.entry-card .postTitle,
  body[data-page="archive"] .post.entry-card .postTitle{
    font-size: 16px;
  }

  body[data-page="blog"] .post.entry-card .postTop,
  body[data-page="archive"] .post.entry-card .postTop{
    gap: 8px;
  }

  body[data-page="blog"] .siteCopyright,
  body[data-page="resources"] .siteCopyright,
  body[data-page="archive"] .siteCopyright,
  body[data-page="dashboard"] .siteCopyright,
  body[data-page="post"] .siteCopyright,
  body[data-page^="dash-"] .siteCopyright{
    margin-top: 10px;
  }
  body[data-page="archive"] #archiveResourcesList{
    gap: 10px;
  }
  body[data-page="archive"] .archiveResourceGroup{
    padding: 9px;
    border-radius: 12px;
  }
  body[data-page="archive"] .archiveResourceGroupTitle{
    font-size: 11px;
    letter-spacing: .12em;
  }
  body[data-page="archive"] .archiveResourceGroupCount{
    min-width: 24px;
    min-height: 20px;
    font-size: 10px;
    padding: 1px 8px;
  }
  body[data-page="archive"] .archiveResourceGroupTags{
    margin-top: 8px;
    padding-top: 8px;
    gap: 6px;
  }
  body[data-page="archive"] .archiveResourceGroupTag{
    min-height: 22px;
    padding: 2px 7px;
    font-size: 9px;
  }
  body[data-page="archive"] .archiveResourceGroupList{
    margin-top: 9px;
    gap: 8px;
  }
}

/* v2.1 PATCH - Micro pass: blog landing type + archive meta contrast */
body[data-page="blog"] .blogBlockTitle{
  font-size: clamp(19px, 1.35vw, 24px);
  line-height: 1.14;
  letter-spacing: -.005em;
  font-weight: 710;
  color: rgba(242,242,242,.95);
}

body[data-page="blog"] .blogRecentTitle{
  font-size: 16px;
  font-weight: 680;
  line-height: 1.34;
}

body[data-page="blog"] .blogRecentRight{
  font-size: 13px;
  color: rgba(225,231,238,.84);
}

body[data-page="blog"] .moodCardTitle{
  font-size: 15px;
  line-height: 1.32;
  font-weight: 680;
}

body[data-page="blog"] .moodCardDesc{
  font-size: 13px;
  line-height: 1.45;
  color: rgba(230,236,242,.78);
}

html[data-theme="light"] body[data-page="blog"] .blogBlockTitle{
  color: rgba(16,24,32,.88);
}

html[data-theme="light"] body[data-page="blog"] .blogRecentRight{
  color: rgba(42,54,68,.72);
}

html[data-theme="light"] body[data-page="blog"] .moodCardDesc{
  color: rgba(26,38,52,.66);
}

@media (min-width: 900px){
  body[data-page="archive"] .post.entry-card .meta{
    font-size: 12px;
    letter-spacing: .09em;
    color: rgba(228,235,242,.80);
  }

  body[data-page="archive"] .post.entry-card .meta .metaLeft{
    opacity: .94;
  }

  body[data-page="archive"] .post.entry-card .meta .metaRight{
    opacity: .96;
    color: rgba(240,245,250,.90);
  }

  html[data-theme="light"] body[data-page="archive"] .post.entry-card .meta{
    color: rgba(34,46,60,.72);
  }

  html[data-theme="light"] body[data-page="archive"] .post.entry-card .meta .metaRight{
    color: rgba(22,34,48,.84);
  }
}

/* --------------------------------------------------------------------------
   Invaders v2 — full-site cinematic arcade layer (magenta-core, cyan-secondary)
   Scope: only when preset=invaders. Keeps layout contract intact.
   -------------------------------------------------------------------------- */
html[data-ps-preset="invaders"] :where(.menu-item, .pageTag, .psTopbarLink, .psAppNavItem, .psThemePackBtn){
  letter-spacing: .08em;
}

html[data-ps-preset="invaders"] :where(.menu-item.isCurrent, .pageTag.isCurrent, .psTopbarLink.isCurrent, .psAppNavItem.isActive){
  border-color: rgba(255,79,207,.34);
  box-shadow: 0 0 0 1px rgba(255,79,207,.12) inset, 0 0 16px rgba(255,79,207,.08);
}

html[data-ps-preset="invaders"] :where(.blogBlockTitle, .lastUpdateTitle, .resourceH, .archiveResourceGroupTitle, .section-title, .dashHubTitle){
  color: color-mix(in srgb, var(--accent) 80%, var(--fg));
  text-shadow: 0 0 14px rgba(255,79,207,.16);
}

html[data-ps-preset="invaders"] :where(.post.entry-card, .post.resource-card, .resourceCard, .resourceFull, .archiveResourceGroup, .homeTerminalMention){
  border-color: rgba(255,79,207,.22);
  box-shadow: 0 0 0 1px rgba(255,79,207,.08) inset;
}

@media (hover: hover){
  html[data-ps-preset="invaders"] :where(.post.entry-card:hover, .post.resource-card:hover, .resourceCard:hover, .archiveResourceGroup:hover){
    border-color: rgba(255,79,207,.34);
    box-shadow: 0 14px 30px rgba(0,0,0,.34), 0 0 0 1px rgba(255,79,207,.12) inset;
  }
}

html[data-ps-preset="invaders"] :where(.termTileBadge, .homeChip, .resourceQuickChip, .archiveResourceGroupTag, .psDockPill, .dashHubState, .homeTerminalMentionBadge){
  border-color: rgba(255,79,207,.30);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: color-mix(in srgb, var(--accent) 76%, var(--fg));
}

html[data-ps-preset="invaders"] :where(.resourceQuickChip.is-active, .homeChip.is-active, .psDockPill.isActive){
  border-color: rgba(255,79,207,.44);
  box-shadow: 0 0 0 1px rgba(255,79,207,.14) inset, 0 0 16px rgba(255,79,207,.10);
}

html[data-ps-preset="invaders"] :where(a, .resourceList a, .resourceTocList a, .resourceLinks a){
  text-decoration-color: rgba(255,79,207,.40);
}

html[data-ps-preset="invaders"] :where(a:hover, .resourceList a:hover, .resourceTocList a:hover, .resourceLinks a:hover){
  color: color-mix(in srgb, var(--accent) 74%, var(--accent2) 26%);
  text-decoration-color: rgba(255,79,207,.62);
}

html[data-ps-preset="invaders"] :where(a:visited, .resourceList a:visited, .resourceTocList a:visited, .resourceLinks a:visited){
  color: color-mix(in srgb, var(--accent) 62%, var(--fg));
  text-decoration-color: rgba(255,79,207,.30);
}

html[data-ps-preset="invaders"] :where(button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible){
  outline: 2px solid rgba(255,79,207,.56);
  outline-offset: 2px;
  box-shadow: 0 0 0 2px rgba(255,79,207,.12);
}

html[data-ps-preset="invaders"] :where(.postMeta, .meta, .resourceMeta, .blogRecentRight, .moodCardDesc, .archiveResourceGroupCount){
  color: color-mix(in srgb, var(--accent2) 16%, var(--fg) 84%);
}

html[data-ps-preset="invaders"] body[data-page="archive"] :where(.archiveBlockTitle, .archiveTitle, .archiveResourceGroupTitle){
  color: color-mix(in srgb, var(--accent) 82%, var(--fg));
}

html[data-ps-preset="invaders"] body[data-page="resources"] :where(.resourcesGroupTitle, .resourcesGroupCount, .resourceGroupTitle){
  color: color-mix(in srgb, var(--accent) 78%, var(--fg));
}

html[data-ps-preset="invaders"] body[data-page="blog"] :where(.blogMoodDot, .blogRecentDot){
  background: rgba(255,79,207,.92);
  box-shadow: 0 0 0 4px rgba(255,79,207,.18);
}

@media (max-width: 720px){
  html[data-ps-preset="invaders"] :where(.menu-item, .pageTag, .psTopbarLink, .psAppNavItem){
    letter-spacing: .05em;
  }
  html[data-ps-preset="invaders"] :where(.post.entry-card, .post.resource-card, .resourceCard, .archiveResourceGroup){
    box-shadow: 0 0 0 1px rgba(255,79,207,.07) inset;
  }
}

/* --------------------------------------------------------------------------
   Bitcoin v2 — global polish complement (links, focus, meta tinting)
   Extends the Markets pack (numeric/card) above with the same scope pattern.
   -------------------------------------------------------------------------- */
html[data-ps-preset="bitcoin"] :where(.blogBlockTitle, .lastUpdateTitle, .resourceH, .archiveResourceGroupTitle, .section-title, .dashHubTitle){
  color: color-mix(in srgb, var(--accent) 78%, var(--fg));
}

html[data-ps-preset="bitcoin"] :where(a, .resourceList a, .resourceTocList a, .resourceLinks a){
  text-decoration-color: rgba(247,147,26,.38);
}

html[data-ps-preset="bitcoin"] :where(a:hover, .resourceList a:hover, .resourceTocList a:hover, .resourceLinks a:hover){
  color: color-mix(in srgb, var(--accent) 72%, var(--accentGreen));
  text-decoration-color: rgba(247,147,26,.58);
}

html[data-ps-preset="bitcoin"] :where(a:visited, .resourceList a:visited, .resourceTocList a:visited, .resourceLinks a:visited){
  color: color-mix(in srgb, var(--accent) 60%, var(--fg));
  text-decoration-color: rgba(247,147,26,.28);
}

html[data-ps-preset="bitcoin"] :where(button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible){
  outline: 2px solid rgba(247,147,26,.56);
  outline-offset: 2px;
  box-shadow: 0 0 0 2px rgba(247,147,26,.12);
}

html[data-ps-preset="bitcoin"] :where(.postMeta, .meta, .resourceMeta, .blogRecentRight, .moodCardDesc, .archiveResourceGroupCount){
  color: color-mix(in srgb, var(--accentGreen) 14%, var(--fg) 86%);
}

/* --------------------------------------------------------------------------
   RitualPlus v2 — full-site ritual layer (red-core, amber-secondary)
   Scope: only when preset=ritualplus. Mirrors Invaders structure.
   -------------------------------------------------------------------------- */
html[data-ps-preset="ritualplus"] :where(.menu-item, .pageTag, .psTopbarLink, .psAppNavItem, .psThemePackBtn){
  letter-spacing: .06em;
}

html[data-ps-preset="ritualplus"] :where(.menu-item.isCurrent, .pageTag.isCurrent, .psTopbarLink.isCurrent, .psAppNavItem.isActive){
  border-color: rgba(255,90,90,.30);
  box-shadow: 0 0 0 1px rgba(255,90,90,.10) inset, 0 0 14px rgba(255,90,90,.08);
}

html[data-ps-preset="ritualplus"] :where(.blogBlockTitle, .lastUpdateTitle, .resourceH, .archiveResourceGroupTitle, .section-title, .dashHubTitle){
  color: color-mix(in srgb, var(--accent) 78%, var(--fg));
  text-shadow: 0 0 12px rgba(255,90,90,.14);
}

html[data-ps-preset="ritualplus"] :where(.post.entry-card, .post.resource-card, .resourceCard, .resourceFull, .archiveResourceGroup, .homeTerminalMention){
  border-color: rgba(255,90,90,.20);
  box-shadow: 0 0 0 1px rgba(255,90,90,.07) inset;
}

@media (hover: hover){
  html[data-ps-preset="ritualplus"] :where(.post.entry-card:hover, .post.resource-card:hover, .resourceCard:hover, .archiveResourceGroup:hover){
    border-color: rgba(255,90,90,.32);
    box-shadow: 0 14px 30px rgba(0,0,0,.34), 0 0 0 1px rgba(255,90,90,.10) inset;
  }
}

html[data-ps-preset="ritualplus"] :where(.termTileBadge, .homeChip, .resourceQuickChip, .archiveResourceGroupTag, .psDockPill, .dashHubState, .homeTerminalMentionBadge){
  border-color: rgba(255,90,90,.26);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: color-mix(in srgb, var(--accent) 74%, var(--fg));
}

html[data-ps-preset="ritualplus"] :where(.resourceQuickChip.is-active, .homeChip.is-active, .psDockPill.isActive){
  border-color: rgba(255,90,90,.40);
  box-shadow: 0 0 0 1px rgba(255,90,90,.12) inset, 0 0 14px rgba(255,90,90,.08);
}

html[data-ps-preset="ritualplus"] :where(a, .resourceList a, .resourceTocList a, .resourceLinks a){
  text-decoration-color: rgba(255,90,90,.36);
}

html[data-ps-preset="ritualplus"] :where(a:hover, .resourceList a:hover, .resourceTocList a:hover, .resourceLinks a:hover){
  color: color-mix(in srgb, var(--accent) 72%, var(--accent2));
  text-decoration-color: rgba(255,90,90,.58);
}

html[data-ps-preset="ritualplus"] :where(a:visited, .resourceList a:visited, .resourceTocList a:visited, .resourceLinks a:visited){
  color: color-mix(in srgb, var(--accent) 60%, var(--fg));
  text-decoration-color: rgba(255,90,90,.28);
}

html[data-ps-preset="ritualplus"] :where(button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible){
  outline: 2px solid rgba(255,90,90,.52);
  outline-offset: 2px;
  box-shadow: 0 0 0 2px rgba(255,90,90,.10);
}

html[data-ps-preset="ritualplus"] :where(.postMeta, .meta, .resourceMeta, .blogRecentRight, .moodCardDesc, .archiveResourceGroupCount){
  color: color-mix(in srgb, var(--accent2) 14%, var(--fg) 86%);
}

html[data-ps-preset="ritualplus"] body[data-page="archive"] :where(.archiveBlockTitle, .archiveTitle, .archiveResourceGroupTitle){
  color: color-mix(in srgb, var(--accent) 80%, var(--fg));
}

html[data-ps-preset="ritualplus"] body[data-page="resources"] :where(.resourcesGroupTitle, .resourcesGroupCount, .resourceGroupTitle){
  color: color-mix(in srgb, var(--accent) 76%, var(--fg));
}

html[data-ps-preset="ritualplus"] body[data-page="blog"] :where(.blogMoodDot, .blogRecentDot){
  background: rgba(255,90,90,.88);
  box-shadow: 0 0 0 4px rgba(255,90,90,.16);
}

@media (max-width: 720px){
  html[data-ps-preset="ritualplus"] :where(.menu-item, .pageTag, .psTopbarLink, .psAppNavItem){
    letter-spacing: .04em;
  }
  html[data-ps-preset="ritualplus"] :where(.post.entry-card, .post.resource-card, .resourceCard, .archiveResourceGroup){
    box-shadow: 0 0 0 1px rgba(255,90,90,.06) inset;
  }
}

/* --------------------------------------------------------------------------
   Paper v2 — full-site reading layer (ink/sepia, light-mode aware)
   Scope: only when preset=paper. Light-theme inversions throughout.
   -------------------------------------------------------------------------- */
html[data-ps-preset="paper"] :where(.menu-item, .pageTag, .psTopbarLink, .psAppNavItem, .psThemePackBtn){
  letter-spacing: .04em;
}

html[data-ps-preset="paper"] :where(.menu-item.isCurrent, .pageTag.isCurrent, .psTopbarLink.isCurrent, .psAppNavItem.isActive){
  border-color: rgba(34,30,24,.22);
  box-shadow: 0 0 0 1px rgba(34,30,24,.06) inset, 0 4px 12px rgba(0,0,0,.08);
}

html[data-ps-preset="paper"] :where(.blogBlockTitle, .lastUpdateTitle, .resourceH, .archiveResourceGroupTitle, .section-title, .dashHubTitle){
  color: color-mix(in srgb, var(--color-accent-primary) 72%, var(--fg));
}

html[data-ps-preset="paper"] :where(.post.entry-card, .post.resource-card, .resourceCard, .resourceFull, .archiveResourceGroup, .homeTerminalMention){
  border-color: rgba(34,30,24,.14);
  box-shadow: 0 4px 14px rgba(0,0,0,.08);
}

@media (hover: hover){
  html[data-ps-preset="paper"] :where(.post.entry-card:hover, .post.resource-card:hover, .resourceCard:hover, .archiveResourceGroup:hover){
    border-color: rgba(34,30,24,.22);
    box-shadow: 0 10px 26px rgba(0,0,0,.14), 0 0 0 1px rgba(255,255,255,.30) inset;
  }
}

html[data-ps-preset="paper"] :where(.termTileBadge, .homeChip, .resourceQuickChip, .archiveResourceGroupTag, .psDockPill, .dashHubState, .homeTerminalMentionBadge){
  border-color: rgba(34,30,24,.18);
  background: rgba(34,30,24,.06);
  color: rgba(34,30,24,.82);
}

html[data-ps-preset="paper"] :where(.resourceQuickChip.is-active, .homeChip.is-active, .psDockPill.isActive){
  border-color: rgba(34,30,24,.28);
  box-shadow: 0 0 0 1px rgba(34,30,24,.08) inset, 0 4px 10px rgba(0,0,0,.06);
}

html[data-ps-preset="paper"] :where(a, .resourceList a, .resourceTocList a, .resourceLinks a){
  text-decoration-color: rgba(139,69,19,.34);
}

html[data-ps-preset="paper"] :where(a:hover, .resourceList a:hover, .resourceTocList a:hover, .resourceLinks a:hover){
  color: #6b3a1f;
  text-decoration-color: rgba(139,69,19,.56);
}

html[data-ps-preset="paper"] :where(a:visited, .resourceList a:visited, .resourceTocList a:visited, .resourceLinks a:visited){
  color: #5a4a3a;
  text-decoration-color: rgba(90,74,58,.30);
}

html[data-ps-preset="paper"] :where(button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible){
  outline: 2px solid rgba(139,69,19,.48);
  outline-offset: 2px;
  box-shadow: 0 0 0 2px rgba(139,69,19,.10);
}

html[data-ps-preset="paper"] :where(.postMeta, .meta, .resourceMeta, .blogRecentRight, .moodCardDesc, .archiveResourceGroupCount){
  color: rgba(34,30,24,.62);
}

html[data-ps-preset="paper"] body[data-page="archive"] :where(.archiveBlockTitle, .archiveTitle, .archiveResourceGroupTitle){
  color: color-mix(in srgb, var(--color-accent-primary) 70%, var(--fg));
}

html[data-ps-preset="paper"] body[data-page="resources"] :where(.resourcesGroupTitle, .resourcesGroupCount, .resourceGroupTitle){
  color: color-mix(in srgb, var(--color-accent-resources) 68%, var(--fg));
}

html[data-ps-preset="paper"] body[data-page="blog"] :where(.blogMoodDot, .blogRecentDot){
  background: rgba(74,103,65,.78);
  box-shadow: 0 0 0 3px rgba(74,103,65,.14);
}

@media (max-width: 720px){
  html[data-ps-preset="paper"] :where(.post.entry-card, .post.resource-card, .resourceCard, .archiveResourceGroup){
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
  }
}

/* v2.2 PATCH - Blog redesign + Entry I template master */
body[data-page="blog"] #blogLandingContent{
  display:grid;
  gap:12px;
}

body[data-page="blog"] .blogLandingBlock{
  padding:12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.10);
  background:linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.01));
}

body[data-page="blog"] .blogFilterBlock{
  border-color:rgba(255,255,255,.11);
  background:rgba(255,255,255,.01);
}

body[data-page="blog"] .blogRecentGrid,
body[data-page="blog"] .blogListGrid{
  display:grid;
  gap:12px;
}

body[data-page="blog"] .blogRecentGrid,
body[data-page="blog"] .blogListGrid{
  grid-template-columns:1fr;
}

body[data-page="blog"] .blogEntryCard{
  display:block;
  text-decoration:none;
  border:1px solid rgba(255,255,255,.14);
  border-radius:14px;
  background:rgba(0,0,0,.18);
  padding:12px;
  color:var(--fg);
  transition:border-color .15s ease, background .15s ease, transform .08s ease;
}

body[data-page="blog"] .blogEntryCard:hover{
  border-color:rgba(60,255,140,.28);
  background:rgba(255,255,255,.06);
  transform:translateY(-1px);
}

body[data-page="blog"] .blogEntryCard:focus-visible,
body[data-page="blog"] .blogMoodChip:focus-visible{
  outline:2px solid var(--accent);
  outline-offset:2px;
}

body[data-page="blog"] .blogEntryTop{
  display:flex;
  flex-direction:column;
  gap:8px;
}

body[data-page="blog"] .blogEntryTitle{
  margin:0;
  font-size:16px;
  line-height:1.34;
  color:rgba(242,242,242,.96);
}

body[data-page="blog"] .blogEntryExcerpt{
  margin:8px 0 0;
  font-size:14px;
  line-height:1.48;
  color:rgba(225,231,238,.72);
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

body[data-page="blog"] .blogEntryMeta{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

body[data-page="blog"] .blogEntryMood,
body[data-page="blog"] .blogEntryDate{
  display:inline-flex;
  align-items:center;
  min-height:22px;
  padding:2px 7px;
  border-radius:999px;
  font-size:10px;
  letter-spacing:.07em;
  text-transform:uppercase;
}

body[data-page="blog"] .blogEntryMood{
  border:1px solid rgba(255,255,255,.16);
  background:rgba(255,255,255,.03);
}

body[data-page="blog"] .blogEntryMood.mood-audio{ border-color:rgba(147,197,253,.42); }
body[data-page="blog"] .blogEntryMood.mood-bitcoin{ border-color:rgba(247,147,38,.45); }
body[data-page="blog"] .blogEntryMood.mood-personal{ border-color:rgba(34,197,94,.42); }

body[data-page="blog"] .blogEntryDate{
  border:1px solid rgba(255,255,255,.12);
  color:rgba(232,238,244,.74);
}

body[data-page="blog"] .blogMoodChips{
  display:grid;
  grid-template-columns:1fr;
  gap:8px;
}

body[data-page="blog"] .blogMoodChip{
  display:flex;
  flex-direction:column;
  gap:3px;
  text-decoration:none;
  padding:9px 10px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.02);
  color:var(--fg);
}

body[data-page="blog"] .blogMoodChip.is-active{
  border-color:rgba(60,255,140,.35);
  background:rgba(60,255,140,.10);
}

body[data-page="blog"] .blogMoodChipTitle{
  font-size:12px;
  letter-spacing:.08em;
  text-transform:uppercase;
  font-weight:680;
}

body[data-page="blog"] .blogMoodChipDesc{
  font-size:12px;
  color:rgba(224,230,236,.66);
}

body[data-page="blog"] .blogListHead{
  display:grid;
  gap:8px;
  margin-bottom:12px;
}

body[data-page="blog"] .blogListTitle{
  margin:0;
  font-size:16px;
  line-height:1.2;
}

body[data-page="blog"] .blogInlineLink{
  display:inline-flex;
  align-items:center;
  margin-top:8px;
  color:rgba(238,243,248,.90);
  text-decoration:none;
  font-size:11px;
  letter-spacing:.12em;
  font-weight:640;
  text-transform:uppercase;
  border-bottom:1px solid rgba(255,255,255,.30);
}

body[data-page="blog"] .blogInlineLink:hover{
  color:#fff;
  border-bottom-color:rgba(255,255,255,.52);
}

body[data-page="blog"] .blogMoodChipsInline{
  grid-template-columns:1fr;
}

body[data-page="post"] .postArticle{
  max-width:900px;
  margin:0 auto;
}

body[data-page="post"] .postHero{
  display:grid;
  gap:10px;
  margin-bottom:14px;
}

body[data-page="post"] .postCodeBadge{
  display:inline-flex;
  align-items:center;
  width:max-content;
  min-height:26px;
  padding:5px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.18);
  background:rgba(255,255,255,.05);
  font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace;
  font-size:12px;
  letter-spacing:.12em;
}

body[data-page="post"] .postLead{
  margin:0;
  color:rgba(228,233,238,.84);
  line-height:1.58;
}

body[data-page="post"] .postQuickNav{
  margin:10px 0 14px;
  border:1px solid rgba(255,255,255,.14);
  border-radius:14px;
  background:rgba(255,255,255,.015);
  overflow:hidden;
}

body[data-page="post"] .postQuickNav > summary{
  cursor:pointer;
  padding:10px 11px;
  font-size:10px;
  letter-spacing:.14em;
  text-transform:uppercase;
  font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace;
  opacity:.78;
}

body[data-page="post"] .postQuickNav nav{
  display:grid;
  gap:8px;
  padding:0 12px 12px;
}

body[data-page="post"] .postQuickNav nav a{
  color:rgba(235,240,244,.88);
  text-decoration:none;
  border:1px solid rgba(255,255,255,.12);
  border-radius:10px;
  padding:8px 10px;
  background:rgba(0,0,0,.20);
}

body[data-page="post"] .postSection{
  margin-top:14px;
  padding:13px;
  border-radius:13px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.02);
  scroll-margin-top:170px;
}

body[data-page="post"] .postSection--plain{
  background:rgba(255,255,255,.015);
}

body[data-page="post"] .postSection--accent{
  background:
    linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.015)),
    rgba(0,0,0,.10);
  border-color:rgba(255,255,255,.16);
}

body[data-page="post"] .postSection h2{
  margin:0 0 9px;
  font-size:14px;
  letter-spacing:.10em;
  text-transform:uppercase;
}

body[data-page="post"] .postSection p{
  margin:0;
  color:rgba(228,233,238,.84);
  line-height:1.66;
}

body[data-page="post"] .postQuote{
  margin:14px 0 0;
  border:1px solid rgba(255,255,255,.14);
  border-radius:14px;
  background:rgba(255,255,255,.05);
  padding:14px;
  scroll-margin-top:170px;
}

body[data-page="post"] .postQuote p{
  margin:0;
  color:rgba(242,242,242,.90);
  font-style:italic;
  line-height:1.65;
}

body[data-page="post"] .postCta{
  margin-top:16px;
}

body[data-page="post"] .postCta .outLink{
  margin-top:0;
}

@media (min-width:900px){
  body[data-page="blog"] .blogRecentGrid,
  body[data-page="blog"] .blogListGrid{
    grid-template-columns:repeat(2, minmax(0,1fr));
  }

  /* Landing polish: if recent cards count is odd, last card spans full row. */
  body[data-page="blog"] .blogRecentGrid > .blogEntryCard:last-child:nth-child(odd){
    grid-column:1 / -1;
  }

  body[data-page="blog"] .blogMoodChips,
  body[data-page="blog"] .blogMoodChipsInline{
    grid-template-columns:repeat(3, minmax(0,1fr));
  }

  /* Desktop alignment fix: keep post card aligned with shell width,
     but preserve readable line length in textual blocks. */
  body[data-page="post"] .postArticle{
    max-width:none;
    margin:0;
  }

  body[data-page="post"] .postLead,
  body[data-page="post"] .postSection p,
  body[data-page="post"] .postQuote p{
    max-width:74ch;
  }

  body[data-page="post"] .postQuickNav nav{
    grid-template-columns:repeat(5, minmax(0,1fr));
  }
}

@media (max-width:640px){
  body[data-page="post"] .psBreadcrumbBar .psCrumbs{
    display:flex;
    align-items:center;
    flex-wrap:nowrap;
    gap:6px;
    overflow:hidden;
    white-space:nowrap;
  }

  body[data-page="post"] .psBreadcrumbBar .psCrumbs a{
    flex:0 0 auto;
    max-width:28vw;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }

  body[data-page="post"] .psBreadcrumbBar .psCrumbHere{
    min-width:0;
    max-width:52vw;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    display:inline-block;
  }

  body[data-page="post"] .postQuickNav nav{
    grid-template-columns:repeat(2, minmax(0,1fr));
  }

  body[data-page="post"] .postSection,
  body[data-page="post"] .postQuote{
    padding:11px;
  }

  body[data-page="post"] .postQuickNav > summary{
    padding:10px 11px;
  }
}

html[data-theme="light"] body[data-page="blog"] .blogLandingBlock{
  border-color:rgba(0,0,0,.14);
  background:linear-gradient(180deg, rgba(0,0,0,.035), rgba(0,0,0,.01));
}

html[data-theme="light"] body[data-page="blog"] .blogFilterBlock{
  border-color:rgba(0,0,0,.16);
  background:rgba(0,0,0,.01);
}

html[data-theme="light"] body[data-page="blog"] .blogEntryCard{
  border-color:rgba(0,0,0,.14);
  background:rgba(255,255,255,.85);
}

html[data-theme="light"] body[data-page="blog"] .blogEntryTitle{
  color:rgba(20,28,36,.88);
}

html[data-theme="light"] body[data-page="blog"] .blogEntryExcerpt,
html[data-theme="light"] body[data-page="blog"] .blogMoodChipDesc{
  color:rgba(28,40,54,.64);
}

html[data-theme="light"] body[data-page="blog"] .blogInlineLink{
  color:rgba(24,38,52,.82);
  border-bottom-color:rgba(0,0,0,.30);
}

html[data-theme="light"] body[data-page="blog"] .blogInlineLink:hover{
  color:rgba(14,24,34,.98);
  border-bottom-color:rgba(0,0,0,.50);
}

html[data-theme="light"] body[data-page="blog"] .blogMoodChip,
html[data-theme="light"] body[data-page="blog"] .blogEntryMood,
html[data-theme="light"] body[data-page="blog"] .blogEntryDate{
  border-color:rgba(0,0,0,.16);
  background:rgba(255,255,255,.86);
  color:rgba(24,34,46,.72);
}

@media (max-width:640px){
  body[data-page="blog"] .blogLandingBlock{
    padding:11px;
  }

  body[data-page="blog"] .blogBlockTitle{
    font-size:clamp(16px, 5.4vw, 20px);
    line-height:1.16;
  }

  body[data-page="blog"] .blogEntryTitle{
    font-size:15px;
  }

}

html[data-theme="light"] body[data-page="post"] .postCodeBadge,
html[data-theme="light"] body[data-page="post"] .postQuickNav,
html[data-theme="light"] body[data-page="post"] .postSection,
html[data-theme="light"] body[data-page="post"] .postQuote,
html[data-theme="light"] body[data-page="post"] .postQuickNav nav a{
  border-color:rgba(0,0,0,.14);
  background:rgba(255,255,255,.84);
}

html[data-theme="light"] body[data-page="post"] .postSection--plain{
  background:rgba(255,255,255,.88);
}

html[data-theme="light"] body[data-page="post"] .postSection--accent{
  background:linear-gradient(180deg, rgba(0,0,0,.02), rgba(255,255,255,.88));
  border-color:rgba(0,0,0,.17);
}

html[data-theme="light"] body[data-page="post"] .postLead,
html[data-theme="light"] body[data-page="post"] .postSection p,
html[data-theme="light"] body[data-page="post"] .postQuote p{
  color:rgba(24,34,46,.78);
}
