/* Layout is shared by front end and editor. No legacy global reset. */
* { box-sizing: border-box; }
/* Keep the original 39px texture at native scale; never stretch the grain. */
body, .editor-styles-wrapper { background-image: url("images/bg.gif"); background-repeat: repeat; background-size: 39px 39px; }
.wp-site-blocks { max-width: 1024px; margin: 20px auto; border: 1px solid transparent; background: transparent; border-radius: 6px; }
.wp-site-blocks > * { margin-block: 0; }
.librio-heading { position: relative; padding: 14px 22px; background: transparent; border-radius: 6px 6px 0 0;
 }
.librio-heading .wp-block-site-title { margin: 0; padding-right: 220px; }
.librio-heading .wp-block-site-tagline { margin: 0; font-size: 13px; color: #50584e; }
.librio-heading .wp-block-search { position: absolute; right: 20px; top: 20px; width: 190px; margin: 0; }
.librio-navigation { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 22px; border-block: 1px solid #c4cdc1; background: #e6edef url("images/nav-bg.gif") repeat-x left top / auto 100%; font-size: 14px; }
.librio-navigation > * { margin: 0; }
.librio-feed { flex-shrink: 0; }
.librio-layout { display: grid; grid-template-columns: minmax(0,3fr) minmax(0,1fr); gap: 0; }
.librio-main { min-width: 0; padding: 24px; background: #fff; }
.librio-layout > aside { margin: 0; min-width: 0; background: #e6edef;
}
.librio-sidebar { padding: 20px 16px; font: 12px/18px Helvetica, Arial, Geneva, "Microsoft YaHei", sans-serif; color: #555; overflow-wrap: anywhere; }
.librio-sidebar h2 { font: bold 14px Verdana, sans-serif; margin-bottom: 5px; }
.librio-sidebar > h2:not(:first-child)::before {
 content: ""; display: block; height: 2px; margin: 0 0 18px;
 background: url("images/sidebar-block-bg.gif") no-repeat center / min(184px, 100%) 2px;
}
.librio-sidebar .wp-block-latest-posts { margin: 0; padding: 0; font-size: 14px; line-height: 21px; }
.librio-sidebar .wp-block-latest-posts li { margin: 0; font: inherit; }
.librio-sidebar .wp-block-latest-posts a { font: inherit; }
.librio-sidebar img { max-width: 100%; height: auto; }
.librio-post { margin-block: 0 40px; }
.librio-main .wp-block-post-title { margin-block: 0 10px; color: #333; font: 400 22px/26px Helvetica, Arial, Geneva, "Microsoft YaHei", sans-serif; }
.librio-meta { clear: both; color: #777; padding: 3px 5px; margin-bottom: 20px; border-block: 1px solid #bdccdc; background: #e9eff5; gap: 3px 8px; }
.librio-meta > * { margin: 0; }
.librio-footer { padding: 14px 20px; border-top: 1px solid #c4cdc1; background: transparent;
 font-size: 12px; text-align: center; overflow-wrap: anywhere; }
.librio-footer p { margin: 4px 0; }
.librio-footer img { vertical-align: middle; }
.wp-block-post-content { overflow-wrap: anywhere; }
.wp-block-post-content img { max-width: 100%; height: auto; }
.wp-block-post-content iframe, .wp-block-post-content video { max-width: 100%; }
.wp-block-post-content pre { max-width: 100%; overflow-x: auto; white-space: pre; padding: 16px; background: #eef3f7; border: 1px solid #d9e2e8; border-radius: 4px; font: 14px/1.6 ui-monospace, SFMono-Regular, Consolas, monospace; }
.wp-block-post-content :not(pre) > code { background: #eef3f7; padding: 2px 4px; overflow-wrap: anywhere; }
.wp-block-post-content pre code { padding: 0; background: transparent; overflow-wrap: normal; }
.wp-block-post-content table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.wp-block-post-content th, .wp-block-post-content td { padding: 8px; border: 1px solid #ccd3ca; }
.wp-block-post-content blockquote { margin-inline: 0; padding: 8px 18px; border-left: 3px solid #8a9e82; background: #f3f6f1; }
.wp-block-post-content .alignwide, .wp-block-post-content .alignfull { max-width: 100%; margin-inline: 0; }
.librio-comments { margin-top: 36px; border-top: 1px solid #d6ded4; padding-top: 20px; }
.librio-comment { margin-block: 18px; padding-left: 12px; border-left: 2px solid #d6ded4; }
input, textarea, select, button { font: inherit; max-width: 100%; }
textarea { width: 100%; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid #395ba8; outline-offset: 3px; }
@media (max-width: 1024px) { .wp-site-blocks { margin: 12px; } }
@media (max-width: 781px) {
 .wp-site-blocks { margin: 0; border-radius: 0; }
 .librio-layout { grid-template-columns: minmax(0,1fr); }
 .librio-main { padding: 20px 16px; }
 .librio-heading { padding: 16px; }
 .librio-heading .wp-block-site-title { padding-right: 0; }
 .librio-heading .wp-block-search { position: static; width: 100%; margin-top: 12px; }
 .librio-navigation { padding-inline: 16px; }
 .wp-block-post-title { overflow-wrap: anywhere; }
}
/* Classic caption shortcodes have inline pixel widths; constrain the wrapper too. */
.wp-block-post-content .wp-caption { max-width: 100%; margin-inline: 0; }
.wp-block-post-content .wp-caption img { max-width: 100%; height: auto; }
.librio-main { overflow-wrap: anywhere; }
.librio-legacy-excerpt .wp-block-post-excerpt__excerpt { display: flow-root; }
.librio-legacy-excerpt img { max-width: 100%; height: auto; }
.librio-legacy-excerpt .alignleft { float: left; margin: 0 16px 8px 0; }
.librio-legacy-excerpt .alignright { float: right; margin: 0 0 8px 16px; }

/* Restore Librio typography while retaining the larger responsive content padding. */
.librio-post, .wp-block-post-content, .librio-meta {
 font: 14px/1.5 "Times New Roman", "Microsoft YaHei", serif;
}
.wp-block-post-content p, .librio-legacy-excerpt .wp-block-post-excerpt__excerpt p {
 margin-block: 0 10px; text-indent: 2em;
}
.librio-legacy-excerpt p.wp-block-post-excerpt__excerpt { margin-block: 0 10px; text-indent: 2em; }
.librio-legacy-excerpt .wp-block-post-excerpt__more-text { text-indent: 0; }
.wp-block-post-content :is(h1,h2,h3,h4,h5,h6) {
 font-family: Helvetica, Arial, Geneva, "Microsoft YaHei", sans-serif; font-weight: 400; color: #333;
}
.wp-block-post-content h1 { font-size: 22px; line-height: 26px; margin-bottom: 10px; }
.wp-block-post-content h2 { font-size: 20px; line-height: 24px; margin-bottom: 7px; }
.wp-block-post-content h3 { font-size: 18px; line-height: 22px; margin-bottom: 5px; }
.wp-block-post-content h4 { font-size: 16px; line-height: 20px; margin-bottom: 5px; }
.wp-block-post-content h5 { font-size: 14px; line-height: 18px; margin-bottom: 5px; }
.wp-block-post-content h6 { font-size: 12px; line-height: 16px; margin-bottom: 5px; }
.wp-site-blocks a, .editor-styles-wrapper a { color: #5371c5; text-decoration: none; }
.wp-site-blocks a:visited, .editor-styles-wrapper a:visited { color: #5371c5; }
.wp-site-blocks a:hover, .editor-styles-wrapper a:hover { text-decoration: underline; }
.librio-main .wp-block-post-title a, .librio-main .wp-block-post-title a:visited,
.librio-main .wp-block-post-title a:hover { color: #333; text-decoration: none; }
.librio-meta a, .librio-meta a:visited { color: #333; text-decoration: none; }
.librio-meta a:hover { color: #555; text-decoration: none; }
.librio-heading .wp-block-site-title a { color: #333; text-decoration: none; }
.librio-sidebar a, .librio-sidebar a:visited { color: #333; text-decoration: none; }
.librio-sidebar a:hover { color: #777; text-decoration: none; }

/* Original Librio skins at native pixel size. No slicing or resampling. */
.wp-site-blocks { max-width: 1024px; }
.librio-heading {
 min-height: 53px; padding: 12px 15px; padding-right: 215px;
 border-image: none;
 background: #bcbcbc url("images/header-bg.gif") no-repeat center top;
}
.librio-heading .wp-block-site-title {
 display: inline; padding-right: 0; font: 24px/29px Verdana, sans-serif;
}
.librio-heading .wp-block-site-title a { text-shadow: 1px 1px 1px #fff; }
.librio-heading .wp-block-site-tagline {
 display: inline; margin-left: 10px; font-size: 11px; color: #777;
}
.librio-heading .wp-block-search { top: 15px; right: 10px; width: 193px; }
.librio-heading .wp-block-search__inside-wrapper { padding: 0; border: 0; }
.librio-heading .wp-block-search__input {
 width: 193px; height: 24px; min-width: 0; border: 0; border-radius: 0;
 padding: 5px 4px 5px 23px; font: 12px/14px Verdana, sans-serif; color: #777;
 background: #fafafa url("images/search-bg.gif") no-repeat left top;
}
/* Keep the submit control available to keyboard and screen-reader users. */
.librio-heading .wp-block-search__button {
 position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
 overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.librio-heading .wp-block-search__button:focus-visible {
 position: static; width: auto; height: auto; margin: 0; padding: 2px;
 overflow: visible; clip-path: none;
}
.librio-navigation {
 min-height: 32px; padding-block: 5px; border: 0;
 background: #fafafa url("images/nav-bg.gif") repeat-x left top;
}
.librio-layout { grid-template-columns: minmax(0, 1fr) 256px; }
.librio-layout > aside {
 border-image: none;
 background: #d6ded4 url("images/sidebar-bg.gif") repeat-y right top;
}
.librio-sidebar > h2:not(:first-child)::before {
 background: url("images/sidebar-block-bg.gif") no-repeat center;
}
.librio-footer {
 border: 0; border-image: none; min-height: 29px;
 padding: 0 15px;
 background: #bcbcbc url("images/footer-bg.gif") no-repeat center bottom;
}
@media (max-width: 781px) {
 .librio-heading { padding: 12px 16px; }
 .librio-heading .wp-block-site-title { display: block; }
 .librio-heading .wp-block-site-tagline { display: block; margin-left: 0; }
 .librio-heading .wp-block-search { position: static; width: 193px; margin-top: 10px; }
 .librio-layout { grid-template-columns: minmax(0, 1fr); }
 .librio-layout > aside { background-color: #e6edef; }
}

.librio-footer p { display: inline; line-height: 29px; margin: 0 8px; }
.librio-footer a, .librio-footer a:visited, .librio-footer a:hover {
 color: #555; text-decoration: underline;
}

/* Original decorative icons at native size. */
.librio-main .wp-block-post-title {
 padding-left: 23px;
 background: url("images/post.gif") no-repeat left 6px;
}
.librio-feed a {
 display: inline-block; padding-left: 20px;
 background: url("images/feed.gif") no-repeat left 3px;
}
.librio-sidebar .wp-block-latest-posts li,
.librio-sidebar .wp-block-categories-list li,
.librio-sidebar .wp-block-archives-list li {
 padding-left: 18px;
 background: url("images/arrow.gif") no-repeat left 3px;
 list-style: none;
}
/* Repeat native pixels in the middle; retain the original edge pixels at 1000px. */
@media (min-width: 782px) {
 .librio-heading {
  border-image: url("images/header-bg.gif") 10 10 0 10 fill / 10px 10px 0 10px / 0 repeat;
  background: transparent;
 }
 .librio-footer {
  border-image: url("images/footer-bg.gif") 0 10 10 10 fill / 0 10px 10px 10px / 0 repeat;
  background: transparent;
 }
}

/* Extend the sidebar's flat middle, while keeping native-pixel edge images. */
.librio-layout > aside {
 position: relative; isolation: isolate; background: #e6edef;
}
.librio-layout > aside::before {
 content: ""; position: absolute; inset: 0 0 0 auto; width: min(194px, 100%);
 background: url("images/sidebar-bg.gif") repeat-y right top;
 pointer-events: none; z-index: -1;
}
.librio-layout > aside::after {
 content: ""; position: absolute; inset: 0 auto 0 0; width: 6px;
 background: url("images/sidebar-bg.gif") repeat-y -700px top;
 pointer-events: none; z-index: -1;
}
