/* v1.0 FINAL maintenance — 2026-01-14: prevent underline on icon links across pages (Safari-safe) */
/* psychoSocial — Base CSS (v1.0)
   Global tokens, resets, typography.
*/
/* v1.07.2 — Tokens moved to css/tokens.css (single source of truth).
   Keep base.css focused on resets + layout primitives.
*/

/* v1.04 a11y: screen-reader-only utility */
.srOnly{
  position:absolute !important;
  width:1px !important;
  height:1px !important;
  padding:0 !important;
  margin:-1px !important;
  overflow:hidden !important;
  clip:rect(0,0,0,0) !important;
  white-space:nowrap !important;
  border:0 !important;
}



*{ box-sizing:border-box; }

/* v1.06.6 — HTML [hidden] must be the single source of truth across the whole site.
   Some modules rely on toggling the boolean attribute, so we force it to win over
   any author display rules.
*/
:where([hidden]){ display:none !important; }

html{
  
  scrollbar-gutter: stable;
}

/* v2.0 Alpha 04 — Theme switch transition (EP1 Motion Pack)
   Enabled by theme.js via html.ps-theme-transitioning.
*/
@media (prefers-reduced-motion: no-preference){
  html.ps-theme-transitioning :where(
    body,
    .psShell,
    .card,
    .pageTag,
    .post,
    .entry-card,
    .resource-card,
    .homeDropdown,
    .drawer,
    .psDockOverlay,
    .psDockSheet,
    .modal,
    .modalCard
  ){
    transition:
      background-color 0.7s cubic-bezier(.23,1,.32,1),
      color 0.7s cubic-bezier(.23,1,.32,1),
      border-color 0.7s cubic-bezier(.23,1,.32,1),
      box-shadow 0.7s cubic-bezier(.23,1,.32,1),
      filter 0.7s cubic-bezier(.23,1,.32,1);
  }
}

body{
  margin:0;
  min-height:100vh;
  overflow-y: scroll;
  /* v1.06.8 — site background artwork (test: black variants)
     Uses separate assets for portrait (mobile) vs landscape (desktop).
     Safe fallback remains the theme background color.
  */
  background-color:var(--color-bg-primary, var(--bg));
  background-image:var(--site-bg-image, none);
  background-repeat:no-repeat;
  background-position:center top;
  background-size:cover;
  color:var(--color-text-primary, var(--fg));
  font-family:var(--font-family-primary, system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif);
  font-size:var(--font-size-base, 16px);
  line-height:var(--line-height-relaxed, 1.6);
}

/* v1.07.2 — Background asset tokens moved to css/tokens.css */

.wrap{ max-width:var(--pageW); margin:0 auto; padding:14px var(--gutter) 40px; }
.wrap.narrow{ max-width:var(--pageW-narrow); }

/* topbar_and_effects (PATCH) — Dock mobile: make page frame as wide as topbar (remove side gutter). */
html.psDockOn{ --psDockPageInset: 12px; }
html.psDockOn .wrap{
  padding-left: var(--psDockPageInset);
  padding-right: var(--psDockPageInset);
}
html.psDockOn .fixedHeader{
  padding-left: var(--psDockPageInset);
  padding-right: var(--psDockPageInset);
}

/* v0.5 — Nav Shell: header fixed on all viewports (navigation reference). */
body.hasFixedHeader .wrap{
  padding-top: calc(14px + var(--fixedHeaderH, 0px));
}

/* Fallback: reserve header space even if the JS fails to set body.hasFixedHeader.
   (Avoids the home MENU row / dropdown being covered by the fixed top bar.) */
header.fixedHeader + main.wrap,
header.fixedHeader + main.wrap.narrow{
  padding-top: calc(14px + var(--fixedHeaderH, 0px));
}

.fixedHeader{
  position:fixed;
  top:0;
  left:0;
  right:0;
  z-index:var(--z-header);
  display:flex;
  flex-direction:column;
  align-items:stretch;
  padding-top: env(safe-area-inset-top, 0px);
  pointer-events:none;
}

/* Enable interactions only on the shell content (prevents accidental blocking). */
.fixedHeader .psShell{ pointer-events:auto; }

