/*
 * Insights article body styling.
 *
 * Applies to the text inside an article on the Insights detail page only
 * (the .rtBx box), so no other page is affected. It styles plain HTML tags
 * (headings, lists, tables, quotes...) because the saved article HTML carries no
 * classes or inline styles by design (see common/components/ArticleHtml.php).
 *
 * Loaded by frontend/views/site/insightsDetails.php with a ?v= number.
 * After editing this file, change that number so browsers fetch the new copy
 * (the server tells browsers to keep CSS for a year).
 *
 * Colours follow the site palette: brown #50220f / #63493a, gold #a29061,
 * grey #f3f3f1, border #e5e5e5.
 */

.insightsPage #detailSec .detailBx .rtBx {
    min-width: 0;
    overflow-wrap: break-word;
}

/* Page heading: the article title is now the <h1>; keep it looking as before */
.insightsPage #detailSec .headBx h1.title {
    margin-top: 0;
    line-height: inherit;
}
/* The "Insights" label in the banner is no longer a heading; keep its spacing */
.insightsPage #PageBanner .BannerContent .pageHead {
    margin: 0 0 .5rem;
}

/* ---------- Headings inside the article ---------- */
.insightsPage #detailSec .detailBx .rtBx h2,
.insightsPage #detailSec .detailBx .rtBx h3,
.insightsPage #detailSec .detailBx .rtBx h4,
.insightsPage #detailSec .detailBx .rtBx h5,
.insightsPage #detailSec .detailBx .rtBx h6 {
    font-family: "EB Garamond", serif;
    font-weight: 500;
    line-height: 1.25;
    scroll-margin-top: 100px;
}
.insightsPage #detailSec .detailBx .rtBx h2 {
    font-size: 22px;
    color: #50220f;
    margin: 38px 0 12px;
}
.insightsPage #detailSec .detailBx .rtBx h3 {
    font-size: 19px;
    color: #000;
    margin: 28px 0 10px;
}
.insightsPage #detailSec .detailBx .rtBx h4,
.insightsPage #detailSec .detailBx .rtBx h5,
.insightsPage #detailSec .detailBx .rtBx h6 {
    font-size: 17px;
    font-weight: 600;
    color: #000;
    margin: 22px 0 8px;
}
.insightsPage #detailSec .detailBx .rtBx > :first-child {
    margin-top: 0;
}
@media (min-width: 768px) {
    .insightsPage #detailSec .detailBx .rtBx h2 { font-size: 25px; }
    .insightsPage #detailSec .detailBx .rtBx h3 { font-size: 21px; }
    .insightsPage #detailSec .detailBx .rtBx h4,
    .insightsPage #detailSec .detailBx .rtBx h5,
    .insightsPage #detailSec .detailBx .rtBx h6 { font-size: 18px; }
}
@media (min-width: 1200px) {
    .insightsPage #detailSec .detailBx .rtBx h2 { font-size: 28px; }
    .insightsPage #detailSec .detailBx .rtBx h3 { font-size: 22px; }
}

/* ---------- Text ---------- */
.insightsPage #detailSec .detailBx .rtBx strong,
.insightsPage #detailSec .detailBx .rtBx b {
    font-weight: 700;
}
.insightsPage #detailSec .detailBx .rtBx a {
    color: #7a6a3c;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.insightsPage #detailSec .detailBx .rtBx a:hover,
.insightsPage #detailSec .detailBx .rtBx a:focus {
    color: #50220f;
}
.insightsPage #detailSec .detailBx .rtBx sup,
.insightsPage #detailSec .detailBx .rtBx sub {
    font-size: 70%;
    line-height: 0;
}

