/* =============================================================
   Rich Text Editor — texteditor.css
   Copy to: public/css/texteditor/texteditor.css
   ============================================================= */

:root {
    --rte-surface: #ffffff;
    --rte-surface-2: #f0efe9;
    --rte-surface-3: #e8e7e0;
    --rte-border: #d8d7d0;
    --rte-text: #1a1917;
    --rte-text-2: #5a5955;
    --rte-text-3: #8a8985;
    --rte-accent: #1a6bff;
    --rte-accent-lt: #e8f0ff;
    --rte-accent-tx: #1a4db5;
    --rte-danger: #b52020;
    --rte-font: 'DM Sans', sans-serif;
    --rte-mono: 'JetBrains Mono', monospace;
    --rte-radius: 8px;
    --rte-radius-lg: 12px;
    --rte-shadow: 0 1px 3px rgba(0, 0, 0, .08), 0 4px 16px rgba(0, 0, 0, .06);
}

.rte-btn-table-wrap {
    position: relative;
}

.rte-table-pop {
    position: absolute;
    top: 42px;
    left: 0;
    width: 230px;
    background: #fff;
    border: 1px solid #d8d7d0;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .12);
    padding: 12px;
    z-index: 99999;
    display: none;
}

.rte-table-pop.show {
    display: block;
}

.rte-table-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 4px;
}

.rte-table-cell {
    width: 16px;
    height: 16px;
    border: 1px solid #d8d7d0;
    border-radius: 3px;
    background: #fff;
    cursor: pointer;
    transition: .12s;
}

.rte-table-cell.active {
    background: #c9a86a;
    border-color: #c9a86a;
}

.rte-table-meta {
    margin-top: 10px;
    text-align: center;
    font-size: 12px;
    color: #5a5955;
    font-weight: 600;
}

.rte-table-adv-btn {
    width: 100%;
    margin-top: 10px;
    border: none;
    background: #f5f4ef;
    color: #5a5955;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
    transition: .15s;
}

.rte-table-adv-btn:hover {
    background: #eceae1;
}

/* ── WRAPPER ── */
.rte-wrap {
    width: 100%;
    background: var(--rte-surface);
    border: 1px solid var(--rte-border);
    border-radius: var(--rte-radius-lg);
    box-shadow: var(--rte-shadow);
    position: relative;
    font-family: var(--rte-font);
}

/* ── MENU BAR ── */
.rte-menu {
    display: flex;
    flex-wrap: wrap;
    padding: 0 12px;
    border-bottom: 1px solid var(--rte-border);
    background: var(--rte-surface-2);
    border-radius: var(--rte-radius-lg) var(--rte-radius-lg) 0 0;
}

.rte-menu-item {
    padding: 8px 10px;
    font-size: 13px;
    font-weight: 500;
    color: var(--rte-text-2);
    cursor: pointer;
    user-select: none;
    transition: color .1s;
}

.rte-menu-item:hover {
    color: var(--rte-text);
}

/* ── FIND BAR ── */
.rte-find {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--rte-border);
    background: var(--rte-surface-2);
    flex-wrap: wrap;
}

.rte-find.show {
    display: flex;
}

.rte-find-input {
    height: 28px;
    border: 1px solid var(--rte-border);
    border-radius: 6px;
    padding: 0 10px;
    font-family: var(--rte-font);
    font-size: 13px;
    outline: none;
    color: var(--rte-text);
    background: var(--rte-surface);
    width: 150px;
}

.rte-find-input:focus {
    border-color: var(--rte-accent);
}

.rte-find-btn {
    height: 28px;
    padding: 0 10px;
    border: 1px solid var(--rte-border);
    border-radius: 6px;
    font-family: var(--rte-font);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    background: var(--rte-surface);
    color: var(--rte-text-2);
    white-space: nowrap;
    transition: background .12s;
}

.rte-find-btn:hover {
    background: var(--rte-surface-3);
}

.rte-find-btn.accent {
    background: var(--rte-accent);
    color: #fff;
    border-color: var(--rte-accent);
}

/* ── TOOLBAR ── */
.rte-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px;
    padding: 6px 10px;
    border-bottom: 1px solid var(--rte-border);
    background: var(--rte-surface);
}

