/* Affable Dissonances v2.1 narrow integration/fix layer. */

/* B2014-1: reading-progress track and its faint delimiter/background are one
   visual unit. If progress is inactive, the unit must not exist visually. */
.site-header-reading-progress:not(.is-visible) {
  display: none !important;
  opacity: 0 !important;
}
.site-header-reading-progress.is-visible {
  display: block;
}

/* Analytics choice extends the existing preference dialog without changing the
   meaning of the existing "Allow preferences" action. */
.ad-v21-privacy-controls {
  display: grid;
  gap: .65rem;
  margin-block: .85rem;
  padding: .8rem;
  border: 1px solid var(--line, rgba(128,128,128,.28));
  border-radius: var(--radius-md, .65rem);
  background: color-mix(in srgb, var(--surface, #fff) 84%, transparent);
}
.ad-v21-privacy-controls label {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: .55rem;
  font-family: var(--font-ui, system-ui, sans-serif);
  font-size: var(--fs-sm, .9rem);
  line-height: 1.4;
}
.ad-v21-privacy-controls input[type="checkbox"] {
  margin-block-start: .2rem;
}
.ad-v21-privacy-note {
  margin: 0;
  color: var(--ink-soft, inherit);
  font-family: var(--font-ui, system-ui, sans-serif);
  font-size: var(--fs-xs, .8rem);
  line-height: 1.45;
}
html[data-ad-gpc="1"] .ad-v21-analytics-row {
  opacity: .72;
}
.ad-v21-privacy-controls input:focus-visible {
  outline: 2px solid var(--focus, #1769e0);
  outline-offset: 2px;
}

/* Critical boot CSS is emitted in <head>; this is the noncritical fallback. */
#ad-literary-boot {
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  #ad-literary-boot { transition: none !important; }
}

/* Bulk-15 Live Preview repair — shared semantic/geometry rules. */
/* ITEM 10: The Unwritten lead is ordinary card body copy, not muted metadata. */
#home-lab .home-unwritten-lead {
  color: var(--ink) !important;
}

/* ITEM 11: Archive Entry uses the shared spacing token immediately below the
   measured header reservation instead of stacking section + viewport offsets. */
#archive-entry-page {
  padding-block-start: var(--space-md) !important;
}
#archive-entry-page .archive-entry-hero {
  margin-block-start: 0 !important;
}

/* ITEMS 12–13: administration card descriptions are body copy; the verified
   status block uses the same semantic accent token family as the page eyebrow. */
.site-admin-card > span {
  color: var(--ink) !important;
}
.site-admin-status > strong,
.site-admin-status > span {
  color: var(--accent-ro-ink) !important;
}

/* B2019 / rc18: the selected Writer's Quill is a real flex item in the shared
   brand control. It never occupies the title/subtitle line box and therefore
   cannot fight the wordmark at wide, wrapped, or compact widths. */
.site-header--floating .brand--right {
  flex-direction: row !important;
  align-items: center;
  justify-content: flex-start;
  gap: .5rem;
  min-block-size: 2.15rem;
}
.site-header--floating .brand-quill {
  display: block;
  flex: 0 0 auto;
  inline-size: 1.45rem;
  block-size: 1.45rem;
  background: var(--ink);
  -webkit-mask-image: url('../images/branding/active-logo-mark.svg');
  mask-image: url('../images/branding/active-logo-mark.svg');
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
  -webkit-mask-size: contain; mask-size: contain;
  opacity: .94;
  pointer-events: none;
}
.site-header--floating .brand-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-inline-size: 0;
  gap: .02rem;
}
.site-header--floating .brand-mark {
  padding-block-end: 0 !important;
  line-height: 1.04 !important;
}
html.ad-header-mode-compact .site-header--floating .brand--right {
  padding-inline-start: 0 !important;
  border-inline-start: 0 !important;
}
@media (max-width: 760px) {
  .site-header--floating .brand-quill { inline-size: 1.25rem; block-size: 1.25rem; }
  .site-header--floating .brand--right { gap: .38rem; }
}

