/* Shared typography for authored HTML (blog posts, static pages such as "About us").
   Content is cleaned server side by App\Mixins\Content\RichContent. */
.rich-content {
    color: #dadada;
    font-size: 1rem;
    line-height: 2;
    text-align: justify;
    text-justify: inter-word;
    overflow-wrap: anywhere;
}
.rich-content > *:first-child { margin-top: 0 !important; }
.rich-content p, .rich-content div { margin: 0 0 0.9em; line-height: 2; color: inherit; }
/* alignment is inherited from .rich-content (justify) or from a centred parent; never forced per paragraph */
.rich-content .rc-title { text-align: center; font-size: 1.2em; line-height: 1.9; margin-bottom: 1.2em; }
.rich-content h1.rc-title, .rich-content h2.rc-title, .rich-content h3.rc-title { font-size: 1.5rem; }
/* English blocks (reference lists): left-to-right, number on the left, still justified */
.rich-content [dir="ltr"] { direction: ltr; text-align: justify; }
.rich-content [dir="ltr"][style*="text-align:center"], .rich-content [dir="ltr"][style*="text-align: center"] { text-align: center; }
.rich-content ol[dir="ltr"], .rich-content ul[dir="ltr"] { padding-inline-start: 1.8em; text-align: justify; }
.rich-content .rc-spacer { margin: 0; height: 0.4em; line-height: 0.4em; overflow: hidden; }

.rich-content h1, .rich-content h2, .rich-content h3,
.rich-content h4, .rich-content h5, .rich-content h6 {
    color: #F0F0F2 !important; font-weight: 700; line-height: 1.6; margin: 1.6em 0 0.7em;
}
.rich-content h1 { font-size: 1.75rem; }
.rich-content h2 { font-size: 1.5rem; }
.rich-content h3 { font-size: 1.25rem; }
.rich-content h4 { font-size: 1.1rem; }

.rich-content strong, .rich-content b { color: #F0F0F2; font-weight: 700; }
.rich-content em, .rich-content i { font-style: italic; }
.rich-content u { text-decoration: underline; }

/* Links: every hyperlink is clearly recognisable */
.rich-content a[href] { color: #9B8DE8; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.rich-content a[href]:hover { color: #B7A9F5; }
.rich-content a:not([href]) { color: inherit; text-decoration: none; }

/* Lists (Tailwind preflight removes bullets, restore them) */
.rich-content ul, .rich-content ol { margin: 0 0 1em; padding-inline-start: 1.6em; }
.rich-content ul { list-style: disc; }
.rich-content ol { list-style: decimal; }
.rich-content li { margin-bottom: 0.35em; line-height: 1.9; }
.rich-content li > p { margin-bottom: 0.2em; }

.rich-content blockquote { border-inline-start: 4px solid #6E56CF; padding: 0.9rem 1.2rem; background: rgba(110,86,207,0.08); border-radius: 0.5rem; margin: 1.4em 0; color: #C0B8E8; }
.rich-content hr { border: 0; border-top: 1px solid rgba(255,255,255,0.1); margin: 1.8em 0; }
.rich-content img { max-width: 100%; height: auto; border-radius: 0.75rem; border: 1px solid rgba(255,255,255,0.07); margin: 1em auto; display: block; }
.rich-content iframe, .rich-content video { max-width: 100%; border-radius: 0.75rem; margin: 1em auto; display: block; }
.rich-content iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; }
.rich-content pre { background: #1C1C22; border: 1px solid rgba(255,255,255,0.07); border-radius: 0.75rem; padding: 1rem 1.25rem; overflow-x: auto; direction: ltr; text-align: left; }
.rich-content code { background: #1C1C22; color: #9B8DE8; padding: 0.15em 0.4em; border-radius: 0.25rem; font-size: 0.9em; }
.rich-content pre code { background: transparent; color: #dadada; padding: 0; }

/* Tables: sized by their content and centred in the page, clear grid lines.
   The author can change the position in the editor (rc-table-right / left / full). */
.rich-content table { border-collapse: collapse; margin: 1.4em auto; font-size: 0.95em; color: inherit; width: auto; max-width: 100%; border: 1px solid #6b6b78; }
.rich-content table.rc-table-full { width: 100%; }
.rich-content table.rc-table-right { margin-inline-start: 0; margin-inline-end: auto; }
.rich-content table.rc-table-left { margin-inline-start: auto; margin-inline-end: 0; }
.rich-content th, .rich-content td { border: 1px solid #6b6b78; padding: 0.5em 0.85em; text-align: start; vertical-align: top; line-height: 1.8; min-width: 2.5em; }
.rich-content th, .rich-content thead td { background: rgba(110,86,207,0.16); color: #F0F0F2; font-weight: 700; }
.rich-content td p, .rich-content th p, .rich-content td div, .rich-content th div { margin: 0; text-align: inherit; }
.rich-content .rc-light-cell, .rich-content .rc-light-cell * { color: #15151a !important; }
.rich-content .rc-table-scroll { overflow-x: auto; margin: 1.4em 0; }
.rich-content .rc-table-scroll > table { margin-top: 0; margin-bottom: 0; }
@media (max-width: 767px) {
    .rich-content table { display: block; overflow-x: auto; width: max-content; max-width: 100%; }
}

/* Footnotes: superscript references + compact footnote / reference list */
.rich-content sup, .rich-content sub { font-size: 0.72em; line-height: 0; }
.rich-content sup.rc-fn-ref { vertical-align: super; font-weight: 600; margin: 0 1px; }
.rich-content a[href] > sup.rc-fn-ref { text-decoration: none; }
.rich-content .rc-footnotes { margin-top: 2em; padding-top: 0.8em; border-top: 1px solid rgba(255,255,255,0.12); font-size: 0.85em; color: #B8B8C2; }
.rich-content .rc-footnotes hr { margin: 0.6em 0; }
.rich-content .rc-footnotes p, .rich-content .rc-footnotes div,
.rich-content .rc-footnote, .rich-content .rc-footnote p, .rich-content p.rc-footnote-text { margin: 0 !important; line-height: 1.75; }
.rich-content .rc-footnote-text { color: #B8B8C2; }
.rich-content a[href^="#_ftn"], .rich-content a[href^="#_edn"] { text-decoration: none; }
.rich-content .rc-footnotes .rc-spacer { height: 0.15em; line-height: 0.15em; }
.rich-content [id^="ftn"]:target, .rich-content a[name]:target { background: rgba(110,86,207,0.2); border-radius: 4px; }
html { scroll-padding-top: 90px; }
