/* ==========================================================================
   ILLRC Personal — post content & Gutenberg blocks
   Used on the front end inside .entry-content, and compiled into
   editor-style.css (scope .is-root-container) so the block editor shows
   the same typography. Edit this file, then keep editor-style.css in sync
   (see README-fa.md).
   ========================================================================== */

/* ---------- Base ---------- */
.entry-content {
  font-size: var(--entry-size, 17px);
  line-height: 2.15;
  color: var(--ink-2);
  overflow-wrap: break-word;
}
.entry-content::after { content: ''; display: table; clear: both; }
.entry-content > * { margin-block: 0; }
.entry-content > * + * { margin-block-start: 1.1em; }
.entry-content > :first-child { margin-block-start: 0; }

/* ---------- Paragraphs ---------- */
:where(.entry-content) p { margin: 0; text-align: justify; text-justify: inter-word; }
:where(.entry-content) p:empty:not([contenteditable]) { display: none; }
.entry-content .has-text-align-center { text-align: center; }
.entry-content .has-text-align-left { text-align: left; }
.entry-content .has-text-align-right { text-align: right; }
.entry-content .has-text-align-justify { text-align: justify; }

.entry-content .has-drop-cap:not(:focus)::first-letter {
  float: right; margin: .12em 0 0 .18em; font-size: 3.6em; line-height: .9; font-weight: 900; color: var(--gold-text); text-transform: none;
}
.entry-content p.has-background, .entry-content .wp-block-heading.has-background { padding: 1em 1.3em; border-radius: var(--radius-sm, 12px); }

