/* =====================================================================
   Rich text — anything typed in the admin editor (FAQ answers, package and
   zone write-ups, About story, homepage park text, "How to choose" guide).
   HTML is cleaned first by includes/rich_text.php → jnm_rich_html(), so
   only structure reaches the page; this file decides how it looks.
   Loaded on the homepage (landing.css) AND inner pages (style.css), so every
   value has a fallback and nothing depends on either stylesheet.
   ===================================================================== */
.jnm-rich {
    --rt-ink:     var(--forest, #1E3A2B);
    --rt-text:    var(--ink-soft, var(--text-secondary, #3D3D36));
    --rt-mute:    var(--ink-mute, var(--text-muted, #6B6B5E));
    --rt-accent:  var(--mari, var(--marigold, #D97A2C));
    --rt-accent-d:var(--mari-deep, var(--marigold-deep, #B5601C));
    --rt-wash:    var(--mari-wash, var(--accent-light, #FBEAD7));
    --rt-rule:    var(--rule, var(--border, #DCD5C3));
    --rt-paper:   var(--paper, var(--card-bg, #FDFBF5));
    --rt-display: var(--display, var(--font-display, 'Poppins', sans-serif));
    --rt-size:    16px;
    --rt-gap:     1em;

    color: var(--rt-text);
    font-size: var(--rt-size);
    line-height: 1.75;
    overflow-wrap: anywhere;          /* long URLs / words never push the page sideways */
    text-align: left;
}
.jnm-rich > :first-child { margin-top: 0 !important; }
.jnm-rich > :last-child  { margin-bottom: 0 !important; }

/* ---------- Text ---------- */
.jnm-rich p { margin: 0 0 var(--rt-gap); padding: 0; font-size: inherit; line-height: inherit; color: inherit; }
.jnm-rich strong { color: var(--rt-ink); font-weight: 600; }
.jnm-rich em { font-style: italic; }
.jnm-rich u { text-decoration-color: var(--rt-accent); text-underline-offset: 3px; }
.jnm-rich sub, .jnm-rich sup { font-size: .72em; }

/* ---------- Headings: same family, scale relative to the text ---------- */
.jnm-rich h2, .jnm-rich h3, .jnm-rich h4 {
    font-family: var(--rt-display);
    color: var(--rt-ink);
    font-weight: 600;
    letter-spacing: -.01em;
    line-height: 1.25;
    margin: 1.6em 0 .55em;
    padding: 0;
    text-transform: none;
}
.jnm-rich h2 { font-size: 1.6em; padding-bottom: .4em; border-bottom: 1px solid var(--rt-rule); }
.jnm-rich h3 { font-size: 1.3em; }
.jnm-rich h4 { font-size: 1.08em; font-family: inherit; font-weight: 700; }
.jnm-rich h2 strong, .jnm-rich h3 strong, .jnm-rich h4 strong { font-weight: inherit; color: inherit; }

/* ---------- Lists (sites' resets remove bullets — put them back) ---------- */
.jnm-rich ul, .jnm-rich ol { margin: 0 0 var(--rt-gap); padding: 0; }
.jnm-rich li { margin: 0 0 .45em; display: list-item; }
/* bullets: a drawn marigold dot (hollow when nested), same as the package page */
.jnm-rich ul { list-style: none; }
.jnm-rich ul > li { position: relative; padding-left: 1.4em; }
.jnm-rich ul > li::before {
    content: ''; position: absolute; left: .2em; top: .72em;
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--rt-accent);
}
.jnm-rich ul ul > li::before { background: transparent; border: 1.5px solid var(--rt-accent); width: 5px; height: 5px; }
/* numbers: drawn with a counter (site resets kill list-style on li), marigold */
.jnm-rich ol { list-style: none; counter-reset: rt-n; }
.jnm-rich ol > li { position: relative; padding-left: 1.9em; counter-increment: rt-n; list-style: none; }
.jnm-rich ol > li::before {
    content: counter(rt-n) '.';
    position: absolute; left: 0; top: 0;
    min-width: 1.4em;
    color: var(--rt-accent-d); font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.jnm-rich ul > li { list-style: none; }
.jnm-rich li > p { margin: 0 0 .3em; }                       /* <li><p>…</p></li> from pasted text */
.jnm-rich li > ul, .jnm-rich li > ol { margin: .35em 0 .5em; }
.jnm-rich li:last-child { margin-bottom: 0; }
.jnm-rich ul + p, .jnm-rich ol + p { margin-top: var(--rt-gap); }

/* ---------- Links ---------- */
.jnm-rich a {
    color: var(--rt-accent-d);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    padding: 0; background: none;
    transition: color .2s ease, text-decoration-color .2s ease;
}
.jnm-rich a:hover { color: var(--rt-ink); text-decoration-color: var(--rt-accent); }

/* ---------- Quote ---------- */
.jnm-rich blockquote {
    margin: 1.4em 0; padding: .9em 1.2em;
    border-left: 3px solid var(--rt-accent);
    background: var(--rt-wash);
    border-radius: 0 10px 10px 0;
    font-family: var(--rt-display); font-style: italic;
    color: var(--rt-ink);
}
.jnm-rich blockquote p:last-child { margin-bottom: 0; }

/* ---------- Images, video ---------- */
.jnm-rich img { display: block; max-width: 100%; height: auto; border-radius: 12px; margin: 1.3em 0; }
.jnm-rich figure { margin: 1.3em 0; max-width: 100%; }
.jnm-rich figure img { margin: 0; }
.jnm-rich figcaption { margin-top: .5em; font-size: .85em; color: var(--rt-mute); }
.jnm-rich__media { position: relative; margin: 1.3em 0; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000; }
.jnm-rich__media iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Tables (scroll sideways on phones) ---------- */
.jnm-rich__table { margin: 1.3em 0; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--rt-rule); border-radius: 12px; }
.jnm-rich table { width: 100%; min-width: 420px; border-collapse: collapse; font-size: .93em; background: var(--rt-paper); }
.jnm-rich th, .jnm-rich td { padding: .65em .9em; border-bottom: 1px solid var(--rt-rule); text-align: left; vertical-align: top; }
.jnm-rich th { color: var(--rt-ink); font-weight: 600; background: var(--rt-wash); }
.jnm-rich tr:last-child td { border-bottom: 0; }
.jnm-rich caption { caption-side: bottom; padding: .5em; font-size: .85em; color: var(--rt-mute); }

/* ---------- Misc ---------- */
.jnm-rich hr { border: 0; height: 1px; background: var(--rt-rule); margin: 1.8em 0; }
.jnm-rich pre { margin: 0 0 var(--rt-gap); padding: .9em 1em; background: var(--rt-wash); border-radius: 10px; overflow-x: auto; font-size: .88em; }
.jnm-rich code { font-size: .9em; }

/* ---------- Compact: FAQ answers, small cards ---------- */
.jnm-rich--compact { --rt-size: 15px; --rt-gap: .75em; line-height: 1.7; }
.jnm-rich--compact h2, .jnm-rich--compact h3 { font-size: 1.12em; margin: 1.2em 0 .45em; padding-bottom: 0; border-bottom: 0; }
.jnm-rich--compact h4 { font-size: 1em; margin: 1em 0 .35em; }

@media (max-width: 575px) {
    .jnm-rich { --rt-size: 15px; }
    .jnm-rich h2 { font-size: 1.4em; }
    .jnm-rich h3 { font-size: 1.2em; }
    .jnm-rich ol > li { padding-left: 1.6em; }
    .jnm-rich ul > li { padding-left: 1.2em; }
    .jnm-rich li > ul, .jnm-rich li > ol { margin-left: -.2em; }
}