/* B2019 / rc18: Blog Entry sharing is a compact final-main card. */
.blog-share-card{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"copy qr" "meta meta";align-items:center;gap:.85rem 1rem;margin-block:clamp(1.5rem,3vw,2.5rem);padding:1rem 1.1rem;border:1px solid var(--line);border-radius:var(--radius-lg);background:var(--surface-raised,var(--surface));}
.blog-share-card__copy{grid-area:copy;display:flex;align-items:center;gap:.7rem;flex-wrap:wrap}.blog-share-card__label{flex-basis:100%}.blog-share-card__status{font-family:var(--font-mono);font-size:.68rem;color:var(--ink-soft)}
.blog-share-card__qr{grid-area:qr;display:grid;place-items:center;inline-size:5.25rem;block-size:5.25rem;padding:.28rem;border-radius:.45rem;background:#fff;overflow:hidden}.blog-share-card__qr svg{display:block;inline-size:100%;block-size:100%}
.blog-share-card__meta{grid-area:meta;display:flex;justify-content:space-between;gap:.7rem;flex-wrap:wrap;color:var(--ink-faint);font-family:var(--font-mono);font-size:.62rem;line-height:1.35}.blog-share-card__url{overflow-wrap:anywhere}.blog-share-card__hint{white-space:nowrap}
@media(max-width:560px){.blog-share-card{grid-template-columns:1fr auto;align-items:start}.blog-share-card__qr{inline-size:4.5rem;block-size:4.5rem}.blog-share-card__meta{display:grid}.blog-share-card__hint{white-space:normal}}

/* B2051 / QA-001 universal loader viewport contract. */
#ad-literary-boot{position:fixed!important;inset:0!important;inline-size:auto!important;block-size:100dvh!important;min-block-size:100vh!important;display:grid!important;place-items:center!important;margin:0!important;transform:none!important;z-index:2147482000!important}
html.ad-first-view-pending,html.ad-first-view-pending body{overflow:hidden!important}

.blog-pagination{display:flex;align-items:center;justify-content:center;gap:.8rem;margin:1.5rem 0 2rem;min-block-size:2.5rem}.blog-pagination[hidden]{display:none!important}.blog-page-status{min-inline-size:8rem;text-align:center}.blog-page-button:disabled{opacity:.45;cursor:not-allowed}


/* B2052 / QA-001 + QA-008: invariant viewport loader and Book navigation controls. */
#ad-literary-boot{position:fixed!important;top:0!important;right:0!important;bottom:0!important;left:0!important;width:100vw!important;height:100vh!important;height:100dvh!important;min-height:100vh!important;margin:0!important;transform:none!important;z-index:2147482000!important}
#ad-literary-boot>svg{position:fixed!important;left:50vw!important;top:50vh!important;top:50dvh!important;margin:0!important;transform:translate(-50%,-50%)!important;transform-origin:center center!important}
#book-chapter-index,.book-chapter{scroll-margin-top:calc(var(--header-h,4rem) + 1.25rem)}
.book-chapter__footer{display:flex;align-items:center;justify-content:space-between;gap:1rem}
.book-chapter__back-to-contents{margin-inline-start:auto;display:inline-grid;place-items:center;width:2rem;height:2rem;padding:0;border:1px solid var(--line);border-radius:999px;background:transparent;color:var(--ink-soft);font:700 1rem/1 var(--font-mono);cursor:pointer}
.book-chapter__back-to-contents:hover,.book-chapter__back-to-contents:focus-visible{color:var(--ink);border-color:var(--line-strong);background:color-mix(in srgb,var(--surface) 88%,var(--accent-en) 12%)}

/* B2053 / QA-011 + QA-012: scoped public copy-deterrence and exact Book landing clearance. */
[data-ad-copy-protected]{-webkit-user-select:none!important;user-select:none!important}
html[data-ad-copy-mobile="1"] [data-ad-copy-protected]{-webkit-touch-callout:none!important}
.book-chapter{scroll-margin-top:calc(var(--header-h,4rem) + 1.5em)}