/* Paragraph styles (registered in inc/blocks.php) */
.entry-content .is-style-illrc-lead { font-size: 1.16em; line-height: 2.05; font-weight: 500; color: var(--ink); }
.entry-content .is-style-illrc-note,
.entry-content .is-style-illrc-tip,
.entry-content .is-style-illrc-warning {
  position: relative; padding: 16px 52px 16px 20px; border-radius: 14px; font-size: .95em; line-height: 2; text-align: start;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--ink);
}
.entry-content .is-style-illrc-note::before,
.entry-content .is-style-illrc-tip::before,
.entry-content .is-style-illrc-warning::before {
  content: ''; position: absolute; top: 18px; right: 18px; width: 22px; height: 22px; background: center/contain no-repeat;
}
.entry-content .is-style-illrc-note { background: #EEF4F3; border-color: #C9DCD9; }
.entry-content .is-style-illrc-note::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2314474A' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v6M12 7.5v.01'/%3E%3C/svg%3E"); }
.entry-content .is-style-illrc-tip { background: var(--gold-soft); border-color: rgba(176, 138, 79, .4); }
.entry-content .is-style-illrc-tip::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2383612B' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18h6M10 21h4M12 3a6 6 0 0 0-3.5 10.9c.6.5 1 1.2 1 2.1h5c0-.9.4-1.6 1-2.1A6 6 0 0 0 12 3z'/%3E%3C/svg%3E"); }
.entry-content .is-style-illrc-warning { background: #FBF0EC; border-color: #EBCFC4; }
.entry-content .is-style-illrc-warning::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239A3B22' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3 2 20h20L12 3z'/%3E%3Cpath d='M12 10v4M12 17v.01'/%3E%3C/svg%3E"); }

/* ---------- Headings ---------- */
:where(.entry-content) h1, :where(.entry-content) h2, :where(.entry-content) h3, :where(.entry-content) h4, :where(.entry-content) h5, :where(.entry-content) h6 { color: var(--ink); font-weight: 800; line-height: 1.65; scroll-margin-top: 110px; text-align: start; }
.entry-content :where(h1, h2, h3, h4, h5, h6) { margin-block: 1.7em .5em; }
.entry-content > :where(h1, h2, h3, h4, h5, h6):first-child { margin-top: 0; }
.entry-content :where(h1, h2, h3, h4, h5, h6) + * { margin-top: .5em; }
.entry-content h1 { font-size: 1.85em; }
.entry-content h2 { font-size: 1.5em; }
.entry-content h3 { font-size: 1.26em; }
.entry-content h4 { font-size: 1.1em; }
.entry-content h5 { font-size: 1em; }
.entry-content h6 { font-size: .9em; color: var(--muted); letter-spacing: 0; }
.entry-content h2:not(.is-style-illrc-plain):not(.has-text-align-center)::before {
  content: ''; display: inline-block; width: .8em; height: .8em; margin-left: .4em; vertical-align: -.06em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23B08A4F' stroke-width='1.4'%3E%3Crect x='5.5' y='5.5' width='13' height='13'/%3E%3Crect x='5.5' y='5.5' width='13' height='13' transform='rotate(45 12 12)'/%3E%3Ccircle cx='12' cy='12' r='2.2'/%3E%3C/svg%3E") center/contain no-repeat;
}
.entry-content h3.is-style-illrc-underline, .entry-content h2.is-style-illrc-underline { padding-bottom: .35em; border-bottom: 2px solid var(--gold-soft); box-shadow: inset 0 -2px 0 0 transparent; }
.entry-content h2.is-style-illrc-underline::before { display: none; }

/* ---------- Links & inline text ---------- */
:where(.entry-content) a { color: var(--teal); text-decoration: underline; text-decoration-color: rgba(20, 71, 74, .3); text-decoration-thickness: 1px; text-underline-offset: 5px; transition: color .2s, text-decoration-color .2s; }
:where(.entry-content) a:hover { color: var(--gold-text); text-decoration-color: currentColor; }
:where(.entry-content) strong, :where(.entry-content) b { font-weight: 800; color: var(--ink); }
:where(.entry-content) em, :where(.entry-content) i, :where(.entry-content) cite, :where(.entry-content) dfn, :where(.entry-content) var { font-style: italic; }
:where(.entry-content) small { font-size: .82em; }
:where(.entry-content) s, :where(.entry-content) del, :where(.entry-content) strike { text-decoration: line-through; text-decoration-color: var(--gold); color: var(--muted); }
:where(.entry-content) ins { text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; background: transparent; }
:where(.entry-content) u { text-underline-offset: 5px; }
:where(.entry-content) mark:not(.has-inline-color) { padding: .05em .25em; border-radius: 4px; background: var(--gold-soft); color: var(--ink); box-shadow: inset 0 -.35em 0 rgba(176, 138, 79, .22); }
:where(.entry-content) mark.has-inline-color { padding: 0 .15em; border-radius: 3px; }
:where(.entry-content) sup, :where(.entry-content) sub { font-size: .7em; line-height: 0; }
:where(.entry-content) sup { color: var(--gold-text); font-weight: 700; }
:where(.entry-content) sup.fn, :where(.entry-content) .fn a, :where(.entry-content) sup a { text-decoration: none; }
:where(.entry-content) abbr[title] { text-decoration: underline dotted var(--gold); text-underline-offset: 4px; cursor: help; }
:where(.entry-content) q { quotes: '«' '»' '“' '”'; }
:where(.entry-content) code, :where(.entry-content) kbd, :where(.entry-content) samp { font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, 'Liberation Mono', monospace; font-size: .84em; }
:where(.entry-content) :not(pre) > code { padding: .12em .45em; border-radius: 6px; background: var(--chip); color: var(--teal-deep); direction: ltr; unicode-bidi: isolate; }
:where(.entry-content) kbd { display: inline-block; padding: .05em .45em; border: 1px solid var(--line); border-bottom-width: 3px; border-radius: 6px; background: var(--surface); color: var(--ink); line-height: 1.6; direction: ltr; unicode-bidi: isolate; }
:where(.entry-content) [lang]:not([lang^="fa"]):not([lang^="ar"]) { unicode-bidi: isolate; }
:where(.entry-content) img { max-width: 100%; height: auto; }
:where(.entry-content) p > img, :where(.entry-content) li > img { display: inline-block; vertical-align: middle; }

/* ---------- Lists ---------- */
:where(.entry-content) ul, :where(.entry-content) ol { padding-right: 1.5em; padding-left: 0; margin-block: 0; }
.entry-content li + li { margin-top: .4em; }
.entry-content li > :where(ul, ol) { margin-top: .4em; }
:where(.entry-content) ul { list-style: disc; }
:where(.entry-content) ul ul { list-style: circle; }
:where(.entry-content) ul ul ul { list-style: square; }
:where(.entry-content) ol { list-style: persian; }
:where(.entry-content) ol[type="a"], :where(.entry-content) ol[type="A"] { list-style-type: arabic-indic; }
:where(.entry-content) ol[type="i"] { list-style-type: lower-roman; }
:where(.entry-content) ol[type="I"] { list-style-type: upper-roman; }
:where(.entry-content) li::marker { color: var(--gold); font-weight: 700; }
.entry-content .wp-block-list.has-background { padding: 1em 2.4em 1em 1.3em; border-radius: 12px; }

.entry-content ul.is-style-illrc-check { list-style: none; padding-right: 0; }
.entry-content ul.is-style-illrc-check > li { position: relative; padding-right: 1.9em; }
.entry-content ul.is-style-illrc-check > li::before {
  content: ''; position: absolute; right: 0; top: .5em; width: 1.15em; height: 1.15em; border-radius: 50%; background: var(--gold-soft) center/70% no-repeat;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2383612B' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}
.entry-content ul.is-style-illrc-rosette { list-style: none; padding-right: 0; }
.entry-content ul.is-style-illrc-rosette > li { position: relative; padding-right: 1.7em; }
.entry-content ul.is-style-illrc-rosette > li::before {
  content: ''; position: absolute; right: 0; top: .62em; width: .95em; height: .95em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23B08A4F' stroke-width='1.6'%3E%3Crect x='5.5' y='5.5' width='13' height='13'/%3E%3Crect x='5.5' y='5.5' width='13' height='13' transform='rotate(45 12 12)'/%3E%3C/svg%3E") center/contain no-repeat;
}
.entry-content ol.is-style-illrc-steps { list-style: none; padding-right: 0; counter-reset: illrc-step; }
.entry-content ol.is-style-illrc-steps > li { position: relative; padding-right: 2.6em; counter-increment: illrc-step; min-height: 1.8em; }
.entry-content ol.is-style-illrc-steps > li::before {
  content: counter(illrc-step, persian); position: absolute; right: 0; top: .2em; width: 1.8em; height: 1.8em; display: grid; place-items: center;
  border-radius: 50%; background: var(--teal); color: #fff; font-size: .82em; font-weight: 800; line-height: 1;
}
.entry-content ol.is-style-illrc-refs { font-size: .9em; line-height: 2; color: var(--ink-2); }
.entry-content ol.is-style-illrc-refs > li { padding-right: .3em; unicode-bidi: plaintext; text-align: right; }

/* Description lists */
:where(.entry-content) dl { margin: 0; }
:where(.entry-content) dt { font-weight: 800; color: var(--ink); }
:where(.entry-content) dd { margin: 0 1.4em .6em 0; }

/* ---------- Quote ---------- */
.entry-content .wp-block-quote,
.entry-content > blockquote {
  margin-inline: 0; padding: 32px 40px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); text-align: center;
  font-size: 1.15em; line-height: 2; font-weight: 700; color: var(--ink); position: relative;
}
.entry-content .wp-block-quote::before,
.entry-content > blockquote::before {
  content: ''; display: block; width: 34px; height: 34px; margin: 0 auto 10px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23B08A4F' d='M10 7H6.5A2.5 2.5 0 0 0 4 9.5V13h4.5v4H10zM20 7h-3.5A2.5 2.5 0 0 0 14 9.5V13h4.5v4H20z'/%3E%3C/svg%3E") center/contain no-repeat;
}
.entry-content .wp-block-quote p,
.entry-content > blockquote p { text-align: inherit; }
.entry-content .wp-block-quote > * + *,
.entry-content > blockquote > * + * { margin-top: .7em; }
.entry-content .wp-block-quote :where(cite, footer),
.entry-content blockquote :where(cite, footer) { display: block; margin-top: 12px; font-size: .74em; font-style: normal; font-weight: 500; color: var(--muted); }
.entry-content .wp-block-quote cite::before { content: '— '; color: var(--gold); }
.entry-content .wp-block-quote.has-text-align-right,
.entry-content .wp-block-quote.has-text-align-left { text-align: start; }
.entry-content .wp-block-quote.has-text-align-right::before,
.entry-content .wp-block-quote.has-text-align-left::before { margin-right: 0; }

/* core "plain" quote style + simple nested blockquotes */
.entry-content .wp-block-quote.is-style-plain,
.entry-content > blockquote blockquote,
.entry-content :is(li, td, .wp-block-column, .wp-block-group) > blockquote:not(.wp-block-quote),
.entry-content .wp-block-quote .wp-block-quote {
  padding: 4px 22px 4px 0; border: 0; border-right: 3px solid var(--gold); border-radius: 0; background: transparent;
  text-align: start; font-size: 1.02em; font-weight: 500; color: var(--ink);
}
.entry-content .wp-block-quote.is-style-plain::before,
.entry-content .wp-block-quote .wp-block-quote::before,
.entry-content > blockquote blockquote::before,
.entry-content :is(li, td, .wp-block-column, .wp-block-group) > blockquote:not(.wp-block-quote)::before { display: none; }
.entry-content .wp-block-quote.is-style-plain { padding-right: 22px; }
.entry-content .wp-block-quote.has-background { border-color: transparent; }

/* ---------- Pullquote ---------- */
.entry-content .wp-block-pullquote {
  margin-inline: 0; padding: 30px 24px; border: 0; border-top: 3px solid var(--gold); border-bottom: 3px solid var(--gold); border-radius: 0;
  background: transparent; text-align: center; color: var(--teal);
}
.entry-content .wp-block-pullquote blockquote { margin: 0; padding: 0; border: 0; background: none; font-size: 1.4em; line-height: 1.9; font-weight: 800; color: inherit; }
.entry-content .wp-block-pullquote blockquote::before { display: none; }
.entry-content .wp-block-pullquote p { text-align: inherit; font-size: inherit; line-height: inherit; }
.entry-content .wp-block-pullquote cite { display: block; margin-top: 12px; font-size: .56em; font-weight: 500; font-style: normal; color: var(--muted); text-transform: none; }
.entry-content .wp-block-pullquote.has-background { padding: 34px 28px; border: 0; border-radius: 20px; }
.entry-content .wp-block-pullquote.alignleft, .entry-content .wp-block-pullquote.alignright { max-width: 46%; padding: 18px 0; }
.entry-content .wp-block-pullquote.alignleft blockquote, .entry-content .wp-block-pullquote.alignright blockquote { font-size: 1.1em; }

/* ---------- Code, preformatted, verse ---------- */
.entry-content pre { margin-inline: 0; max-width: 100%; overflow-x: auto; }
.entry-content .wp-block-code,
.entry-content pre:not([class]) {
  padding: 18px 22px; border-radius: 14px; background: #10292B; color: #E8EFEE; border: 0;
  font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, 'Liberation Mono', monospace; font-size: .82em; line-height: 1.85;
  direction: ltr; text-align: left; white-space: pre; tab-size: 4;
}
.entry-content .wp-block-code code { display: block; padding: 0; background: none; color: inherit; font-size: inherit; direction: ltr; white-space: inherit; overflow-wrap: normal; }
.entry-content .wp-block-preformatted {
  padding: 18px 22px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink);
  font-family: inherit; font-size: .94em; line-height: 2; white-space: pre-wrap; text-align: start;
}
.entry-content .wp-block-verse {
  padding: 6px 22px 6px 0; border: 0; border-right: 3px solid var(--gold-soft); background: none; color: var(--ink);
  font-family: inherit; font-size: 1.04em; line-height: 2.35; white-space: pre-wrap; overflow: visible; text-align: start;
}
.entry-content .wp-block-verse.is-style-illrc-poem {
  padding: 26px 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); text-align: center; font-weight: 600; line-height: 2.5;
}
.entry-content .wp-block-verse.has-background { padding: 20px 24px; border-right: 0; border-radius: 14px; }