/* v0.5 — Nav Shell (2-row fixed header)
   - Row 1: brand
   - Row 2: 4 controls + trays (settings/contacts)
   Guardrail: styles are scoped to .psShell to avoid touching legacy header CSS. */
.psShell{
  max-width:calc(var(--pageW) - (var(--gutter) * 2));
  width:100%;
  margin:0 auto;
  padding:12px 14px 10px;
  border-radius:26px;
  border:1px solid var(--ps-shell-border, rgba(255,255,255,.12));
  background:var(--ps-shell-bg, rgba(0,0,0,.58));
  backdrop-filter: var(--ps-shell-blur, blur(8px));
  box-shadow:var(--ps-shell-shadow, 0 12px 30px rgba(0,0,0,.55));
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:10px;
}
.psShellBrandRow{ width:100%; display:flex; align-items:center; justify-content:center; }
.psBrandLink{ display:inline-flex; align-items:center; justify-content:center; text-decoration:none; }
.psShellControlsRow{ width:100%; display:flex; align-items:center; justify-content:center; }
.psControlsDefault, .psControlsTray{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
}
.psControlsTray{ gap:var(--spacing-sm); }
.psShellSearch{
  flex:1 1 auto;
  display:flex;
  align-items:center;
  gap:var(--spacing-sm);
  width:100%;
  max-width:520px;
}
.psShellSearchInput{
  flex:1 1 auto;
  width:100%;
  height:42px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.06);
  color:var(--color-text-primary, var(--fg));
  padding:0 12px;
  outline:none;
}
.psShellSearchInput:focus{
  border-color:rgba(34,197,94,.45);
  background:rgba(255,255,255,.08);
  box-shadow:0 0 0 2px rgba(34,197,94,.25);
}


/* v2.0 Alpha 02 — Nav Shell buttons: improve icon legibility + spacing */
.psShell .psShellBtn{
  width:46px;
  height:46px;
  padding:0;
  border-radius:16px;
  font-size:22px;
  line-height:1;
  display:flex;
  align-items:center;
  justify-content:center;
  border:1px solid rgba(255,255,255,.16);
  background:rgba(255,255,255,.06);
  color:var(--fg);
  box-shadow:0 10px 18px rgba(0,0,0,.28);
}
.psShell .psShellBtn:hover{
  background:rgba(255,255,255,.09);
}
@media (prefers-reduced-motion: no-preference){
  .psShell .psShellBtn:hover{ transform:translateY(-1px); }
}
.psShell .psShellBtn:active{
  transform:translateY(0);
}

html[data-theme="light"] .psShell .psShellBtn{
  border-color:rgba(0,0,0,.14);
  background:rgba(0,0,0,.03);
  color:var(--fg);
  box-shadow:0 10px 18px rgba(0,0,0,.16);
}
html[data-theme="light"] .psShell .psShellBtn:hover{
  background:rgba(0,0,0,.05);
}

/* Brand padding so it doesn't feel "glued" to the border */
.psShell .psBrandLink{
  padding:6px 10px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.04);
}
html[data-theme="light"] .psShell .psBrandLink{
  border-color:rgba(0,0,0,.12);
  background:rgba(0,0,0,.02);
}

/* Compact state (applied by header.js at scrollY>110px) */
.fixedHeader.isCompact .psShell{
  padding:8px 12px 9px;
  border-radius:22px;
  gap:var(--spacing-sm);
}
.fixedHeader.isCompact .psShellBrandRow{ display:none; }
.fixedHeader.isCompact .psControlsDefault{ gap:6px; }
.fixedHeader.isCompact .psControlsTray{ gap:6px; }
.fixedHeader.isCompact .psShellSearchInput{ height:38px; border-radius:13px; }
.fixedHeader.isCompact .psShell .psShellBtn{
  width:40px;
  height:40px;
  border-radius:14px;
  font-size:var(--font-size-lg);
}

