/*
Theme Name: Monoread
Author: 構文野郎
Author URI: https://mymlan.com/
Description: A quiet, independent WordPress block theme for essays, translation readers, wide figures, and interactive HTML.
Version: 0.5.1
Requires at least: 6.5
Requires PHP: 7.4
Text Domain: monoread
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/
:root { --mr-ink:#242424; --mr-muted:#777; --mr-line:#eaeaea; --mr-paper:#fff; }
html { scroll-behavior:auto; }
body { -webkit-font-smoothing:antialiased; }
a { text-underline-offset: .18em; text-decoration-thickness: .05em; }
a:hover { opacity:.76; }
:focus-visible { outline:2px solid currentColor; outline-offset:4px; }
.wp-site-blocks { min-height:100vh; display:flex; flex-direction:column; }
.wp-site-blocks > footer { margin-top:auto; }
.mr-header { padding:18px clamp(18px,4vw,44px); }
.mr-header-inner { display:flex; gap:20px; flex-wrap:wrap; justify-content:space-between; align-items:center; max-width:1160px; margin-inline:auto; }
.mr-header .wp-block-site-title { --mr-site-title-size:var(--wp--custom--monoread--header-title-size, 32px); --mr-site-title-weight:var(--wp--custom--monoread--header-title-weight, 750); --mr-site-title-leading:var(--wp--custom--monoread--header-title-leading, 1.25); --mr-site-title-tracking:var(--wp--custom--monoread--header-title-tracking, -.04em); margin:0; }
.mr-header .wp-block-site-title a { text-decoration:none; }
.mr-header .wp-block-navigation { font-size:13px; }
.mr-footer { padding:25px 18px; color:var(--mr-muted); font-size:12px; }
.mr-footer .wp-block-site-title { --mr-site-title-size:inherit; --mr-site-title-weight:500; --mr-site-title-leading:inherit; --mr-site-title-tracking:inherit; }
.mr-article, .mr-page { padding:76px 20px 100px; }
.mr-article-header { padding-bottom:26px; border-bottom:1px solid var(--mr-line); margin-bottom:36px; }
.mr-article-title { --mr-post-title-weight:750; overflow-wrap:anywhere; }
.mr-meta { color:var(--mr-muted); font-size:13px; }
.mr-article-body { overflow-wrap:anywhere; }
/* Gutenberg owns block-to-block spacing through theme.json (blockGap: 1em).
   Do not add separate sibling margins or heading top margins here. */

