/* ChatWorks – WordPress-specific additions (loaded after main.css). */

/* Keep the fixed header below the admin bar when logged in. */
.admin-bar .masthead { top: 32px; }
@media screen and (max-width: 782px) {
  .admin-bar .masthead { top: 46px; }
}
@media screen and (max-width: 600px) {
  .admin-bar .masthead { top: 0; }
  .admin-bar .masthead.pinned { top: 0; }
}

/* Contact form honeypot + error state */
.cw-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-ok.form-fail {
  background: rgba(212, 85, 63, .08);
  box-shadow: inset 0 0 0 1px rgba(212, 85, 63, .35);
  color: #a63a26;
}

/* Generic pages, posts and archives (anything without a ChatWorks template) */
.cw-prose { max-width: 72ch; color: var(--on-light); }
.cw-prose > * + * { margin-top: 1.1em; }
.cw-prose h2, .cw-prose h3, .cw-prose h4 { margin-top: 1.8em; }
.cw-prose a { color: var(--teal); text-decoration: underline; text-underline-offset: 3px; }
.cw-prose ul, .cw-prose ol { padding-left: 1.3em; }
.cw-prose ul { list-style: disc; }
.cw-prose ol { list-style: decimal; }
.cw-prose li + li { margin-top: .4em; }
.cw-prose img { max-width: 100%; height: auto; border-radius: 14px; }
.cw-prose blockquote { border-left: 3px solid var(--signal); padding-left: 1.2em; font-style: italic; }
.cw-prose .alignwide, .cw-prose .alignfull { max-width: none; }
.cw-list { display: grid; gap: 1.25rem; }
.cw-list .card h3 a { color: inherit; }
.cw-pager { margin-top: 2.5rem; display: flex; gap: .6rem; flex-wrap: wrap; }
.cw-pager .page-numbers { padding: .45rem .9rem; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--rule-light); }
.cw-pager .current { background: var(--teal); color: #fff; box-shadow: none; }
.screen-reader-text { position: absolute !important; clip: rect(1px, 1px, 1px, 1px); width: 1px; height: 1px; overflow: hidden; }

/* Wide content (pages built with blocks / page-builder plugins) */
.cw-prose--wide { max-width: none; }
.cw-prose--wide > p, .cw-prose--wide > ul, .cw-prose--wide > ol { max-width: 72ch; }

/* Dark content pages */

.cw-prose--dark { color: var(--on-dark); }
.cw-prose--dark h1, .cw-prose--dark h2, .cw-prose--dark h3, .cw-prose--dark h4 { color: var(--on-dark); }
.cw-prose--dark a { color: var(--mint); }
.cw-prose--dark blockquote { color: var(--on-dark-soft); }
.cw-prose--dark .wp-block-search__input { background: var(--ink-2); color: var(--on-dark); border: 1px solid var(--rule-dark); }
.cw-prose--dark .wp-block-separator { border-color: var(--rule-dark); }

/* Generic pages: no title hero (the page content supplies its own heading);
   this spacer keeps content clear of the fixed header. */
.cw-head-space { height: clamp(6.5rem, 10vw, 8rem); background: var(--ink); }
.cw-head-space + .screen-reader-text + .band { padding-top: clamp(2rem, 4vw, 3.5rem); }

/* Back-to-top sits above the Bit Assist chat widget (bottom-right). */
.to-top { bottom: calc(clamp(1rem, 2.5vw, 2rem) + 84px); }