@media (min-width: 900px){
  body.psDesktopTrayMode .psShellControlsRow{
    position: relative;
  }
  body.psDesktopTrayMode .psControlsTray{
    position: fixed !important;
    top: var(--ps-tray-top, 108px);
    left: 50%;
    transform: translateX(-50%);
    width: min(520px, calc(100vw - 28px));
    max-height: min(62vh, var(--desktop-tray-max-h, 72vh));
    overflow: auto;
    padding: 10px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,.14);
    background: rgba(0,0,0,.86);
    box-shadow: 0 14px 32px rgba(0,0,0,.36);
    justify-content: flex-start;
  }
  body.psDesktopTrayMode .psControlsSettings .psShellSettingsBlocks{
    width: 100%;
    display: grid;
    gap: 8px;
  }
  body.psDesktopTrayMode .psControlsSettings .psThemePackBlock{
    border-radius: 12px;
    padding: 8px;
    margin: 0;
  }
  body.psDesktopTrayMode .psControlsSettings .psThemePackTitle{
    margin-bottom: 6px;
    font-size: 12px;
    letter-spacing: .08em;
  }
  body.psDesktopTrayMode .psControlsSettings .psThemePackRow{
    gap: 8px;
  }
  body.psDesktopTrayMode .psControlsSettings .psThemePackBtn{
    min-height: 34px;
    border-radius: 11px;
    font-size: 12px;
  }
  body.psDesktopTrayMode .psControlsSettings .psShellSearch{
    max-width: none;
  }
  body.psDesktopTrayMode .psControlsSettings .psShellSearchInput{
    height: 38px;
    border-radius: 12px;
  }
  body.psDesktopTrayMode .psControlsSettings .psTrayClose{
    align-self: flex-start;
    margin-bottom: 4px;
  }
  body.psDesktopTrayMode .psControlsContacts{
    width: min(420px, calc(100vw - 28px));
    justify-content: center;
    gap: 8px;
  }
  body.psDesktopTrayMode .psControlsContacts .psTrayClose{
    margin-right: 4px;
  }
  html[data-theme="light"] body.psDesktopTrayMode .psControlsTray{
    border-color: rgba(0,0,0,.14);
    background: rgba(255,255,255,.96);
    box-shadow: 0 12px 26px rgba(0,0,0,.14);
  }
  html[data-ps-preset="paper"] body.psDesktopTrayMode .psControlsTray{
    border-color: var(--paper-line, rgba(34,30,24,.18));
    background: var(--paper-surface-strong, rgba(226,221,212,.94));
    box-shadow: 0 12px 26px rgba(0,0,0,.12);
  }
  body.psDesktopTrayMode #psTrayBackdrop{
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.14);
    z-index: var(--z-modal-backdrop);
  }
  body.psDesktopTrayMode .psControlsTray{
    z-index: calc(var(--z-modal-backdrop) + 1);
  }
}

.headerSep{ width:100%; height:1px; background:rgba(255,255,255,.10); margin-top:2px; }

html[data-theme="light"] .psShell{
  --ps-shell-border: rgba(0,0,0,.14);
  --ps-shell-bg: rgba(255,255,255,.72);
  --ps-shell-shadow: 0 12px 30px rgba(0,0,0,.18);
}
html[data-ps-preset="paper"] .psShell{
  --ps-shell-border: var(--paper-line, rgba(34,30,24,.18));
  --ps-shell-bg: var(--paper-shell-bg, color-mix(in srgb, var(--paper-surface-strong, rgba(226,221,212,.94)) 94%, transparent));
  --ps-shell-shadow: 0 12px 30px rgba(0,0,0,.16);
}
html[data-theme="light"] .psShellSearchInput{
  border:1px solid rgba(0,0,0,.14);
  background:rgba(0,0,0,.03);
  color:rgba(0,0,0,.82);
}
html[data-ps-preset="paper"] .psShellSearchInput{
  border-color: var(--paper-line, rgba(34,30,24,.18));
  background: color-mix(in srgb, var(--paper-surface-soft, rgba(216,211,202,.82)) 82%, rgba(0,0,0,.06));
}
html[data-theme="light"] .headerSep{ background:rgba(0,0,0,.10); }

@media (max-width: 420px){
  .psShell{ padding:10px 12px 8px; border-radius:22px; }
  .psShellSearch{ max-width:100%; }
}