/* Two-hemistich Persian poem (pattern "شعر دو مصراعی") */
.entry-content .illrc-poem {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .3em 2.5em; padding: 22px 26px;
  border-radius: 18px; background: var(--surface); border: 1px solid var(--line); font-weight: 600; color: var(--ink);
}
.entry-content .illrc-poem > .wp-block-group__inner-container { display: contents; }
.entry-content .illrc-poem > *, .entry-content .illrc-poem > .wp-block-group__inner-container > * { margin: 0 !important; text-align: center; }
.entry-content .illrc-poem :is(p, div):nth-child(odd) { text-align: right; }
.entry-content .illrc-poem :is(p, div):nth-child(even) { text-align: left; }
.entry-content .illrc-poem p.illrc-poem-source, .entry-content .illrc-poem cite { grid-column: 1 / -1; text-align: center; font-size: .8em; font-weight: 500; color: var(--muted); }

/* ---------- Separator ---------- */
.entry-content hr,
.entry-content .wp-block-separator {
  width: 120px; max-width: 100%; height: 0; margin: 2.2em auto; border: 0; border-top: 2px solid var(--line); background: none; opacity: 1;
}
.entry-content .wp-block-separator.is-style-wide { width: 100%; border-top-width: 1px; }
.entry-content .wp-block-separator.has-background:not(.is-style-dots) { height: 2px; border: 0; }
.entry-content .wp-block-separator.has-text-color { border-top-color: currentColor; }
.entry-content .wp-block-separator.is-style-dots { width: auto; height: auto; border: 0; background: none !important; text-align: center; line-height: 1; }
.entry-content .wp-block-separator.is-style-dots::before { content: '•   •   •'; white-space: pre; padding: 0; font-size: 1em; letter-spacing: 0; color: var(--gold); }
.entry-content .wp-block-separator.is-style-dots.has-text-color::before { color: currentColor; }
.entry-content .wp-block-separator.is-style-illrc-ornament {
  width: 100%; height: 26px; border: 0; background: center / 100% 26px no-repeat;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23B08A4F' stroke-width='1.3'%3E%3Crect x='5.5' y='5.5' width='13' height='13'/%3E%3Crect x='5.5' y='5.5' width='13' height='13' transform='rotate(45 12 12)'/%3E%3Ccircle cx='12' cy='12' r='2.2'/%3E%3C/svg%3E"),
    linear-gradient(to left, transparent, var(--gold) 20%, var(--gold) 42%, transparent 42%, transparent 58%, var(--gold) 58%, var(--gold) 80%, transparent);
  background-size: 26px 26px, 100% 1px;
  background-position: center, center;
  opacity: .8;
}