.rte-tb-group {
    display: flex;
    align-items: center;
    gap: 1px;
}

.rte-tb-sep {
    width: 1px;
    height: 20px;
    background: var(--rte-border);
    margin: 0 5px;
    flex-shrink: 0;
}

.rte-tb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    color: var(--rte-text-2);
    font-size: 14px;
    transition: background .1s, color .1s;
    flex-shrink: 0;
    font-family: var(--rte-font);
    position: relative;
}

.rte-tb-btn:hover {
    background: var(--rte-surface-2);
    color: var(--rte-text);
}

.rte-tb-btn.active {
    background: var(--rte-accent-lt);
    color: var(--rte-accent-tx);
}

.rte-tb-btn svg {
    width: 15px;
    height: 15px;
    fill: currentColor;
    pointer-events: none;
}

.rte-tb-select {
    height: 30px;
    border: 1px solid var(--rte-border);
    border-radius: 6px;
    padding: 0 8px;
    font-family: var(--rte-font);
    font-size: 12px;
    font-weight: 500;
    color: var(--rte-text);
    background: var(--rte-surface);
    cursor: pointer;
    outline: none;
}

.rte-tb-select:focus {
    border-color: var(--rte-accent);
}

/* color picker */
.rte-color-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.rte-color-ind {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 1px;
    padding: 5px 6px;
    color: var(--rte-text-2);
    font-size: 12px;
    font-weight: 600;
    font-family: var(--rte-font);
    transition: background .1s;
}

.rte-color-ind:hover {
    background: var(--rte-surface-2);
}

.rte-color-bar {
    width: 18px;
    height: 3px;
    border-radius: 2px;
    margin-top: 1px;
}

.rte-color-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

/* ── EDITOR AREA ── */
.rte-area {
    min-height: 320px;
    max-height: 600px;
    overflow-y: auto;
    padding: 24px 32px;
    outline: none;
    font-family: var(--rte-font);
    font-size: 15px;
    line-height: 1.8;
    color: var(--rte-text);
    caret-color: var(--rte-accent);
    text-align: left;
}

.rte-area:empty::before {
    content: attr(data-placeholder);
    color: var(--rte-text-3);
    pointer-events: none;
    font-style: italic;
}

.rte-area p {
    margin-bottom: .75em;
    text-align: left;
}

.rte-area h1 {
    font-size: 2em;
    font-weight: 600;
    margin-bottom: .5em;
    line-height: 1.3;
}

.rte-area h2 {
    font-size: 1.5em;
    font-weight: 600;
    margin-bottom: .5em;
    line-height: 1.3;
}

.rte-area h3 {
    font-size: 1.2em;
    font-weight: 600;
    margin-bottom: .5em;
}

.rte-area h4 {
    font-size: 1em;
    font-weight: 600;
    margin-bottom: .5em;
}

.rte-area ul,
.rte-area ol {
    padding-left: 2em;
    margin-bottom: .75em;
    display: block;
}

.rte-area ul {
    list-style-type: disc;
}

.rte-area ol {
    list-style-type: decimal;
}

.rte-area li {
    display: list-item;
    margin-bottom: .2em;
}

/* FIX: list marker (bullet / number) must match the font-size of its list
   item. When a heading was inside the selection when the list was applied,
   the marker could stay at normal body size while the text was 2em+.
   ::marker inherits from the <li>, so forcing font-size:inherit on <li>
   and resetting any heading child inside a <li> to normal size keeps them
   in sync. */
.rte-area li::marker {
    font-size: inherit;
}

/* any heading tag that survived inside a <li> after list conversion should
   render at normal paragraph size — the block semantics are gone, only
   the inline styling (bold etc.) should remain if the user kept it */
.rte-area li h1,
.rte-area li h2,
.rte-area li h3,
.rte-area li h4,
.rte-area li h5,
.rte-area li h6 {
    font-size: 1em;
    font-weight: inherit;
    margin: 0;
    display: inline;
}

.rte-area blockquote {
    border-left: 3px solid var(--rte-accent);
    padding: 8px 16px;
    margin: 12px 0;
    color: var(--rte-text-2);
    background: var(--rte-accent-lt);
    border-radius: 0 var(--rte-radius) var(--rte-radius) 0;
}