/* topbar_and_effects (PATCH) — Dock mobile: topbar becomes 1-row (brand only). */
html.psDockOn .psShellControlsRow{ display:none; }
html.psDockOn .psShell{
  padding: 9px 12px 9px;
  border-radius: 22px;
  gap: 0;
}
html.psDockOn .psShell .psBrandLink{
  padding: 4px 10px;
  border-radius: 14px;
}
html.psDockOn .psShell .brandImgHeader{
  width: min(260px, 100%);
}
/* Hide the separator line (otherwise it reads as a full-width bar under the brand). */
html.psDockOn .psShell .headerSep{ display:none; }
/* Safety: keep the brand visible even if compact-on-scroll triggers. */
html.psDockOn .fixedHeader.isCompact .psShellBrandRow{ display:flex; }



.fixedHeader .topBar,
.fixedHeader .prefsBar{
  pointer-events:none;
}
.fixedHeader .topBarInner,
.fixedHeader .prefsBarInner{
  pointer-events:auto;
}


.fixedHeader .topBar,
.fixedHeader .prefsBar{ pointer-events:none; }
.fixedHeader .topBarInner,
.fixedHeader .prefsBarInner{ pointer-events:auto; }


.topBar{
  padding:10px var(--gutter) 12px;
}

.topBarInner{
  
  max-width:calc(var(--pageW) - (var(--gutter) * 2));
  width:100%;
  margin:0 auto;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:12px;
  padding:12px 14px;
  border-radius:26px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.58);
  backdrop-filter: blur(8px);
  box-shadow:0 12px 30px rgba(0,0,0,.55);
}

/* v0.9: home top bar more opaque (readability over background) */
html[data-theme="dark"] body[data-page="home"] .topBarInner{ background:rgba(0,0,0,.78); }
html[data-theme="light"] body[data-page="home"] .topBarInner{ background:rgba(255,255,255,.88); }

.topLeft{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
}

.brandImg{
  height:48px;
  width:auto;
  max-width:52%;
  flex-shrink:0;
  display:block;
  object-fit:contain;
  opacity:.95;
}


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


body[data-page="home"] .topBarInner:not(.topBarInnerStack){
  display:flex;
  align-items:center;
  justify-content:flex-start;
}

@media (max-width:520px){
  
  body[data-page="home"] .topBarInner:not(.topBarInnerStack){
    display:flex;
    flex-wrap:wrap;
    row-gap:10px;
  }
}