.mr-article-body blockquote:not(.wp-block-quote) { border-left:2px solid #888; padding-left:1.4em; margin-left:0; }
.mr-article-body :is(img, video, iframe) { max-width:100%; }
.mr-article-body figure { margin-inline:0; }
.mr-article-body figcaption { color:var(--mr-muted); font-size:12px; }
.mr-article-body pre, .mr-article-body .wp-block-table { overflow-x:auto; }
.mr-article-body pre:not(.wp-block-code), .mr-article-body code:not(.wp-block-code code) { font-size:.85em; }
.mr-article-body .wp-block-separator { border-color:var(--mr-line); opacity:1; padding:0; }
.mr-back { margin-top:60px; padding-top:20px; border-top:1px solid var(--mr-line); font-size:13px; }
.mr-index { padding:70px 20px 100px; }
.mr-index-title { font-size:clamp(28px,5vw,42px); letter-spacing:-.035em; line-height:1.25; margin-bottom:38px; }
.mr-feed { margin:0; padding:0; }
.mr-feed-item { padding:28px 0 30px; border-bottom:1px solid var(--mr-line); }
.mr-feed-item:first-child { border-top:1px solid var(--mr-line); }
.mr-feed-item .wp-block-post-title { margin:0 0 10px; font-size:23px; line-height:1.45; }
.mr-feed-item .wp-block-post-title a { text-decoration:none; }
.mr-feed-item .wp-block-post-excerpt { color:#555; font-size:14px; line-height:1.85; }
.mr-feed-item .wp-block-post-excerpt__more-link { display:none; }
.mr-feed-item .wp-block-post-date { color:var(--mr-muted); font-size:12px; }
.mr-feed .wp-block-query-pagination { padding-top:32px; font-size:13px; }
/* Reading layout: no global theme sticky elements; reader owns its UI. */
.mr-standard { padding:38px 16px 92px; }
.mr-standard .mr-article-header { margin-bottom:22px; }

.mr-standard .mr-article-body > * { max-width:100%; }
/* Wide layout allows WP alignwide/full plus long tables and diagrams. */
.mr-wide { padding:50px 20px 96px; }

.mr-wide .wp-block-post-content > .alignwide { max-width:min(1200px, 100%); }
/* Blank canvas: article title/header/footer deliberately absent. */
.mr-canvas { width:100%; min-width:0; padding:0; margin:0; }
.mr-canvas > .wp-block-post-content { min-width:0; }
.mr-canvas .wp-block-html { max-width:none; }
.mr-canvas img, .mr-canvas svg, .mr-canvas math { max-width:100%; }
/* WordPress content insertion: do not override scoped reader UI controls */
@media(max-width:640px) {
 .mr-header { padding:14px 16px; }
 .mr-header-inner { align-items:flex-start; }
 .mr-header .wp-block-navigation { font-size:12px; }
 .mr-article, .mr-page { padding:44px 16px 76px; }
 .mr-standard { padding:20px 10px 65px; }
 .mr-wide { padding:30px 12px 70px; }


 .mr-feed-item .wp-block-post-title { font-size:20px; }
 .mr-index { padding:44px 16px 75px; }
}

/* Monoread 0.2: note-like reading with extension-friendly surfaces. */
:root {
  --mr-standard-width:620px;
  --mr-reader-width:850px;
  --mr-wide-width:920px;
  --mr-glass-bg:rgba(255,255,255,.1);
  --mr-glass-blur:5px;
  --mr-screen-gutter:clamp(12px,3vw,36px);
}
/* Featured artwork belongs above the title: no featured image => no visible element. */
.mr-featured { margin:0 0 clamp(28px,4vw,44px); }
.mr-featured img { display:block; width:100%;height:auto; border-radius:0; }
.mr-article-header { border-bottom:0; padding-bottom:0; margin-bottom:38px; }
.mr-article-title { margin-bottom:.6em; }
.mr-meta { gap:.65em; }
/* Long prose is the default; rich elements inherit it rather than create a separate visual mode. */
.mr-article-body :where(.wp-block-table, .wp-block-image, .wp-block-gallery, .wp-block-embed, figure.source-figure) { margin-block:1.8em; }
.mr-article-body .wp-block-table { overflow-x:auto; -webkit-overflow-scrolling:touch; max-width:100%; }
.mr-article-body .wp-block-table table { width:100%; border-collapse:collapse; font-size:.9em; line-height:1.7; }
.mr-article-body .wp-block-table :is(th,td) { padding:.75em .85em; border:0; border-bottom:1px solid var(--mr-line); vertical-align:top; }
.mr-article-body .wp-block-table th { text-align:left; font-weight:650; }
.mr-article-body .wp-block-table.is-style-mr-minimal table { border-top:1px solid var(--mr-line); }
.mr-article-body .wp-block-table.is-style-mr-scroll { overflow-x:auto; }
.mr-article-body .wp-block-table.is-style-mr-scroll table { width:max-content; min-width:100%; }
.mr-article-body :is(.mr-horizontal-scroll, .mr-math-scroll) { max-width:100%;overflow-x:auto;overscroll-behavior-inline:contain;-webkit-overflow-scrolling:touch; }
.mr-article-body math { max-width:none; }
.mr-article-body figure :is(img,svg) { display:block; height:auto;max-width:100%;margin-inline:auto; }
.mr-article-body details.mr-fold { border-top:1px solid var(--mr-line);border-bottom:1px solid var(--mr-line);padding:.7em 0; }
.mr-article-body details.mr-fold summary { cursor:pointer; font-size:.85em; }
.mr-article-body .mr-note { font-size:.84em;line-height:1.85;color:#555; }
/* Thin glass is an opt-in design material, not compulsory styling for every widget. */
.mr-glass { background:var(--mr-glass-bg);-webkit-backdrop-filter:blur(var(--mr-glass-blur));backdrop-filter:blur(var(--mr-glass-blur)); }
.mr-glass-rail { position:relative;left:50%;width:100vw;max-width:none;margin-left:-50vw;margin-right:0;box-sizing:border-box;
  padding-inline:max(var(--mr-screen-gutter),env(safe-area-inset-left));
  background:var(--mr-glass-bg);-webkit-backdrop-filter:blur(var(--mr-glass-blur));backdrop-filter:blur(var(--mr-glass-blur)); }
/* Reader CSS/JS owns all gestures and sticky behavior. The theme never intercepts pointer/touch/wheel. */
.mr-standard .mr-article-body, .mr-wide .mr-article-body { min-width:0; }
.mr-standard .wp-block-post-content, .mr-wide .wp-block-post-content { min-width:0; }
/* Optional true full-bleed embed surface for block editor + independent interactive HTML. */
.mr-article-body .mr-bleed, .mr-standard .mr-bleed, .mr-wide .mr-bleed { position:relative;left:50%;width:100vw;max-width:none;margin-left:-50vw;box-sizing:border-box; }
/* No forced max-width on wide embedded tables/diagrams; scrolling belongs to the local wrapper. */
.mr-article-body .mr-wide-data { width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch; }
.mr-article-body .mr-wide-data > table { width:max-content;min-width:100%; }
@media (max-width:640px) {
  .mr-article-header { margin-bottom:28px; }
  .mr-featured { margin-bottom:24px; }
  .mr-article-body .wp-block-table :is(th,td) { padding:.55em .65em; }
}
@media (prefers-reduced-motion:reduce) {
  .mr-glass, .mr-glass-rail { transition:none; }
}


/* v0.3.4 — default note-like 620px article column,
   optional empty rails, and per-post WordPress account identity. */
.mr-standard { --mr-reader-width:620px; padding:54px clamp(16px,2.5vw,36px) 110px; }
.mr-reading-grid { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,620px) minmax(0,1fr); column-gap:clamp(20px,2.8vw,48px); align-items:start; width:100%; max-width:1580px; margin-inline:auto; }
.mr-reading-grid > .mr-reading-center { min-width:0; width:100%; max-width:620px; margin:0; }
.mr-reading-grid > :is(.mr-reading-left,.mr-reading-right) { min-width:0; margin:0; }
.mr-standard .mr-featured { margin:0 0 72px; }
.mr-standard .mr-featured img { width:100%; height:auto; display:block; }
.mr-standard .mr-article-header { margin:0 0 56px; padding:0; border:0; }
.mr-standard .mr-article-title { --mr-post-title-weight:700; margin:0 0 16px; }

.mr-standard .mr-article-body > * { max-width:100%; }
/* v0.2.5: inline-only shortcode HTML. Use one flex row and one two-line stack.
   In particular, do not permit global block spacing to separate the avatar from
   its label/date. This remains scoped to the standard article header. */
.mr-standard .mr-reading-identity {
  display:inline-flex !important;
  align-items:center;
  gap:8px;
  width:100%;
  min-width:0;
  min-height:32px;
  margin:0 !important;
  color:var(--mr-muted);
  vertical-align:middle;
}
.mr-standard .mr-reading-identity-avatar {
  flex:0 0 32px;
  width:32px;
  height:32px;
  display:block;
  border-radius:50%;
  overflow:hidden;
  margin:0 !important;
}
.mr-standard .mr-reading-author-avatar { display:block; width:32px; height:32px; border-radius:50%; }
.mr-standard .mr-reading-identity-details {
  display:flex !important;
  flex:1 1 auto;
  min-width:0;
  flex-direction:column;
  justify-content:center;
  gap:2px;
  margin:0 !important;
}
.mr-standard .mr-reading-identity-name {
  display:block;
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:var(--mr-ink);
  text-decoration:none;
  font-weight:600;
  font-size:12px;
  line-height:15px;
}
.mr-standard .mr-reading-identity-name:hover { text-decoration:underline; }
.mr-standard .mr-reading-identity-dates {
  display:flex;
  align-items:baseline;
  gap:0;
  min-width:0;
  font-size:11px;
  line-height:14px;
  color:var(--mr-muted);
  white-space:nowrap;
}
.mr-standard .mr-reading-identity-dates > time { flex:none; }
.mr-standard .mr-reading-modified { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.mr-standard .mr-reading-rail-content { max-width:260px; }
/* Rails do not squeeze the reading column on tablets or phones. */
@media (max-width:1140px) {
 .mr-reading-grid { grid-template-columns:minmax(0,620px); justify-content:center; column-gap:0; }
 .mr-reading-left,.mr-reading-right { display:none; }
}
@media (max-width:640px) {
 .mr-standard { padding:26px 16px 76px; }
 .mr-standard .mr-featured { margin-bottom:42px; }

 .mr-standard .mr-article-header { margin-bottom:48px; }
 .mr-standard .mr-reading-identity-dates { font-size:10.5px; }
}

/* Note reference: article width and viewport padding are distinct controls.
   At tablet widths the article contracts inside 40px gutters;
   on phones gutters contract to 16px. No padding is inserted inside the 620px article. */
@media (min-width:641px) and (max-width:768px) {
  .mr-standard { padding-inline:40px; }
}

/* WordPress may insert an empty paragraph between shortcode nodes. */
/* WordPress shortcode rendering can inject a paragraph between the avatar
   and details. It is not an authored part of the account display. */
.mr-standard .mr-reading-identity > p { display:none !important; }
/* Suppress block-flow margins inside the compact author header. */
.mr-standard .mr-article-header > .wp-block-shortcode,
.mr-standard .mr-article-header > .mr-reading-identity { margin-block-start:0 !important; }
.mr-standard .mr-reading-identity > :is(.mr-reading-identity-avatar,.mr-reading-identity-details) { margin:0 !important; }
/* Maintain hierarchy without enlarging the body text. */


/* v0.3.6: Gutenberg blockGap (theme.json: 1em) is the single source
   of vertical spacing for paragraph, heading and separator blocks in every
   article template. Reset only trailing margins so they cannot add to gap.
   Critically, leave margin-block-start untouched: Gutenberg's layout engine
   assigns it to adjacent blocks. */
.mr-article-body :is(h1,h2,h3,h4,h5,h6,p,hr,.wp-block-separator) {
  margin-block-end:0;
}
.mr-article-body :is(hr,.wp-block-separator) { padding:0; }

/* 0.3.1: standard posts adopt the verified 620px reading frame.
   Standard-only afterword/navigation and comments remain inside the same column. */
.mr-standard .mr-standard-after {
  max-width:620px;
  width:100%;
  margin:0 auto;
  padding-top:32px;
  min-width:0;
}
.mr-standard .mr-standard-after .mr-back { margin-top:24px; }

/* 0.3.2: 920px wide article column, independent of the 620px reading template.
   The reader embedded inside a Custom HTML block remains responsible for its
   own typography, JavaScript, controls, and overflow behavior. */
.mr-wide {
  --mr-wide-width:920px;
  min-width:0;
}
.mr-wide > .wp-block-post-featured-image,
.mr-wide > .mr-article-header,
.mr-wide > .wp-block-post-content {
  width:100%;
  max-width:920px;
  min-width:0;
  margin-inline:auto;
}
.mr-wide .mr-article-body {
  min-width:0;
}
.mr-wide .mr-article-body > .wp-block-html {
  min-width:0;
  max-width:100%;
}
.mr-wide .mr-article-body > .alignwide {
  max-width:min(1160px,100%);
}
@media (max-width:960px) {
  .mr-wide { padding-inline:16px; }
}

/* v0.3.3: Full-width Gutenberg canvas. This is not the raw-HTML canvas.
   Default body blocks: 620px. Align wide: 920px. Align full: viewport.
   Site header/footer, title, WordPress author and standard block handling remain. */
.mr-fullwidth { width:100%; min-width:0; max-width:none; padding:0; margin:0; }
.mr-fullwidth > .mr-fullwidth-heading {
  box-sizing:border-box;
  width:100%; max-width:620px; margin-inline:auto;
  padding:54px 0 0;
}
.mr-fullwidth .mr-fullwidth-heading .mr-featured { margin-bottom:72px; }
.mr-fullwidth .mr-fullwidth-heading .mr-article-header { margin-bottom:56px; }
.mr-fullwidth > .mr-fullwidth-body {
  box-sizing:border-box;
  width:100%; max-width:none; min-width:0;
  margin:0; padding:0;
  /* Typography inherits the site-wide Gutenberg Global Styles. */
}
/* Do not cap alignwide/alignfull descendants. Gutenberg's layout engine
   establishes the 620/920/full widths from the post-content block settings. */
.mr-fullwidth .mr-fullwidth-body > .alignwide,
.mr-fullwidth .mr-fullwidth-body > .alignfull { max-width:none; }
.mr-fullwidth .mr-fullwidth-body > .alignfull { width:100%; }
.mr-fullwidth .mr-fullwidth-body > :is(.wp-block-group,.wp-block-columns,.wp-block-cover,.wp-block-html) { min-width:0; }
@media (max-width:660px) {
  .mr-fullwidth > .mr-fullwidth-heading { padding:26px 16px 0; }
  .mr-fullwidth .mr-fullwidth-heading .mr-featured { margin-bottom:42px; }
  .mr-fullwidth .mr-fullwidth-heading .mr-article-header { margin-bottom:48px; }
  .mr-fullwidth .mr-fullwidth-body > :not(.alignfull) { max-width:calc(100% - 32px); }
  .mr-fullwidth .mr-fullwidth-body > .alignwide { max-width:calc(100% - 32px); }
}

/* v0.3.4: Gutenberg layout patterns; never alter the baseline 620px typography. */
.mr-pattern-reading-column, .mr-pattern-wide-section { box-sizing:border-box; min-width:0; width:100%; margin-inline:auto; }
.mr-pattern-reading-column { max-width:620px; }
.mr-pattern-wide-section { max-width:920px; }
.mr-pattern-full-bleed { box-sizing:border-box; width:100%; max-width:none; min-width:0; }
@media (max-width:660px) {
  .mr-fullwidth .mr-pattern-reading-column,
  .mr-fullwidth .mr-pattern-wide-section { max-width:calc(100% - 32px); }
}

/* v0.3.7: article body font family, font size, and line height follow
   the site-wide theme.json Global Styles (and block-level overrides).
   Do not hard-code those values on post-content wrappers. */

/* v0.3.10 — sidebars anchored to the viewport edges.
   Center column remains exactly 620px or 920px, independent of viewport width.
   Each sidebar keeps 204px of readable content within a 252px minimum slot. */
:root { --mr-sidebar-slot:252px; --mr-sidebar-edge-padding:30px; --mr-sidebar-inner-padding:18px; --mr-sidebar-content:204px; }
.mr-reading-grid,
.mr-wide-grid {
  box-sizing:border-box;
  display:grid;
  align-items:start;
  column-gap:0;
  margin-inline:auto;
  width:100%;
  max-width:none;
}
.mr-reading-grid {
  grid-template-columns:minmax(var(--mr-sidebar-slot),1fr) minmax(0,620px) minmax(var(--mr-sidebar-slot),1fr);
}
.mr-wide-grid {
  grid-template-columns:minmax(var(--mr-sidebar-slot),1fr) minmax(0,920px) minmax(var(--mr-sidebar-slot),1fr);
}
.mr-reading-grid > .mr-reading-center,
.mr-wide-grid > .mr-wide-center {
  width:100%;
  min-width:0;
  margin:0;
}
.mr-wide-grid > .mr-wide-center { max-width:920px; }
.mr-reading-grid > :is(.mr-reading-left,.mr-reading-right),
.mr-wide-grid > :is(.mr-wide-left,.mr-wide-right) {
  box-sizing:border-box;
  min-width:0;
  width:100%;
  margin:0;
  padding-inline:0;
}
/* Padding is mirrored: 30px on the viewport edge, 18px toward the article.
   Combined padding remains 48px, preserving the 204px sidebar content width. */
:is(.mr-reading-grid,.mr-wide-grid) > :is(.mr-reading-left,.mr-wide-left) {
  padding-left:var(--mr-sidebar-edge-padding);
  padding-right:var(--mr-sidebar-inner-padding);
}
:is(.mr-reading-grid,.mr-wide-grid) > :is(.mr-reading-right,.mr-wide-right) {
  padding-left:var(--mr-sidebar-inner-padding);
  padding-right:var(--mr-sidebar-edge-padding);
}
:is(.mr-reading-grid,.mr-wide-grid) .mr-sidebar-content {
  box-sizing:border-box;
  max-width:var(--mr-sidebar-content);
  min-width:0;
  overflow-wrap:break-word;
}
:is(.mr-reading-grid,.mr-wide-grid) > :is(.mr-reading-left,.mr-wide-left) .mr-sidebar-content {
  margin-inline:0 auto;
}
:is(.mr-reading-grid,.mr-wide-grid) > :is(.mr-reading-right,.mr-wide-right) .mr-sidebar-content {
  margin-inline:auto 0;
}
.mr-wide .mr-wide-center > :is(.wp-block-post-featured-image,.mr-article-header,.wp-block-post-content) {
  box-sizing:border-box;
  width:100%;
  max-width:920px;
  min-width:0;
  margin-inline:auto;
}
/* Below each breakpoint hide both rails without affecting central content width. */
@media (min-width:1125px) {
  .mr-standard { padding-inline:0; }
}
@media (max-width:1124px) {
  .mr-reading-grid { grid-template-columns:minmax(0,620px); justify-content:center; }
  .mr-reading-grid > :is(.mr-reading-left,.mr-reading-right) { display:none; }
}
@media (min-width:1425px) {
  .mr-wide { padding-inline:0; }
}
@media (max-width:1424px) {
  .mr-wide-grid { grid-template-columns:minmax(0,920px); justify-content:center; }
  .mr-wide-grid > :is(.mr-wide-left,.mr-wide-right) { display:none; }
}

/* v0.3.10: author card defaults. Core blocks own their editable typography,
   dimensions and spacing attributes; only defensive layout rules live here. */
.mr-sidebar-author-card { box-sizing:border-box; min-width:0; }
.mr-sidebar-author-row { min-width:0; }
.mr-sidebar-author-row .wp-block-avatar { flex:0 0 auto; }
.mr-sidebar-author-row .wp-block-post-author-name { min-width:0; overflow-wrap:anywhere; }
.mr-sidebar-author-row .wp-block-post-author-name a { text-decoration:none; }
.mr-sidebar-author-card .wp-block-post-author-biography { overflow-wrap:anywhere; }

/* v0.3.11 — initial avatar shape: circle in the front end.
   The individual Avatar block remains freely editable in the Site Editor. */
.mr-sidebar-author-row .wp-block-avatar img,
.mr-sidebar-author-row .wp-block-avatar .wp-block-avatar__image {
  border-radius:50%;
  object-fit:cover;
  aspect-ratio:1 / 1;
}


/* Monoread 0.4.0 — viewport-aligned header, independently editable Gutenberg navigation. */
.mr-header {
  box-sizing:border-box;
  padding:12px 24px;
  width:100%;
}
.mr-header-inner {
  box-sizing:border-box;
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,620px) minmax(0,1fr);
  align-items:center;
  gap:0;
  max-width:none;
  width:100%;
  margin:0;
}
.mr-header-left, .mr-header-right { min-width:0; }
.mr-header-left { justify-self:start; }
.mr-header-right { justify-self:end; }
.mr-header .wp-block-navigation { font-size:13px; }
/* Keep the side areas editable; no fixed template-wide header max-width. */
@media (max-width:720px) {
  .mr-header { padding:12px 16px; }
  .mr-header-inner { grid-template-columns:minmax(0,1fr) auto; gap:12px; }
  .mr-header-center { display:none; }
  .mr-header .wp-block-site-title { --mr-site-title-size:clamp(22px,6vw,32px); }
}
/* Wide articles begin with the title and reader; provenance follows the text. */
.mr-wide-after { box-sizing:border-box; width:100%; max-width:920px; margin:56px auto 0; padding-top:20px; border-top:1px solid var(--mr-line); }
.mr-wide-after .mr-reading-identity { display:inline-flex; align-items:center; gap:8px; min-height:32px; font-size:12px; line-height:1.4; color:var(--mr-muted); }
.mr-wide-after .mr-reading-identity-avatar { width:32px; height:32px; flex:0 0 32px; }
.mr-wide-after .mr-reading-author-avatar { width:32px; height:32px; display:block; border-radius:50%; }
.mr-wide-after .mr-reading-identity-details { display:flex; flex-direction:column; gap:2px; min-width:0; }
.mr-wide-after .mr-reading-identity-name { font-weight:600; font-size:12px; color:var(--mr-ink); text-decoration:none; line-height:15px; }
.mr-wide-after .mr-reading-identity-dates { display:flex; gap:0; font-size:11px; line-height:14px; color:var(--mr-muted); }
.mr-wide-after .mr-reading-identity > p { display:none !important; }
.mr-sidebar-pattern { box-sizing:border-box; min-width:0; }
.mr-sidebar-pattern :is(.wp-block-heading,.mr-sidebar-pattern-heading) { font-size:14px; font-weight:700; line-height:1.45; }
.mr-sidebar-pattern .wp-block-latest-posts, .mr-sidebar-pattern .wp-block-categories-list { font-size:13px; line-height:1.5; }
.mr-sidebar-pattern .wp-block-search { font-size:13px; }
.mr-sidebar-pattern :is(.wp-block-latest-posts, .wp-block-categories-list) { padding-left:1em; }
.mr-sidebar-pattern .wp-block-search__inside-wrapper { min-width:0; }
@media(max-width:1424px) { .mr-wide-after { max-width:920px; } }
@media(max-width:960px) { .mr-wide-after { width:100%; } }

/* v0.4.1: reading primitives; global editor settings remain authoritative. */
/* Note-style quote: preserve WP's editable citation field, right aligned. */
:where(.mr-article-body .wp-block-quote) { box-sizing:border-box; }
.mr-article-body .wp-block-quote cite,
.mr-article-body .wp-block-quote .wp-block-quote__citation {
  display:block;
  margin-block-start:.8em;
  color:var(--mr-muted);
  font-size:.78em;
  font-style:normal;
  font-weight:400;
  line-height:1.5;
  text-align:right;
}
/* Do not style arbitrary <pre> in custom HTML readers; target the native code block. */
:where(.mr-article-body .wp-block-code) {
  box-sizing:border-box;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
  tab-size:2;
}
:where(.mr-article-body .wp-block-code code) {
  font-family:inherit;
  font-size:.85em;
  white-space:pre;
  overflow-wrap:normal;
}
/* Non-synchronized patterns, editable with core blocks. */
.mr-article-body .mr-link-card {
  box-sizing:border-box;
  border:1px solid var(--mr-line);
  border-radius:5px;
  padding:1em 1.2em;
  min-width:0;
  background:transparent;
}
.mr-article-body .mr-link-card .wp-block-heading {font-size:1em;line-height:1.5;letter-spacing:normal;}
.mr-article-body .mr-link-card p {font-size:.875em;line-height:1.6;}
.mr-article-body .mr-link-card a {overflow-wrap:anywhere;}
.mr-article-body .mr-link-card > * + * {margin-block-start:.5em;}
.mr-article-body .mr-callout {
  box-sizing:border-box;
  border-left:3px solid #d5d5d5;
  padding:.75em 1.1em;
  background:#f8f8f8;
}
.mr-article-body .mr-callout > * + * {margin-block-start:.5em;}
.mr-article-body .mr-callout .wp-block-heading {font-size:.95em;line-height:1.5;}

/* v0.4.2: article title inherits WordPress H1 typography from theme.json / Site Editor.
   No hard-coded font size or line height on .mr-article-title. */
/* Stable self-contained link cards: works in post body, wide and fullwidth. */
:where(.wp-block-monoread-link-card) {box-sizing:border-box;border:1px solid var(--mr-line);border-radius:5px;min-width:0;overflow:hidden;}
:where(.wp-block-monoread-link-card) .mr-autocard-link {display:flex;align-items:stretch;gap:12px;padding:14px 16px;color:inherit;text-decoration:none;}
:where(.wp-block-monoread-link-card) .mr-autocard-info {min-width:0;flex:1;display:flex;flex-direction:column;gap:6px;}
.wp-block-monoread-link-card .mr-autocard-title {font-size:1em;font-weight:700;line-height:1.45;letter-spacing:-.04em;font-feature-settings:"palt" 1;overflow-wrap:anywhere;}
:where(.wp-block-monoread-link-card) .mr-autocard-description {font-size:.82em;line-height:1.5;color:var(--mr-muted);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere;}
:where(.wp-block-monoread-link-card) .mr-autocard-domain {font-size:.75em;line-height:1.4;color:var(--mr-muted);overflow-wrap:anywhere;}
:where(.wp-block-monoread-link-card) .mr-autocard-thumb {display:block;width:108px;min-width:108px;max-height:108px;object-fit:cover;align-self:center;}
@media(max-width:440px) {:where(.wp-block-monoread-link-card) .mr-autocard-thumb {width:76px;min-width:76px;max-height:90px;}}
.editor-styles-wrapper .mr-autocard-editor {border:1px solid #e0e0e0;border-radius:5px;padding:14px;margin:12px 0;}
.editor-styles-wrapper .mr-autocard-editor .mr-autocard-preview {display:flex;gap:12px;align-items:center;margin:12px 0;}
.editor-styles-wrapper .mr-autocard-editor .mr-autocard-preview img {width:90px;height:70px;object-fit:cover;}

/* 0.4.3: block editor preview styles reside in assets/editor.css. */

/* v0.4.5: native code block copy UI; sticky within its own wrapper. */
.mr-article-body .mr-code-copy-wrap {position:relative;min-width:0;}
.mr-article-body .mr-code-copy-wrap > .wp-block-code {margin:0;max-width:100%;padding-block-start:2.65em;}
.mr-code-copy-bar {position:sticky;top:12px;z-index:1;height:34px;margin-bottom:-34px;display:flex;justify-content:flex-end;align-items:flex-start;padding:6px 8px 0;box-sizing:border-box;pointer-events:none;}
body.admin-bar .mr-code-copy-bar {top:44px;}
@media(max-width:782px){body.admin-bar .mr-code-copy-bar {top:58px;}}
.mr-code-copy-button {pointer-events:auto;cursor:pointer;border:0;border-radius:4px;background:#f7f7f7;color:#666;padding:3px 8px;font:inherit;font-size:11px;line-height:1.5;white-space:nowrap;}
.mr-code-copy-button:hover,.mr-code-copy-button:focus-visible {color:#242424;}
.mr-code-copy-status {position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;}

/* v0.4.4.12: compact icon-only copy control. */
.mr-code-copy-button {display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0;box-sizing:border-box;}
.mr-code-copy-button svg {display:block;flex:none;}

/* v0.5.1: imported note math typography; Core owns rendering and overflow. */
.wp-block-post-content .mr-note-math { font-size: 1.1em; }
.wp-block-post-content .mr-note-math-display { font-size: 1.4em; }