.rte-area pre {
    background: #1a1917;
    color: #e8e7e0;
    border-radius: var(--rte-radius);
    padding: 14px 18px;
    font-family: var(--rte-mono);
    font-size: 13px;
    overflow-x: auto;
    margin: 12px 0;
    line-height: 1.6;
}

.rte-area code {
    font-family: var(--rte-mono);
    font-size: .875em;
    background: var(--rte-surface-2);
    padding: 1px 5px;
    border-radius: 4px;
    color: #c0392b;
}

.rte-area pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}

.rte-area a {
    color: var(--rte-accent);
    text-decoration: underline;
}

.rte-area hr {
    border: none;
    border-top: 2px solid var(--rte-border);
    margin: 20px 0;
}

.rte-area table {
    border-collapse: collapse;
    width: 100%;
    margin: 12px 0;
    font-size: 14px;
}

/* FIX: table cells need a visible focus affordance + cursor so users
   notice they can click into a cell, tab between cells, etc. */
.rte-area td,
.rte-area th {
    cursor: text;
}

.rte-area th,
.rte-area td {
    padding: 8px 12px;
    text-align: left;
}

.rte-area th {
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

/* ── FIGURE (float / block image) ── */
.rte-area figure.rte-fig {
    display: block;
    margin: 0;
    padding: 0;
    border: none;
    text-align: left;
    max-width: 100%;
}

.rte-area figure.rte-fig.rte-float-left {
    float: left;
    margin: 0 15px 10px 0;
}

.rte-area figure.rte-fig.rte-float-right {
    float: right;
    margin: 0 0 10px 15px;
}

.rte-area figure.rte-fig.rte-block-img {
    clear: both;
    margin: 8px auto;
    display: block;
}

.rte-area figure.rte-fig img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--rte-radius);
    cursor: pointer;
    user-select: none;
}

.rte-area figure.rte-fig figcaption {
    display: block;
    font-size: 12px;
    color: var(--rte-text-3);
    text-align: center;
    padding: 5px 4px 2px;
    font-style: italic;
    line-height: 1.4;
    cursor: text;
    outline: none;
}

.rte-area figure.rte-fig figcaption:empty::before {
    content: 'Click to edit caption…';
    color: #ccc;
    pointer-events: none;
}

/* Fix #4: selected outline */
.rte-area figure.rte-fig.rte-selected {
    outline: 2px solid var(--rte-accent);
    outline-offset: 2px;
}

.rte-area figure.rte-fig.rte-block-img+p {
    clear: both;
    text-align: left;
}

.rte-area figure+p {
    text-align: left;
}

/* ── SOURCE TEXTAREA ── */
.rte-source {
    display: none;
    width: 100%;
    min-height: 320px;
    padding: 24px 32px;
    font-family: var(--rte-mono);
    font-size: 13px;
    line-height: 1.7;
    color: var(--rte-text);
    background: var(--rte-surface);
    border: none;
    outline: none;
    resize: none;
}

/* ── STATUS BAR ── */
.rte-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 16px;
    border-top: 1px solid var(--rte-border);
    background: var(--rte-surface-2);
    border-radius: 0 0 var(--rte-radius-lg) var(--rte-radius-lg);
    font-size: 12px;
    color: var(--rte-text-3);
}

/* ── FLOATING IMAGE TOOLBAR ── */
#rte-img-bar {
    display: none;
    position: fixed;
    z-index: 9800;
    background: #1a1917;
    border-radius: 10px;
    padding: 5px 8px;
    gap: 3px;
    align-items: center;
    box-shadow: 0 4px 24px rgba(0, 0, 0, .3);
    flex-wrap: wrap;
}

#rte-img-bar.show {
    display: flex;
}

.ieb-label {
    font-size: 9px;
    font-weight: 700;
    color: rgba(255, 255, 255, .4);
    letter-spacing: .06em;
    padding: 0 2px;
}

.ieb-btn {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-family: var(--rte-font);
    font-size: 11px;
    font-weight: 600;
    background: transparent;
    color: #fff;
    transition: background .12s;
    white-space: nowrap;
}