/* ---------- Images & figures ---------- */
.entry-content figure { margin-inline: 0; }
.entry-content .wp-block-image { margin-inline: 0; }
.entry-content .wp-block-image img,
.entry-content .wp-caption img,
.entry-content figure > img { border-radius: 16px; }
.entry-content .wp-block-image > a { display: block; }
.entry-content .wp-block-image > a img { transition: opacity .2s; }
.entry-content .wp-block-image > a:hover img { opacity: .92; }
.entry-content .wp-block-image.is-style-rounded img { border-radius: 9999px; }
.entry-content .wp-block-image.is-style-illrc-frame img { padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }
.entry-content .wp-block-image.is-style-illrc-flat img { border-radius: 0; }
.entry-content figcaption,
.entry-content .wp-element-caption,
.entry-content .wp-caption-text,
.entry-content .gallery-caption { margin: 8px 0 0; font-size: .78em; line-height: 1.9; color: var(--muted); text-align: center; }
.entry-content .wp-caption { max-width: 100%; }

/* Alignment (block + classic editor) */
.entry-content .aligncenter, .entry-content .wp-block-image .aligncenter { margin-inline: auto; text-align: center; }
.entry-content .wp-block-image.aligncenter img, .entry-content img.aligncenter { margin-inline: auto; }
.entry-content .alignleft, .entry-content .wp-block-image .alignleft { float: left; margin: .4em 0 1em 1.6em; max-width: 50%; }
.entry-content .alignright, .entry-content .wp-block-image .alignright { float: right; margin: .4em 1.6em 1em 0; max-width: 50%; }
.entry-content > .alignleft + *, .entry-content > .alignright + * { margin-top: 0; }
.entry-content .alignwide, .entry-content .alignfull { width: 100%; max-width: none; margin-inline: 0; }
.entry-content .alignfull img, .entry-content .alignwide img { width: 100%; }