@media (max-width:520px){
  .topBarInner{
    padding:10px 12px;
    border-radius:22px;
    display:grid;
    grid-template-columns: 76px 1fr;
    grid-template-rows: auto auto;
    column-gap:12px;
    row-gap:var(--spacing-sm);
    align-items:center;
    justify-content:stretch;
  }


  .topLeft{ display:contents; }

  
  .topBarInner .sigilImg{
    grid-column:1;
    grid-row:1 / span 2;
    width:76px;
    height:76px;
    border-radius:var(--border-radius-lg);
  }

  
  .topBarInner .sigilBtns{
    grid-column:2;
    grid-row:1;
    justify-self:start;
    display:flex;
    gap:10px;
    flex-wrap:wrap;
  }

  
  .topBarInner .brandImg{
    grid-column:2;
    grid-row:2;
    justify-self:start;
    height:28px;
    max-width:100%;
  }

  
  body[data-page="home"] .topBarInner:not(.topBarInnerStack){
    display:grid;
    grid-template-columns:76px repeat(4, minmax(0, 1fr));
    
    grid-template-rows:48px 48px;
    column-gap:10px;
    row-gap:var(--spacing-sm);
    align-items:center;
    justify-content:stretch;
  }

  body[data-page="home"] .topBarInner:not(.topBarInnerStack) .sigilImg{
    grid-column:1;
    grid-row:1 / span 2;
    width:76px;
    height:76px;
    border-radius:var(--border-radius-lg);
  }

  
  body[data-page="home"] .topBarInner:not(.topBarInnerStack) .sigilBtns{
    grid-column:2 / span 4;
    grid-row:1;
    display:grid;
    grid-template-columns:repeat(4, minmax(0, 1fr));
    gap:10px;
    align-items:center;
    justify-items:center;
  }

  
  body[data-page="home"] .topBarInner:not(.topBarInnerStack) .prefsInline{
    grid-column:2 / span 4;
    grid-row:2;
    display:grid;
    grid-template-columns:repeat(4, minmax(0, 1fr));
    gap:10px;
    align-items:center;
  }

  body[data-page="home"] .topBarInner:not(.topBarInnerStack) .prefsInline .themeSwitch{
    grid-column:1 / span 2;
    display:grid;
    grid-template-columns:repeat(2, 1fr);
    gap:10px;
    padding:0;
    border-radius:var(--border-radius-lg);
    height:46px;
    justify-items:center;
    align-items:center;
  }

  body[data-page="home"] .topBarInner:not(.topBarInnerStack) .prefsInline .langSwitch{
    grid-column:3 / span 2;
    display:grid;
    grid-template-columns:repeat(2, 1fr);
    gap:10px;
    padding:0;
    border-radius:var(--border-radius-lg);
    height:46px;
    justify-items:center;
    align-items:center;
  }

  
  body[data-page="home"] .topBarInner:not(.topBarInnerStack) .prefsInline .themeOpt,
  body[data-page="home"] .topBarInner:not(.topBarInnerStack) .prefsInline .langOpt{
    width:42px;
    height:42px;
    padding:0;
    border-radius:14px;
  }

  
  body[data-page="home"] .topBarInner:not(.topBarInnerStack) .sigilBtns .iconBtn{
    width:46px;
    height:46px;
    padding:0;
    border-radius:15px;
    font-size:var(--font-size-lg);
  }

  
  body[data-page="home"] .topBarInner:not(.topBarInnerStack) .prefsInline .themeOpt,
  body[data-page="home"] .topBarInner:not(.topBarInnerStack) .prefsInline .langOpt{
    background:transparent;
    border-color:transparent;
    opacity:.72;
  }
  body[data-page="home"] .topBarInner:not(.topBarInnerStack) .prefsInline .themeOpt.isActive,
  body[data-page="home"] .topBarInner:not(.topBarInnerStack) .prefsInline .langOpt.isActive{
    opacity:1;
    border-color:rgba(255,255,255,.18);
    background:rgba(255,255,255,.10);
  }
  html[data-theme="light"] body[data-page="home"] .topBarInner:not(.topBarInnerStack) .prefsInline .themeOpt.isActive,
  html[data-theme="light"] body[data-page="home"] .topBarInner:not(.topBarInnerStack) .prefsInline .langOpt.isActive{
    border-color:rgba(0,0,0,.12);
    background:rgba(0,0,0,.06);
  }


}

.ritualTopFixed{
  margin:0;
  padding:12px 10px;
  border-top:0;
  border-bottom:1px solid rgba(0,0,0,.15);
}

.ritualTopFixed .ritualInner{
  width:100%;
  max-width:860px;
  margin:0 auto;
  padding:0 14px;
}

.sigilFixed{
  padding:10px 14px 12px;
}

.sigilFixedInner{
  max-width:860px;
  margin:0 auto;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  padding:12px 14px;
  border-radius:26px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.58);
  backdrop-filter: blur(8px);
  box-shadow:0 12px 30px rgba(0,0,0,.55);
}

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

.card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:var(--spacing-md);
}

.btn{
  padding:12px 14px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.08);
  color:var(--color-text-primary, var(--fg));
  font-size:var(--font-size-sm);
  cursor:pointer;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  gap:var(--spacing-sm);
}
.btn:hover{ background:rgba(255,255,255,.12); }

.mailFooter{
  margin-top:26px;
  display:flex;
  justify-content:center;
  opacity:.72;
}
.mailFooter a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.15);
  background:rgba(255,255,255,.04);
  transition:opacity .15s ease, transform .1s ease, background .15s ease;
}


button:not(:disabled),
[role="button"],
.pageTag,
.pageTagLink,
.splashSkip{
  cursor:pointer;
}