.ieb-btn:hover {
    background: rgba(255, 255, 255, .15);
}

.ieb-btn.on {
    background: var(--rte-accent);
}

.ieb-btn.del:hover {
    background: var(--rte-danger);
}

.ieb-sep {
    width: 1px;
    height: 18px;
    background: rgba(255, 255, 255, .18);
    margin: 0 3px;
    flex-shrink: 0;
}

/* ── MODALS ── */
.rte-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .4);
    z-index: 9900;
    align-items: center;
    justify-content: center;
}

.rte-modal-overlay.show {
    display: flex;
}

.rte-modal-box {
    background: var(--rte-surface);
    border: 1px solid var(--rte-border);
    border-radius: var(--rte-radius-lg);
    padding: 24px;
    width: 400px;
    box-shadow: var(--rte-shadow);
    animation: rte-modal-in .15s ease;
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes rte-modal-in {
    from {
        opacity: 0;
        transform: scale(.96) translateY(8px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.rte-modal-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--rte-text);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rte-modal-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--rte-text-2);
    margin-bottom: 5px;
    display: block;
    margin-top: 12px;
}

.rte-modal-input {
    width: 100%;
    height: 36px;
    border: 1px solid var(--rte-border);
    border-radius: var(--rte-radius);
    padding: 0 12px;
    font-family: var(--rte-font);
    font-size: 13px;
    color: var(--rte-text);
    background: var(--rte-surface);
    outline: none;
    transition: border-color .15s;
    box-sizing: border-box;
}

.rte-modal-input:focus {
    border-color: var(--rte-accent);
}

.rte-modal-row {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

.rte-modal-btn {
    flex: 1;
    height: 34px;
    border: 1px solid var(--rte-border);
    border-radius: var(--rte-radius);
    font-family: var(--rte-font);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    background: var(--rte-surface);
    color: var(--rte-text-2);
    transition: all .15s;
}

.rte-modal-btn:hover {
    background: var(--rte-surface-2);
}

.rte-modal-btn.primary {
    background: var(--rte-accent);
    color: #fff;
    border-color: var(--rte-accent);
}

.rte-modal-btn.primary:hover {
    background: #1259e0;
}

.rte-modal-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    font-size: 13px;
    color: var(--rte-text-2);
    cursor: pointer;
}

.rte-modal-hint {
    font-size: 11px;
    color: var(--rte-text-3);
    margin-top: 6px;
    background: var(--rte-surface-2);
    border-radius: 6px;
    padding: 7px 10px;
    line-height: 1.5;
}

/* Image modal tabs / drop zone / buttons */
.rte-img-tab-bar {
    display: flex;
    border: 1px solid var(--rte-border);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 14px;
}

.rte-img-tab {
    flex: 1;
    padding: 7px;
    font-family: var(--rte-font);
    font-size: 12px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all .15s;
    background: transparent;
    color: var(--rte-text-2);
}

.rte-img-tab.active {
    background: var(--rte-accent);
    color: #fff;
}

.rte-drop-zone {
    border: 2px dashed var(--rte-border);
    border-radius: var(--rte-radius);
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all .2s;
    background: var(--rte-surface-2);
    user-select: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.rte-drop-zone:hover,
.rte-drop-zone.drag-over {
    border-color: var(--rte-accent);
    background: var(--rte-accent-lt);
}

/* FIX: image preview not displaying.
   The shared singleton markup (rendered server-side via Blade) ships with
   inline style="display:none" on #rte-prevWrap. Inline styles win over a
   plain CSS class (.show{display:flex}) in the cascade, so toggling the
   class alone was never enough — the JS now also sets style.display
   directly, and !important here gives the .show class the final say even
   if some other inline style sneaks back in. */
#rte-prevWrap {
    margin-top: 10px;
    text-align: center;
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

#rte-prevWrap.show {
    display: flex !important;
}

#rte-prevImg {
    max-width: 100%;
    max-height: 120px;
    border-radius: 8px;
    border: 1px solid var(--rte-border);
    object-fit: contain;
}

