/* BSN SafeCMS V15.1 — SINGLE SOURCE OF TRUTH
   Loaded by both frontend article pages and the Admin visual editor. */

.article-content,
.rich-editor{
  font-family:"Segoe UI Variable","Segoe UI",Arial,Helvetica,sans-serif;
  font-size:16.25px;
  line-height:1.64;
  color:#2f2d2b;
  overflow-wrap:anywhere;
  word-break:normal;
}

/* Normal prose rhythm */
.article-content p,
.rich-editor p{
  margin:0 0 8px !important;
  line-height:1.64 !important;
}
.article-content p:empty,
.rich-editor p:empty,
.article-content p:has(> br:only-child),
.rich-editor p:has(> br:only-child){
  display:none !important;
}
.article-content strong,.article-content b,
.rich-editor strong,.rich-editor b{font-weight:700}
.article-content em,.article-content i,
.rich-editor em,.rich-editor i{font-style:italic}
.article-content u,.rich-editor u{text-decoration:underline}
.article-content s,.article-content strike,
.rich-editor s,.rich-editor strike{text-decoration:line-through}

/* ------------------------------------------------------------
   Real section headings ONLY.
   New editor headings carry data-bsn-heading="1".
   Old trusted headings get the transient .bsn-legacy-heading class.
   ------------------------------------------------------------ */
.article-content h2[data-bsn-heading="1"],
.article-content h3[data-bsn-heading="1"],
.article-content h4[data-bsn-heading="1"],
.article-content h5[data-bsn-heading="1"],
.article-content .bsn-legacy-heading,
.rich-editor h2[data-bsn-heading="1"],
.rich-editor h3[data-bsn-heading="1"],
.rich-editor h4[data-bsn-heading="1"],
.rich-editor h5[data-bsn-heading="1"],
.rich-editor .bsn-legacy-heading{
  display:block !important;
  box-sizing:border-box !important;
  width:100% !important;
  margin:18px 0 10px !important;
  padding:12px 16px !important;
  border:0 !important;
  border-left:4px solid #f39a73 !important;
  border-radius:0 11px 11px 0 !important;
  background:#fff6f1 !important;
  color:#e65d0b !important;
  font-size:16.5px !important;
  line-height:1.4 !important;
  font-weight:800 !important;
  letter-spacing:0 !important;
  text-transform:none !important;
}

.article-content h2[data-bsn-heading="1"] *,
.article-content h3[data-bsn-heading="1"] *,
.article-content h4[data-bsn-heading="1"] *,
.article-content h5[data-bsn-heading="1"] *,
.article-content .bsn-legacy-heading *,
.rich-editor h2[data-bsn-heading="1"] *,
.rich-editor h3[data-bsn-heading="1"] *,
.rich-editor h4[data-bsn-heading="1"] *,
.rich-editor h5[data-bsn-heading="1"] *,
.rich-editor .bsn-legacy-heading *{
  color:inherit !important;
  font-size:inherit !important;
  line-height:inherit !important;
}

/* Old H-tags that are really paragraph/media containers.
   Never give them the orange box. */
.article-content h2:not([data-bsn-heading="1"]):not(.bsn-legacy-heading),
.article-content h3:not([data-bsn-heading="1"]):not(.bsn-legacy-heading),
.article-content h4:not([data-bsn-heading="1"]):not(.bsn-legacy-heading),
.article-content h5:not([data-bsn-heading="1"]):not(.bsn-legacy-heading),
.rich-editor h2:not([data-bsn-heading="1"]):not(.bsn-legacy-heading),
.rich-editor h3:not([data-bsn-heading="1"]):not(.bsn-legacy-heading),
.rich-editor h4:not([data-bsn-heading="1"]):not(.bsn-legacy-heading),
.rich-editor h5:not([data-bsn-heading="1"]):not(.bsn-legacy-heading){
  display:block !important;
  width:auto !important;
  margin:0 0 8px !important;
  padding:0 !important;
  border:0 !important;
  border-left:0 !important;
  border-radius:0 !important;
  background:transparent !important;
  color:inherit !important;
  font-size:inherit !important;
  line-height:1.64 !important;
  font-weight:400 !important;
  letter-spacing:0 !important;
  text-transform:none !important;
}
.article-content h2:not([data-bsn-heading="1"]):not(.bsn-legacy-heading) strong,
.article-content h3:not([data-bsn-heading="1"]):not(.bsn-legacy-heading) strong,
.article-content h4:not([data-bsn-heading="1"]):not(.bsn-legacy-heading) strong,
.article-content h5:not([data-bsn-heading="1"]):not(.bsn-legacy-heading) strong,
.rich-editor h2:not([data-bsn-heading="1"]):not(.bsn-legacy-heading) strong,
.rich-editor h3:not([data-bsn-heading="1"]):not(.bsn-legacy-heading) strong,
.rich-editor h4:not([data-bsn-heading="1"]):not(.bsn-legacy-heading) strong,
.rich-editor h5:not([data-bsn-heading="1"]):not(.bsn-legacy-heading) strong{
  font-weight:700 !important;
}

/* Links */
.article-content a,
.rich-editor a{
  color:inherit;
  font-weight:inherit;
  text-decoration-line:underline;
  text-decoration-color:#f7a27f;
  text-decoration-thickness:1.5px;
  text-underline-offset:3px;
  text-decoration-skip-ink:auto;
}
.article-content a:hover,.rich-editor a:hover{
  text-decoration-color:#e37c55;
  text-decoration-thickness:2px;
}
.article-content a:has(img),.article-content a:has(picture),.article-content a:has(figure),
.rich-editor a:has(img),.rich-editor a:has(picture),.rich-editor a:has(figure){
  text-decoration:none !important;
  border:0 !important;
  background:transparent !important;
  box-shadow:none !important;
}