.mailFooter a:hover{
  opacity:1;
  background:rgba(255,255,255,.08);
  transform:scale(1.05);
}
.mailFooter img{
  width:26px;
  height:26px;
  filter:invert(1) contrast(1.2);
  opacity:.9;
  display:block;
}

.nav{ display:flex; gap:10px; flex-wrap:wrap; margin-bottom:12px; }

.topbar{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:10px;
  margin-bottom:12px;
  min-height:42px;
}

.topbarCenter{
  position:absolute;
  left:50%;
  transform:translateX(-50%);
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  flex-wrap:nowrap;
  white-space:nowrap;
  max-width:calc(100% - 80px);
}

.iconBtn{
  width:42px;
  height:42px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.08);
  color:var(--color-text-primary, var(--fg));
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:var(--font-size-md);
  line-height:1;
  transition:background .15s ease, transform .06s ease;
}

/* Text variant for icon-style buttons (e.g., HOME). Keeps the same look but
   allows the label to stay inside the pill without overflow. */
.iconBtn.textBtn{
  width:auto;
  padding:0 14px;
  font-size:13px;
  letter-spacing:.12em;
  text-transform:uppercase;
}
.iconBtn.textBtn{ min-width:64px; }
.iconBtn:hover{ background:rgba(255,255,255,.12); }
.iconBtn:active{ transform:scale(.99); }



html[data-theme="light"] .topBarInner,
html[data-theme="light"] .sigilFixedInner{
  border:1px solid rgba(0,0,0,.14);
  background:rgba(255,255,255,.72);
  box-shadow:0 12px 30px rgba(0,0,0,.18);
}

html[data-theme="light"] .btn,
html[data-theme="light"] .iconBtn,
html[data-theme="light"] .mailFooter a{
  border:1px solid rgba(0,0,0,.14);
  background:rgba(0,0,0,.03);
}
html[data-theme="light"] .btn:hover,
html[data-theme="light"] .iconBtn:hover,
html[data-theme="light"] .mailFooter a:hover{
  background:rgba(0,0,0,.06);
}

html[data-theme="light"] .pageTag{
  border:1px solid rgba(0,0,0,.14);
  background:rgba(0,0,0,.03);
  color:rgba(0,0,0,.82);
  box-shadow:0 0 0 1px rgba(0,0,0,.06) inset;
}
html[data-theme="light"] .pageTagAlt{
  color:rgba(0,0,0,.82);
  border-color:rgba(0,0,0,.16);
  background:rgba(0,0,0,.02);
  box-shadow:0 0 0 1px rgba(0,0,0,.05) inset;
}


html[data-theme="light"] .sectionScroller::-webkit-scrollbar-track{ background:rgba(0,0,0,.06); }
html[data-theme="light"] .sectionScroller::-webkit-scrollbar-thumb{ background:rgba(0,0,0,.18); border:2px solid rgba(255,255,255,.65); }

html[data-theme="light"] .post,
html[data-theme="light"] .resourceCard,
html[data-theme="light"] .resourceFull,
html[data-theme="light"] .media,
html[data-theme="light"] .quote{
  border-color:rgba(0,0,0,.14);
  background:rgba(255,255,255,.72);
}

html[data-theme="light"] .post:hover{ background:rgba(0,0,0,.03); }

html[data-theme="light"] .quote{ color:rgba(0,0,0,.84); }

html[data-theme="light"] .embedVideo{
  border-color:rgba(0,0,0,.14);
  background:rgba(255,255,255,.70);
  box-shadow:0 10px 24px rgba(0,0,0,.18);
}

html[data-theme="light"] .outLink{
  border-color:rgba(0,0,0,.18);
  background:rgba(255,255,255,.78);
  box-shadow:0 0 0 1px rgba(0,0,0,.06) inset, 0 10px 22px rgba(0,0,0,.18);
}
html[data-theme="light"] .outLink:hover{
  background:rgba(0,0,0,.03);
  border-color:rgba(0,0,0,.35);
}

html[data-theme="light"] .resourceToc{
  border-color:rgba(0,0,0,.12);
  background:rgba(255,255,255,.72);
}