/* ---------- Lists (the site's dot bullets come from app-main.min.css) ---------- */
.insightsPage #detailSec .detailBx .rtBx ul {
    list-style: none;
}
.insightsPage #detailSec .detailBx .rtBx ol {
    list-style: decimal;
    padding-left: 24px;
}
.insightsPage #detailSec .detailBx .rtBx ol li {
    padding-left: 6px;
}
.insightsPage #detailSec .detailBx .rtBx li ul,
.insightsPage #detailSec .detailBx .rtBx li ol {
    margin-top: 8px;
    margin-bottom: 0;
}
.insightsPage #detailSec .detailBx .rtBx li p {
    margin-bottom: 6px;
}

/* ---------- Quote / callout (<blockquote>) ---------- */
.insightsPage #detailSec .detailBx .rtBx blockquote {
    background: #f3f3f1;
    border-left: 4px solid #a29061;
    margin: 26px 0;
    padding: 16px 22px;
    font-style: normal;
}
.insightsPage #detailSec .detailBx .rtBx blockquote p {
    text-align: left;
}
.insightsPage #detailSec .detailBx .rtBx blockquote > :last-child {
    margin-bottom: 0;
}

/* ---------- Tables (wrapped in .tblWrap so wide tables scroll on phones) ---------- */
.insightsPage #detailSec .detailBx .rtBx .tblWrap {
    overflow-x: auto;
    margin: 24px 0;
    -webkit-overflow-scrolling: touch;
}
.insightsPage #detailSec .detailBx .rtBx table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    line-height: 22px;
}
.insightsPage #detailSec .detailBx .rtBx caption {
    caption-side: top;
    padding: 0 0 8px;
    font-weight: 600;
    color: #50220f;
    text-align: left;
}
.insightsPage #detailSec .detailBx .rtBx th,
.insightsPage #detailSec .detailBx .rtBx td {
    border: 1px solid #e5e5e5;
    padding: 10px 12px;
    vertical-align: top;
    text-align: left;
    color: #000;
}
.insightsPage #detailSec .detailBx .rtBx th {
    background: #f2f2f2;
    font-weight: 700;
}
.insightsPage #detailSec .detailBx .rtBx td p,
.insightsPage #detailSec .detailBx .rtBx th p {
    margin-bottom: 6px;
    font-size: inherit;
    line-height: inherit;
    text-align: left;
}

/* ---------- Other elements ---------- */
.insightsPage #detailSec .detailBx .rtBx hr {
    border: 0;
    border-top: 1px solid #e5e5e5;
    margin: 30px 0;
    opacity: 1;
}
.insightsPage #detailSec .detailBx .rtBx img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 22px auto;
}
.insightsPage #detailSec .detailBx .rtBx pre {
    background: #f2f2f2;
    padding: 14px 16px;
    margin: 0 0 25px;
    overflow-x: auto;
    font-size: 13px;
    line-height: 20px;
}
.insightsPage #detailSec .detailBx .rtBx code {
    font-size: 90%;
    color: #50220f;
}
.insightsPage #detailSec .detailBx .rtBx pre code {
    color: inherit;
    font-size: inherit;
}

/* ---------- "Contents" box (built automatically from the H2 headings) ---------- */
.insightsPage #detailSec .detailBx .rtBx .artToc {
    background: #f3f3f1;
    border: 1px solid #e5e5e5;
    padding: 18px 22px 8px;
    margin: 0 0 32px;
}
.insightsPage #detailSec .detailBx .rtBx .artToc .tocTitle {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #50220f;
    margin-bottom: 10px;
}
.insightsPage #detailSec .detailBx .rtBx .artToc ul {
    margin: 0;
    padding: 0;
}
.insightsPage #detailSec .detailBx .rtBx .artToc li {
    padding-left: 0;
    margin-bottom: 8px;
}
.insightsPage #detailSec .detailBx .rtBx .artToc li::after {
    display: none;
}
.insightsPage #detailSec .detailBx .rtBx .artToc a {
    color: #000;
    text-decoration: none;
}
.insightsPage #detailSec .detailBx .rtBx .artToc a:hover,
.insightsPage #detailSec .detailBx .rtBx .artToc a:focus {
    color: #50220f;
    text-decoration: underline;
}