.rte-size-btns {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.rte-sz-btn {
    padding: 5px 12px;
    border: 1px solid var(--rte-border);
    border-radius: 6px;
    font-family: var(--rte-font);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    background: var(--rte-surface);
    color: var(--rte-text-2);
    transition: all .12s;
}

.rte-sz-btn:hover {
    background: var(--rte-surface-2);
}

.rte-sz-btn.active {
    background: var(--rte-accent-lt);
    color: var(--rte-accent-tx);
    border-color: var(--rte-accent);
}

.rte-fl-btns {
    display: flex;
    gap: 6px;
    margin-top: 4px;
}

.rte-fl-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 8px 4px;
    border: 1px solid var(--rte-border);
    border-radius: 7px;
    font-family: var(--rte-font);
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    background: var(--rte-surface);
    color: var(--rte-text-2);
    transition: all .12s;
}

.rte-fl-btn:hover {
    background: var(--rte-surface-2);
}

.rte-fl-btn.active {
    background: var(--rte-accent-lt);
    color: var(--rte-accent-tx);
    border-color: var(--rte-accent);
}

/* ── NOTIFICATION ── */
.rte-notif {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #1a1917;
    color: #f5f4f0;
    font-size: 13px;
    font-weight: 500;
    padding: 10px 18px;
    border-radius: 8px;
    z-index: 9999;
    opacity: 0;
    transform: translateY(8px);
    transition: all .2s;
    pointer-events: none;
    font-family: var(--rte-font);
}

.rte-notif.show {
    opacity: 1;
    transform: none;
}

/* ── TABLE ROW/COLUMN CONTEXT MENU (new) ──
   Right-click inside any table cell to insert/delete rows & columns,
   including deleting the currently selected row — previously missing. */
.rte-table-ctx {
    position: fixed;
    display: none;
    flex-direction: column;
    background: var(--rte-surface);
    border: 1px solid var(--rte-border);
    border-radius: 8px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, .18);
    padding: 4px;
    z-index: 9950;
    min-width: 180px;
}

.rte-table-ctx.show {
    display: flex;
}

.rte-table-ctx button {
    text-align: left;
    border: none;
    background: transparent;
    padding: 7px 10px;
    font-size: 12px;
    font-family: var(--rte-font);
    cursor: pointer;
    border-radius: 5px;
    color: var(--rte-text);
}

.rte-table-ctx button:hover {
    background: var(--rte-surface-2);
}

.rte-tbctx-sep {
    height: 1px;
    background: var(--rte-border);
    margin: 4px 2px;
}

/* ── FULLSCREEN ── */
.rte-wrap.fullscreen {
    position: fixed;
    inset: 0;
    max-width: none;
    border-radius: 0;
    z-index: 9900;
    display: flex;
    flex-direction: column;
}

.rte-wrap.fullscreen .rte-area {
    flex: 1;
    max-height: none;
}

/* ── PRINT ── */
@media print {
    .rte-wrap {
        box-shadow: none;
        border: none;
    }

    .rte-toolbar,
    .rte-menu,
    .rte-status,
    .rte-find,
    #rte-img-bar,
    .rte-table-ctx {
        display: none !important;
    }

    .rte-area {
        min-height: auto;
        max-height: none;
        padding: 0;
    }
}

/* ── CUSTOM INSTANT TOOLTIP (replaces slow OS title= tooltips) ──
   #rte-tip is injected once into <body> by _bindTooltips().
   Appears immediately on hover via a near-zero CSS transition. */
#rte-tip {
    position: fixed;
    z-index: 99999;
    background: #1a1917;
    color: #f5f4f0;
    font-size: 11px;
    font-weight: 500;
    font-family: var(--rte-font);
    padding: 4px 8px;
    border-radius: 5px;
    pointer-events: none;
    white-space: nowrap;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.08s;
}

#rte-tip.show {
    opacity: 1;
}

/* ── TABLE COLUMN RESIZE HANDLE ──
   An invisible 4 px strip injected at the right edge of each th/td.
   The col-resize cursor appears on hover so users discover it. */
.rte-col-handle {
    position: absolute;
    top: 0;
    right: -2px;
    width: 5px;
    height: 100%;
    cursor: col-resize;
    user-select: none;
    z-index: 10;
    background: transparent;
}

