/* The Sovereign Kingdom: WordPress compatibility.
   Keeps the Kingdom layout intact under the admin toolbar and styles ordinary WordPress content. */

/* ---- Admin toolbar (logged-in users only) ---- */
body.admin-bar .masthead { top: 32px; }
html:has(body.admin-bar) { scroll-padding-top: 116px; }
@media screen and (max-width: 782px) {
  body.admin-bar .masthead { top: 46px; }
  html:has(body.admin-bar) { scroll-padding-top: 130px; }
}
@media screen and (max-width: 600px) {
  /* The toolbar scrolls away on small screens. */
  body.admin-bar .masthead { top: 0; }
}

/* ---- WordPress accessibility helpers ---- */
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; padding: 0; margin: -1px; word-wrap: normal !important; }
.screen-reader-text:focus { clip: auto; clip-path: none; width: auto; height: auto; margin: 0; z-index: 100000; background: var(--ink); color: var(--paper); padding: 10px 14px; }

/* ---- Ordinary content (index.php): posts, other pages, plugin pages ---- */
.kingwing-crest svg { display: block; }
.kingwing-content { max-width: 780px; margin: 0 auto; padding: 50px 20px 20px; }
.kingwing-content__head { margin-bottom: 28px; }
.kingwing-entry { background: var(--paper-light); background-image: var(--grain); border: 1px solid var(--ink); outline: 4px double var(--ink); outline-offset: -10px; padding: 40px 38px; box-shadow: var(--shadow); margin: 0 0 36px; }
.kingwing-entry__title { font-family: var(--display); font-weight: 900; font-size: clamp(28px, 4.6vw, 42px); line-height: 1.08; margin: 0 0 18px; color: var(--ink); }
.kingwing-entry__title a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.kingwing-entry__content { font-family: var(--body); font-size: 17px; line-height: 1.65; }
.kingwing-entry__content > * { max-width: 100%; }
.kingwing-entry__content img, .kingwing-entry__content video, .kingwing-entry__content iframe { max-width: 100%; height: auto; }
.kingwing-entry__content a { color: var(--oxblood); }
.kingwing-entry__content h2, .kingwing-entry__content h3 { font-family: var(--display); line-height: 1.15; }
.kingwing-entry__content blockquote { border-left: 3px solid var(--oxblood); margin: 1.2em 0; padding: .2em 1em; font-style: italic; }
.kingwing-entry__content figure { margin: 1.4em 0; }
.kingwing-entry__content figcaption, .wp-caption-text { font-family: var(--mono); font-size: 13px; color: var(--ink-soft); }
.alignleft { float: left; margin: 0 1.2em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.2em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.kingwing-content .nav-links { display: flex; gap: 12px; flex-wrap: wrap; font-family: var(--mono); }
.kingwing-colophon__inner { max-width: 780px; margin: 0 auto; padding: 40px 20px; text-align: center; }
.kingwing-colophon__motto { font-family: var(--heraldic); font-weight: 700; letter-spacing: .24em; text-transform: uppercase; color: var(--gold); }
@media (max-width: 560px) { .kingwing-entry { padding: 30px 22px; } }