/* Lists */
.article-content ul,.article-content ol,
.rich-editor ul,.rich-editor ol{
  margin:4px 0 9px !important;
  padding-left:1.45em;
  line-height:1.62;
}
.article-content li,.rich-editor li{
  margin:2px 0 3px !important;
  line-height:1.62 !important;
}
.article-content ul[data-list-style="disc"],.rich-editor ul[data-list-style="disc"]{list-style-type:disc}
.article-content ul[data-list-style="circle"],.rich-editor ul[data-list-style="circle"]{list-style-type:circle}
.article-content ul[data-list-style="square"],.rich-editor ul[data-list-style="square"]{list-style-type:square}
.article-content ol[data-list-style="decimal"],.rich-editor ol[data-list-style="decimal"]{list-style-type:decimal}
.article-content ol[data-list-style="lower-alpha"],.rich-editor ol[data-list-style="lower-alpha"]{list-style-type:lower-alpha}
.article-content ol[data-list-style="upper-alpha"],.rich-editor ol[data-list-style="upper-alpha"]{list-style-type:upper-alpha}
.article-content ol[data-list-style="lower-roman"],.rich-editor ol[data-list-style="lower-roman"]{list-style-type:lower-roman}
.article-content ol[data-list-style="upper-roman"],.rich-editor ol[data-list-style="upper-roman"]{list-style-type:upper-roman}
.article-content ul[data-list-style="dash"] li::marker,.rich-editor ul[data-list-style="dash"] li::marker{content:"–  "}
.article-content ul[data-list-style="star"] li::marker,.rich-editor ul[data-list-style="star"] li::marker{content:"★  ";color:#e65d0b}
.article-content ul[data-list-style="arrow"] li::marker,.rich-editor ul[data-list-style="arrow"] li::marker{content:"→  ";color:#e65d0b}
.article-content ul[data-list-style="check"] li::marker,.rich-editor ul[data-list-style="check"] li::marker{content:"✓  ";color:#2e8b57}

/* Blockquote / HR */
.article-content blockquote,.rich-editor blockquote{
  margin:12px 0 !important;
  padding:14px 18px;
  border-left:4px solid #f7a27f;
  border-radius:0 10px 10px 0;
  background:#fff8f4;
  color:#555;
}
.article-content hr,.rich-editor hr{
  height:1px;
  margin:20px 0 15px !important;
  border:0;
  background:#ddd8d4;
}

/* Media — compact, centered, no accidental heading decoration */
.article-content img,.rich-editor img{
  display:block;
  max-width:100%;
  height:auto;
  margin:10px auto !important;
  border:0 !important;
  border-left:0 !important;
  border-radius:9px;
  background:transparent !important;
  box-shadow:none;
}
.article-content figure,.rich-editor figure{
  max-width:100%;
  margin:10px auto !important;
  padding:0 !important;
  border:0 !important;
  background:transparent !important;
  text-align:center;
}
.article-content figure img,.rich-editor figure img{margin-left:auto!important;margin-right:auto!important}
.article-content figcaption,.rich-editor figcaption{
  margin-top:5px;
  color:#78716c;
  font-size:12px;
  line-height:1.45;
  text-align:center;
}
.article-content .alignleft,.rich-editor .alignleft{float:left;margin:6px 16px 10px 0!important}
.article-content .alignright,.rich-editor .alignright{float:right;margin:6px 0 10px 16px!important}
.article-content .aligncenter,.rich-editor .aligncenter{float:none;display:block;margin-left:auto!important;margin-right:auto!important}

/* Tables */
.article-content table,.rich-editor table{
  width:100%;
  margin:12px 0 !important;
  border-collapse:collapse;
  overflow-wrap:normal;
}
.article-content th,.article-content td,
.rich-editor th,.rich-editor td{
  padding:8px 9px;
  border:1px solid #ded9d5;
  vertical-align:top;
}
.article-content th,.rich-editor th{font-weight:700;background:#faf7f5}

/* Legacy migrated bullets */
.article-content .legacy-bullet,
.rich-editor .legacy-bullet{
  margin:0 0 4px !important;
  line-height:1.62 !important;
}

.article-content > :first-child,.rich-editor > :first-child{margin-top:0!important}
.article-content > :last-child,.rich-editor > :last-child{margin-bottom:0!important}

@media(max-width:700px){
  .article-content,.rich-editor{font-size:16.5px;line-height:1.66}
  .article-content p,.rich-editor p{margin-bottom:7px!important;line-height:1.66!important}

  .article-content h2[data-bsn-heading="1"],
  .article-content h3[data-bsn-heading="1"],
  .article-content h4[data-bsn-heading="1"],
  .article-content h5[data-bsn-heading="1"],
  .article-content .bsn-legacy-heading,
  .rich-editor h2[data-bsn-heading="1"],
  .rich-editor h3[data-bsn-heading="1"],
  .rich-editor h4[data-bsn-heading="1"],
  .rich-editor h5[data-bsn-heading="1"],
  .rich-editor .bsn-legacy-heading{
    margin:16px 0 8px!important;
    padding:12px 15px!important;
    font-size:17.5px!important;
    line-height:1.38!important;
    font-weight:800!important;
  }

  .article-content ul,.article-content ol,
  .rich-editor ul,.rich-editor ol{margin:3px 0 8px!important}
  .article-content img,.rich-editor img,
  .article-content figure,.rich-editor figure{margin-top:8px!important;margin-bottom:8px!important}
}