html[data-theme="light"] .resourceList,
html[data-theme="light"] .resourceTocList{ color:var(--muted); }

html[data-theme="light"] .resourceList a,
html[data-theme="light"] .resourceTocList a{
  color:rgba(0,0,0,.84);
  border-bottom-color:rgba(0,0,0,.18);
}
html[data-theme="light"] .resourceList a:hover{
  color:rgba(0,0,0,.96);
  border-bottom-color:rgba(0,160,90,.45);
}
html[data-theme="light"] .resourceTocList a:hover{
  color:rgba(0,0,0,.96);
  border-bottom-color:rgba(0,0,0,.35);
}

html[data-theme="light"] .resourceLinks a{
  color:rgba(0,0,0,.84);
  border-bottom-color:rgba(0,0,0,.18);
}
html[data-theme="light"] .resourceLinks a:hover{
  color:rgba(0,0,0,.96);
  border-bottom-color:rgba(0,0,0,.35);
}

html[data-theme="light"] .langTab{
  border-color:rgba(0,0,0,.14);
  background:rgba(255,255,255,.70);
  color:rgba(0,0,0,.84);
}
html[data-theme="light"] .langTab:hover{ background:rgba(0,0,0,.03); }
html[data-theme="light"] .langTab.is-active{
  background:rgba(0,0,0,.05);
  border-color:rgba(0,0,0,.22);
  box-shadow:0 0 0 1px rgba(0,0,0,.06) inset;
}


.iconBtn svg{
  width:var(--spacing-lg);
  height:var(--spacing-lg);
  stroke:currentColor;
  fill:none;
  stroke-width:2.2;
  stroke-linecap:round;
  stroke-linejoin:round;
}



@view-transition {
  navigation: auto;
}


::view-transition-old(root),
::view-transition-new(root){
  animation-duration: 180ms;
}


*{
  scrollbar-width: thin;
  scrollbar-color: var(--accent) transparent;
}

*::-webkit-scrollbar{
  width: 8px;
  height: 8px;
}
*::-webkit-scrollbar-track{
  background: transparent;
}
*::-webkit-scrollbar-thumb{
  background-color: var(--accent);
  border-radius: var(--border-radius-full);
  border: 2px solid transparent;
  background-clip: padding-box;
}
@supports (background: color-mix(in srgb, red, transparent)){
  *::-webkit-scrollbar-thumb{
    background-color: color-mix(in srgb, var(--accent) 65%, transparent);
  }
}


/* === Desktop refinement (v1.0 / 2026-01-14)
   Intent:
   - Keep mobile look identical (mobile-first).
   - Use extra horizontal space on desktop while preserving centered composition.
   Regression risk:
   - If a page looks “too wide” on ultra-wide screens, tune --pageW values below.
*/
@media (min-width:1100px){
  :root{
    --pageW:1080px;
    --gutter:18px;
  }
}

@media (min-width:1400px){
  :root{
    --pageW:1200px;
  }
}



/* --- Icon links: never underline (Safari/iOS safe) --- */
.iconBtn, .iconLink{ text-decoration:none; }
a.iconBtn, a.iconBtn:visited, a.iconBtn:hover, a.iconBtn:active, a.iconBtn:focus,
a.iconLink, a.iconLink:visited, a.iconLink:hover, a.iconLink:active, a.iconLink:focus{
  text-decoration:none !important;
}

/* v1.13.0-alpha3 — prefers-reduced-motion (global, CSS-only)
   Goal: keep UI identical, but reduce motion intensity when the OS asks for it.
   Strategy:
   - Keep final states (fade-in etc.) by collapsing durations to ~0.
   - Stop continuous tickers/noise explicitly.
*/
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior:auto !important; }
  html:focus-within{ scroll-behavior:auto !important; }

  /* Stop motion entirely */
  *,*::before,*::after{
    animation:none !important;
    transition:none !important;
    scroll-behavior:auto !important;
  }

  /* Continuous animations (ticker/noise) should stop completely. */
  #msgTrack,
  .noise{
    animation:none !important;
    transform:none !important;
  }
}
