/* psychoSocial — Components CSS (v1.0)
   Buttons, cards, dropdowns, micro-interactions, utilities.
*/
.blogSection .postTitle,
.blogArchive .postTitle{
  color:var(--accentGreenReadable);
}

.resourcesSection .postTitle,
.resourcesArchive .postTitle{
  color:var(--accent);
}

.pubdate{
  color:var(--muted);
  font-size:12px;
  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:12px;
  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 .newBadge{ flex:0 0 auto; }
.sigil{ opacity:.9; }
.excerpt{ margin-top:8px; color:var(--muted); font-size:14px; line-height:1.5; }

.articleTitle{ margin:6px 0 6px; font-size:22px; color:var(--accent); font-weight:800; }
body[data-page="post"] .articleTitle{ color:var(--accentGreen); }
.articleMeta{
  color:var(--muted);
  font-size:12px;
  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:18px;
  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:18px;
}
.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:18px;
  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:16px 20px;
  border-radius:18px;
  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:16px; }
.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; }
}

.ritualTop{
  position:sticky;
  top:0;
  z-index:80;
  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:999px;
  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:12px; letter-spacing:.14em; }
  .ritualIcon{ width:32px; height:32px; }
  .ritualNoise{ height:12px; }
}

.sectionTitle{
  margin:0 0 10px;
  font-size:16px;
  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:18px;
  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:14px;
}
.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:18px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(0,0,0,.22);
}

.resourceMeta{
  margin-top:10px;
  font-size:12px;
  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:12px;
  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:14px;
}

.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;
}

/* 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:12px;
  letter-spacing:.12em;
  text-transform:uppercase;
}
.resourceArticle .resourceContent .muted{
  color:rgba(242,242,242,.70);
}

.resourceArticle .resourceContent > *:first-child{ margin-top:0; }

.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:12px;
  letter-spacing:.18em;
  text-transform:uppercase;
  font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace;
  opacity:.9;
  margin-bottom:8px;
}

.resourceTocList{
  margin:0;
  padding-left:18px;
  color:rgba(242,242,242,.86);
  line-height:1.45;
  font-size:14px;
}

.resourceTocList li{ margin:4px 0; }

.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:12px;
  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:12px;
  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:14px 14px 10px; }

.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:16px;
  letter-spacing:.12em;
  text-transform:uppercase;
}

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

.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:14px;
}

.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:12px;
}

.muted{ opacity:.78; }

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

.resourceBullets li{ margin:8px 0; }

.resourceBullets.sub{
  margin-top:8px;
  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:12px;
  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;
  padding-left:18px;
  color:rgba(242,242,242,.86);
  line-height:1.6;
  font-size:14px;
}

.resourceLinks li{ margin:7px 0; }

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

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

/* 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 a{
  color:rgba(0,0,0,.86);
  border-bottom-color:rgba(0,0,0,.18);
}
html[data-theme="light"] .resourceLinks 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:14px;
}
.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:12px;
  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:12px;
  letter-spacing:.10em;
  text-transform:uppercase;
  opacity:.75;
  font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace;
}
.glossaryEmpty{
  margin-top:8px;
  opacity:.7;
  font-size:12px;
  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(--accent);
  font-size:14px;
}
.resultMeta{
  margin:0 0 6px;
  opacity:.7;
  font-size:12px;
  letter-spacing:.10em;
  text-transform:uppercase;
}

.resultItem--blog .resultTitle{ color:var(--accentGreen); }
.resultItem--blog .resultMeta{ color:var(--accentGreenReadable); }
.resultItem--resources .resultTitle{ color:var(--accent); }
.resultItem--resources .resultMeta{ color:var(--accent); 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:8px; font-weight:900; letter-spacing:.02em; opacity:.85; }

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

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

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

/*
  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;
}

/* 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 !important;
}
@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:20px; }
  .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: 14px;
}
.resourceCredit a{ text-decoration: underline; }

.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 !important; }
#resourcesSection:not([hidden]){ display:block; }
body.view-resources-only #blogSection[hidden]{ display:none !important; }
#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:65;
}

.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;
}

.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:9999;
}
.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:16px;
  left:50%;
  transform:translateX(-50%);
  padding:6px 12px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.22);
  background:rgba(255,255,255,.06);
  color:rgba(255,255,255,.92);
  font-size:12px;
  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 !important;
  overflow:visible !important;
}


/* HOME dashboard (BLOG / RESOURCES) */
.homeSummary{
  margin:10px 0 14px;
  padding:10px 12px;
  border-radius:18px;
  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:8px;
  margin-top:10px;
}
.homeChip{
  display:inline-flex;
  padding:4px 8px;
  border-radius:999px;
  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); }

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

.psBadge{
  padding:2px 8px;
  border-radius:999px;
  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;
}

.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:60;
  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:10px;
}
.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:18px; 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(4, 1fr);
  gap:10px;
  width:min(360px, 100%);
  margin:0 auto;
}
.contactHeaderRow .iconBtn{
  width:46px;
  height:46px;
  display:grid;
  place-items:center;
  margin:0 auto;
}


.fixedHeader{ z-index:80; }

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);
}
.filterSelect option{
  /* Options use the page background for consistent contrast in both themes. */
  background:var(--bg);
  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:8px;
  }
  #resourcesSection .meta{
    white-space:normal;
    flex-wrap:wrap;
    gap:8px;
  }
  #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:9999;
  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:12px;
  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 !important;
  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;
}