.rte-col-handle:hover,
.rte-col-handle:active {
    background: var(--rte-accent);
    opacity: 0.35;
}
/* ── READ-ONLY CONTENT DISPLAY ──
   Renders RTE-authored HTML (figures/floats/typography) outside the
   live editor — e.g. the public website's "show" pages — so saved
   content (float-left/right images, headings, tables, etc.) looks the
   same as it did in the admin editor. Mirrors the .rte-area rules
   above but drops editor-only chrome (min/max-height, scroll, outline,
   caret, placeholder, selection outline, cell edit cursor). */
.rte-content {
    font-family: var(--rte-font);
    font-size: 15px;
    line-height: 1.8;
    color: var(--rte-text);
    text-align: left;
}

.rte-content::after {
    content: '';
    display: block;
    clear: both;
}

.rte-content p {
    margin-bottom: .75em;
    text-align: left;
}

.rte-content h1 {
    font-size: 2em;
    font-weight: 600;
    margin-bottom: .5em;
    line-height: 1.3;
}

.rte-content h2 {
    font-size: 1.5em;
    font-weight: 600;
    margin-bottom: .5em;
    line-height: 1.3;
}

.rte-content h3 {
    font-size: 1.2em;
    font-weight: 600;
    margin-bottom: .5em;
}

.rte-content h4 {
    font-size: 1em;
    font-weight: 600;
    margin-bottom: .5em;
}

.rte-content ul,
.rte-content ol {
    padding-left: 2em;
    margin-bottom: .75em;
    display: block;
}

.rte-content ul {
    list-style-type: disc;
}

.rte-content ol {
    list-style-type: decimal;
}

.rte-content li {
    display: list-item;
    margin-bottom: .2em;
}

.rte-content li::marker {
    font-size: inherit;
}

.rte-content li h1,
.rte-content li h2,
.rte-content li h3,
.rte-content li h4,
.rte-content li h5,
.rte-content li h6 {
    font-size: 1em;
    font-weight: inherit;
    margin: 0;
    display: inline;
}

.rte-content blockquote {
    border-left: 3px solid var(--rte-accent);
    padding: 8px 16px;
    margin: 12px 0;
    color: var(--rte-text-2);
    background: var(--rte-accent-lt);
    border-radius: 0 var(--rte-radius) var(--rte-radius) 0;
}

.rte-content pre {
    background: #1a1917;
    color: #e8e7e0;
    border-radius: var(--rte-radius);
    padding: 14px 18px;
    font-family: var(--rte-mono);
    font-size: 13px;
    overflow-x: auto;
    margin: 12px 0;
    line-height: 1.6;
}

.rte-content code {
    font-family: var(--rte-mono);
    font-size: .875em;
    background: var(--rte-surface-2);
    padding: 1px 5px;
    border-radius: 4px;
    color: #c0392b;
}

.rte-content pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}

.rte-content a {
    color: var(--rte-accent);
    text-decoration: underline;
}

.rte-content hr {
    border: none;
    border-top: 2px solid var(--rte-border);
    margin: 20px 0;
}

.rte-content table {
    border-collapse: collapse;
    width: 100%;
    margin: 12px 0;
    font-size: 14px;
}

.rte-content th,
.rte-content td {
    padding: 8px 12px;
    text-align: left;
}

.rte-content th {
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.rte-content figure.rte-fig {
    display: block;
    margin: 0;
    padding: 0;
    border: none;
    text-align: left;
    max-width: 100%;
}

.rte-content figure.rte-fig.rte-float-left {
    float: left;
    margin: 0 15px 10px 0;
}

.rte-content figure.rte-fig.rte-float-right {
    float: right;
    margin: 0 0 10px 15px;
}

.rte-content figure.rte-fig.rte-block-img {
    clear: both;
    margin: 8px auto;
    display: block;
}

.rte-content figure.rte-fig img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--rte-radius);
}

.rte-content figure.rte-fig figcaption {
    display: block;
    font-size: 12px;
    color: var(--rte-text-3);
    text-align: center;
    padding: 5px 4px 2px;
    font-style: italic;
    line-height: 1.4;
}

.rte-content figure.rte-fig.rte-block-img+p {
    clear: both;
    text-align: left;
}

.rte-content figure+p {
    text-align: left;
}