/* ---------- Tables ---------- */
.entry-content .wp-block-table { margin-inline: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 14px; }
.entry-content table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .88em; line-height: 1.9; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); }
.entry-content .wp-block-table table { margin: 0; }
.entry-content :where(th, td) { padding: 10px 14px; border: 0; border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); text-align: start; vertical-align: top; }
.entry-content :where(tr) > :last-child { border-left: 0; }
.entry-content tbody tr:last-child > *, .entry-content table > tr:last-child > * { border-bottom: 0; }
.entry-content thead th, .entry-content thead td { background: var(--teal); color: #fff; font-weight: 700; border-bottom: 0; border-left-color: rgba(255, 255, 255, .15); }
.entry-content tbody th { background: var(--surface-2); color: var(--ink); font-weight: 700; }
.entry-content tfoot :where(th, td) { background: var(--surface-2); font-weight: 700; border-top: 1px solid var(--line); border-bottom: 0; }
.entry-content .wp-block-table.is-style-stripes { border-bottom: 0; }
.entry-content .wp-block-table.is-style-stripes table { border-collapse: separate; }
.entry-content .wp-block-table.is-style-stripes tbody tr:nth-child(odd) { background: transparent; }
.entry-content .wp-block-table.is-style-stripes tbody tr:nth-child(even) { background: var(--bg); }
.entry-content .wp-block-table .has-fixed-layout { table-layout: fixed; }
.entry-content .wp-block-table figcaption { margin-top: 8px; }
.entry-content .wp-block-table :where(.has-text-align-center) { text-align: center; }
.entry-content .wp-block-table :where(.has-text-align-left) { text-align: left; }
.entry-content .wp-block-table :where(.has-text-align-right) { text-align: right; }
.entry-content table.has-background, .entry-content .wp-block-table .has-background { background-clip: padding-box; }

/* ---------- Buttons ---------- */
.entry-content .wp-block-buttons { gap: 10px; }
.entry-content .wp-block-button__link,
.entry-content .wp-element-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 8px 22px;
  border: 1.5px solid transparent; border-radius: 12px; background: var(--teal); color: #fff; font-size: .9em; font-weight: 700; line-height: 1.6; text-decoration: none;
  transition: background .2s, color .2s, border-color .2s;
}
.entry-content .wp-block-button__link:hover { background: var(--teal-deep); color: #fff; }
.entry-content .wp-block-button.is-style-outline > .wp-block-button__link { background: transparent; border-color: currentColor; color: var(--teal); }
.entry-content .wp-block-button.is-style-outline > .wp-block-button__link:hover { background: var(--teal); border-color: var(--teal); color: #fff; }
.entry-content .wp-block-button__link.has-background:hover { filter: brightness(.94); }
.entry-content .wp-block-button.is-style-squared .wp-block-button__link { border-radius: 0; }

/* ---------- File, audio, video, embeds ---------- */
.entry-content .wp-block-file {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 14px 18px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--surface); font-size: .92em;
}
.entry-content .wp-block-file > a:not(.wp-block-file__button) { font-weight: 700; color: var(--ink); text-decoration: none; }
.entry-content .wp-block-file .wp-block-file__button { margin: 0; min-height: 40px; padding: 6px 18px; border-radius: 10px; font-size: .88em; background: var(--teal); color: #fff; }
.entry-content .wp-block-file__embed { width: 100%; border-radius: 10px; }
.entry-content .wp-block-audio audio { width: 100%; }
.entry-content .wp-block-video video, .entry-content video { width: 100%; border-radius: 16px; background: #000; }
.entry-content .wp-block-embed { margin-inline: 0; }
.entry-content .wp-block-embed__wrapper { border-radius: 16px; overflow: hidden; }
.entry-content .wp-block-embed.is-type-rich .wp-block-embed__wrapper { overflow: visible; }
.entry-content iframe { max-width: 100%; border: 0; }

/* ---------- Layout blocks ---------- */
.entry-content .wp-block-columns { gap: 1.6em; margin-bottom: 0; }
.entry-content .wp-block-column > * + * { margin-top: 1em; }
.entry-content .wp-block-group > * + * { margin-top: 1em; }
.entry-content .wp-block-group.has-background { padding: 1.4em 1.6em; border-radius: 18px; }
.entry-content .wp-block-group.is-style-illrc-box { padding: 1.4em 1.6em; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); }
.entry-content .wp-block-group.is-style-illrc-gold { padding: 1.4em 1.6em; border: 1px solid rgba(176, 138, 79, .35); border-radius: 20px; background: var(--gold-soft); }
.entry-content .wp-block-media-text { gap: 0; border-radius: 18px; overflow: hidden; }
.entry-content .wp-block-media-text.has-background .wp-block-media-text__content { padding: 1.4em 1.6em; }
.entry-content .wp-block-media-text__media img { border-radius: 0; }
.entry-content .wp-block-media-text:not(.has-background) .wp-block-media-text__media img { border-radius: 16px; }
.entry-content .wp-block-cover, .entry-content .wp-block-cover-image { border-radius: 20px; overflow: hidden; padding: 2em; }
.entry-content .wp-block-cover :where(h1, h2, h3, h4, h5, h6, p, strong, a) { color: inherit; }
.entry-content .wp-block-cover h2::before { display: none; }
.entry-content :where(.has-text-color, .has-background) :where(h1, h2, h3, h4, h5, h6, strong) { color: inherit; }
.entry-content .has-link-color a { color: inherit; }

/* ---------- Details (accordion) ---------- */
.entry-content .wp-block-details, .entry-content details {
  padding: 0 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface);
}
.entry-content details + details { margin-top: .6em; }
.entry-content details > summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; cursor: pointer; list-style: none;
  font-weight: 800; color: var(--ink);
}
.entry-content details > summary::-webkit-details-marker { display: none; }
.entry-content details > summary::after {
  content: ''; width: 20px; height: 20px; flex-shrink: 0; transition: transform .2s;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23B08A4F' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center/contain no-repeat;
}
.entry-content details[open] > summary { border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.entry-content details[open] > summary::after { transform: rotate(180deg); }
.entry-content details > :last-child:not(summary) { margin-bottom: 14px; }

/* ---------- Footnotes & page links ---------- */
.entry-content .wp-block-footnotes, .entry-content ol.footnotes { margin-top: 2em; padding-top: 18px; padding-right: 1.4em; border-top: 1px solid var(--line); font-size: .78em; line-height: 1.95; color: var(--muted); }
.entry-content .wp-block-footnotes li:target, .entry-content :target { scroll-margin-top: 110px; }
.entry-content .wp-block-footnotes li:target { background: var(--gold-soft); border-radius: 6px; }
.entry-content .wp-block-footnotes a { text-decoration: none; }
.entry-content .page-links { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: .85em; }
.entry-content .page-links a, .entry-content .page-links > span:not(:first-child) { min-width: 36px; height: 36px; display: inline-grid; place-items: center; padding: 0 8px; border-radius: 10px; background: var(--chip); color: var(--ink); text-decoration: none; }
.entry-content .page-links > .current { background: var(--teal); color: #fff; }

/* ---------- Misc core blocks ---------- */
.entry-content .wp-block-latest-posts, .entry-content .wp-block-archives, .entry-content .wp-block-categories { padding-right: 1.5em; }
.entry-content .wp-block-latest-posts.is-grid { padding: 0; }
.entry-content .wp-block-latest-posts__post-date { display: block; font-size: .78em; color: var(--muted); }
.entry-content .wp-block-social-links { padding: 0; gap: 8px; }
.entry-content .wp-block-search__inside-wrapper { gap: 6px; }
.entry-content .wp-block-search__input { min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.entry-content .wp-block-search__button { min-height: 44px; margin: 0; padding: 0 16px; border: 0; border-radius: 12px; background: var(--teal); color: #fff; font-weight: 700; }
.entry-content .wp-block-tag-cloud a { display: inline-block; margin: 0 0 6px 4px; padding: 2px 12px; border-radius: 999px; background: var(--chip); font-size: .8em !important; text-decoration: none; color: var(--ink); }

/* ---------- Palette & font-size presets (fallbacks) ---------- */
.entry-content .has-teal-color { color: #14474A; }
.entry-content .has-teal-deep-color { color: #0E3335; }
.entry-content .has-gold-color { color: #B08A4F; }
.entry-content .has-gold-text-color { color: #83612B; }
.entry-content .has-gold-soft-color { color: #F4EBDA; }
.entry-content .has-ink-color { color: #16211F; }
.entry-content .has-ink-2-color { color: #3F4A4B; }
.entry-content .has-muted-color { color: #5C6768; }
.entry-content .has-cream-color { color: #FBF9F4; }
.entry-content .has-sand-color { color: #F4EFE4; }
.entry-content .has-white-color { color: #FFFFFF; }
.entry-content .has-red-color { color: #9A3B22; }
.entry-content .has-teal-background-color { background-color: #14474A; }
.entry-content .has-teal-deep-background-color { background-color: #0E3335; }
.entry-content .has-gold-background-color { background-color: #B08A4F; }
.entry-content .has-gold-text-background-color { background-color: #83612B; }
.entry-content .has-gold-soft-background-color { background-color: #F4EBDA; }
.entry-content .has-ink-background-color { background-color: #16211F; }
.entry-content .has-ink-2-background-color { background-color: #3F4A4B; }
.entry-content .has-muted-background-color { background-color: #5C6768; }
.entry-content .has-cream-background-color { background-color: #FBF9F4; }
.entry-content .has-sand-background-color { background-color: #F4EFE4; }
.entry-content .has-white-background-color { background-color: #FFFFFF; }
.entry-content .has-red-background-color { background-color: #9A3B22; }
.entry-content .has-small-font-size { font-size: .82em; }
.entry-content .has-normal-font-size, .entry-content .has-regular-font-size { font-size: 1em; }
.entry-content .has-medium-font-size { font-size: 1.14em; }
.entry-content .has-large-font-size { font-size: 1.32em; line-height: 1.9; }
.entry-content .has-x-large-font-size { font-size: 1.7em; line-height: 1.75; }
.entry-content .has-huge-font-size { font-size: 2.1em; line-height: 1.6; }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .entry-content .wp-block-quote, .entry-content > blockquote { padding: 22px 20px; font-size: 1.05em; }
  .entry-content .wp-block-pullquote blockquote { font-size: 1.2em; }
  .entry-content .alignleft, .entry-content .alignright,
  .entry-content .wp-block-image .alignleft, .entry-content .wp-block-image .alignright,
  .entry-content .wp-block-pullquote.alignleft, .entry-content .wp-block-pullquote.alignright { float: none; max-width: 100%; margin: 1.1em 0 0; }
  .entry-content .wp-block-image .alignleft img, .entry-content .wp-block-image .alignright img { margin-inline: auto; }
  .entry-content table { font-size: .82em; min-width: 520px; }
  .entry-content .wp-block-table table.has-fixed-layout { min-width: 0; }
  .entry-content :where(th, td) { padding: 8px 10px; }
  .entry-content .illrc-poem { grid-template-columns: 1fr; padding: 18px; }
  .entry-content .illrc-poem :is(p, div) { text-align: center !important; }
  .entry-content .illrc-poem p:nth-child(even):not(:last-child) { margin-bottom: .7em !important; }
  .entry-content .is-style-illrc-note, .entry-content .is-style-illrc-tip, .entry-content .is-style-illrc-warning { padding: 14px 46px 14px 16px; }
  .entry-content .is-style-illrc-note::before, .entry-content .is-style-illrc-tip::before, .entry-content .is-style-illrc-warning::before { right: 14px; top: 16px; }
  .entry-content .wp-block-media-text.is-stacked-on-mobile .wp-block-media-text__content { padding: 1em 0 0; }
  .entry-content .wp-block-media-text.is-stacked-on-mobile.has-background .wp-block-media-text__content { padding: 1.2em; }
}

@media print {
  .entry-content .wp-block-code { background: #f4f4f4; color: #000; white-space: pre-wrap; }
  .entry-content a { color: inherit; text-decoration: underline; }
  .entry-content details > :not(summary) { display: block; }
}
