/* =========================================================
   CyberSafeHaven — Blog article stylesheet
   Matches the site theme tokens (Enry template):
   --mainColor #E13833 · --mainColor2 #104547
   Headings: Montserrat · Body: Nunito Sans
   ========================================================= */

:root {
  --mainColor: #E13833;
  --mainColor2: #104547;
  --mainColor2-dark: #0b3233;
  --optionalColor: #666666;
  --blackColor: #262E2E;
  --whiteColor: #ffffff;
  --borderColor: #e6e8e8;
  --bgLight: #fafafa;
  --bgWarm: #fbf9f7;
  --bgTeal: #f3f7f7;
  --fontFamily: "Nunito Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --headingFontFamily: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --radius: 5px;
  --shadow: 0 10px 30px rgba(16, 69, 71, .07);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  padding: 0;
  font-family: var(--fontFamily);
  font-size: 16px;
  line-height: 1.8;
  color: var(--blackColor);
  background: var(--whiteColor);
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--mainColor2); text-decoration: none; transition: color .3s ease; }
a:hover { color: var(--mainColor); }

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header ---------- */
.site-header {
  background: var(--whiteColor);
  border-bottom: 1px solid var(--borderColor);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
}

.brand {
  font-family: var(--headingFontFamily);
  font-weight: 800;
  font-size: 21px;
  letter-spacing: -.2px;
  color: var(--blackColor);
}
.brand span { color: var(--mainColor); }

.site-nav { display: flex; align-items: center; gap: 26px; }

.site-nav a {
  font-family: var(--headingFontFamily);
  font-size: 14px;
  font-weight: 600;
  color: var(--blackColor);
  position: relative;
  padding: 4px 0;
}
.site-nav a:hover,
.site-nav a.is-active { color: var(--mainColor); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--headingFontFamily);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--whiteColor);
  background: var(--mainColor);
  border: 0;
  border-radius: var(--radius);
  padding: 14px 30px;
  cursor: pointer;
  transition: background .3s ease, transform .3s ease;
}
.btn:hover { background: #c92c27; color: var(--whiteColor); transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  color: var(--mainColor2);
  border: 1px solid var(--mainColor2);
}
.btn-outline:hover { background: var(--mainColor2); color: var(--whiteColor); }

.btn-sm { padding: 10px 22px; font-size: 14px; }

/* ---------- Page banner ---------- */
.page-banner {
  background: var(--mainColor2);
  background-image:
    radial-gradient(circle at 12% 20%, rgba(255, 255, 255, .06) 0, transparent 42%),
    radial-gradient(circle at 88% 80%, rgba(225, 56, 51, .18) 0, transparent 46%);
  color: var(--whiteColor);
  padding: 66px 0 60px;
}

.breadcrumb {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .68);
  margin-bottom: 18px;
}
.breadcrumb a { color: rgba(255, 255, 255, .68); }
.breadcrumb a:hover { color: var(--whiteColor); }
.breadcrumb span { margin: 0 8px; opacity: .6; }

.page-banner h1 {
  font-family: var(--headingFontFamily);
  font-size: 44px;
  line-height: 1.18;
  font-weight: 800;
  color: var(--whiteColor);
  margin: 0 0 18px;
  max-width: 900px;
  letter-spacing: -.5px;
}

.banner-sub {
  font-size: 18px;
  line-height: 1.7;
  color: rgba(255, 255, 255, .82);
  max-width: 780px;
  margin: 0 0 26px;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  font-size: 14px;
  color: rgba(255, 255, 255, .72);
}
.post-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: rgba(255, 255, 255, .5); }
.post-meta .tag {
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 40px;
  padding: 3px 14px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--whiteColor);
}

/* ---------- Article ---------- */
.article-section { padding: 60px 0 70px; background: var(--whiteColor); }

.article-wrap { max-width: 900px; }

.post-body p {
  color: var(--optionalColor);
  font-size: 17px;
  line-height: 1.85;
  margin: 0 0 20px;
}

.post-body .lead {
  font-size: 19px;
  line-height: 1.75;
  color: #4a5252;
  margin-bottom: 26px;
}

.post-body strong { color: var(--blackColor); font-weight: 700; }

.post-body h2 {
  font-family: var(--headingFontFamily);
  font-size: 30px;
  line-height: 1.3;
  font-weight: 700;
  color: var(--blackColor);
  margin: 56px 0 20px;
  padding-top: 22px;
  position: relative;
  letter-spacing: -.3px;
}
.post-body h2::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--mainColor);
}

.post-body h3 {
  font-family: var(--headingFontFamily);
  font-size: 20px;
  line-height: 1.45;
  font-weight: 700;
  color: var(--mainColor2);
  margin: 36px 0 14px;
}

.post-body ul, .post-body ol {
  margin: 0 0 22px;
  padding-left: 22px;
  color: var(--optionalColor);
}
.post-body li { font-size: 17px; line-height: 1.8; margin-bottom: 12px; }
.post-body li::marker { color: var(--mainColor); }

/* ---------- Table of contents ---------- */
.toc {
  background: var(--bgTeal);
  border: 1px solid #dde8e8;
  border-radius: 8px;
  padding: 26px 30px;
  margin-bottom: 44px;
}
.toc h2 {
  font-family: var(--headingFontFamily);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--mainColor2);
  margin: 0 0 14px;
  padding: 0;
}
.toc h2::before { display: none; }
.toc ol { margin: 0; padding-left: 18px; columns: 2; column-gap: 34px; }
.toc li { font-size: 15px; line-height: 1.6; margin-bottom: 8px; }
.toc a { color: #33504f; }
.toc a:hover { color: var(--mainColor); }

/* ---------- Tables ---------- */
.table-wrap {
  margin: 28px 0 34px;
  overflow-x: auto;
  border: 1px solid var(--borderColor);
  border-radius: 8px;
  background: var(--whiteColor);
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.6;
}

thead th {
  background: var(--mainColor2);
  color: var(--whiteColor);
  font-family: var(--headingFontFamily);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  text-align: left;
  padding: 16px 18px;
  border: 0;
}

tbody td {
  padding: 15px 18px;
  border-top: 1px solid var(--borderColor);
  color: var(--optionalColor);
  vertical-align: top;
}

tbody tr:nth-child(even) { background: var(--bgWarm); }
tbody tr:hover { background: #f4f8f8; }

tbody td:first-child {
  color: var(--blackColor);
  font-weight: 700;
  font-family: var(--headingFontFamily);
  font-size: 14px;
}

.table-note {
  font-size: 14px !important;
  color: #8a9191 !important;
  margin: -20px 0 34px !important;
}

/* ---------- Callouts ---------- */
.callout {
  background: var(--bgWarm);
  border-left: 4px solid var(--mainColor);
  border-radius: 0 8px 8px 0;
  padding: 22px 26px;
  margin: 30px 0;
}
.callout p { font-size: 16.5px; margin: 0; color: #4a5252; }
.callout p + p { margin-top: 12px; }

.takeaways {
  background: var(--bgTeal);
  border: 1px solid #dde8e8;
  border-radius: 8px;
  padding: 28px 30px;
  margin: 44px 0 0;
}
.takeaways h3 {
  margin: 0 0 14px;
  font-size: 15px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--mainColor2);
}
.takeaways ul { margin: 0; padding-left: 20px; }
.takeaways li { font-size: 16px; margin-bottom: 10px; }

/* ---------- References ---------- */
.references { margin-top: 44px; padding-top: 26px; border-top: 1px solid var(--borderColor); }
.references h3 {
  font-size: 13px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--mainColor2);
  margin: 0 0 12px;
}
.references ol { padding-left: 20px; margin: 0; }
.references li { font-size: 14.5px; line-height: 1.7; color: var(--optionalColor); margin-bottom: 8px; }
.references .table-note { margin: 18px 0 0 !important; padding-top: 14px; border-top: 1px solid var(--borderColor); }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--mainColor2);
  color: var(--whiteColor);
  padding: 58px 0;
  text-align: center;
}
.cta-band h2 {
  font-family: var(--headingFontFamily);
  font-size: 32px;
  font-weight: 700;
  color: var(--whiteColor);
  margin: 0 0 14px;
}
.cta-band p {
  font-size: 17px;
  color: rgba(255, 255, 255, .82);
  max-width: 680px;
  margin: 0 auto 26px;
}
.cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.cta-band .btn-outline { color: var(--whiteColor); border-color: rgba(255, 255, 255, .5); }
.cta-band .btn-outline:hover { background: var(--whiteColor); color: var(--mainColor2); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--mainColor2-dark);
  color: rgba(255, 255, 255, .66);
  padding: 34px 0;
  font-size: 14px;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}
.site-footer a { color: rgba(255, 255, 255, .8); }
.site-footer a:hover { color: var(--whiteColor); }

/* ---------- Responsive ---------- */
@media only screen and (max-width: 991px) {
  .site-nav { display: none; }
  .page-banner { padding: 48px 0 44px; }
  .page-banner h1 { font-size: 34px; }
  .banner-sub { font-size: 16.5px; }
  .post-body h2 { font-size: 26px; margin-top: 46px; }
  .toc ol { columns: 1; }
}

@media only screen and (max-width: 600px) {
  body { font-size: 15px; }
  .container { padding: 0 18px; }
  .header-inner { min-height: 64px; }
  .page-banner h1 { font-size: 27px; }
  .article-section { padding: 40px 0 50px; }
  .post-body p, .post-body li { font-size: 16px; }
  .post-body .lead { font-size: 17px; }
  .post-body h2 { font-size: 23px; }
  .post-body h3 { font-size: 18px; }
  table { min-width: 560px; font-size: 14px; }
  .post-meta { gap: 8px 12px; font-size: 13px; }
  .post-meta .dot { display: none; }
  .toc { padding: 22px 20px; }
  thead th, tbody td { padding: 12px 14px; }
  .cta-band h2 { font-size: 25px; }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .cta-band, .site-footer, .toc { display: none; }
  .page-banner { background: none; color: #000; padding: 0 0 18px; }
  .page-banner h1, .banner-sub, .post-meta { color: #000; }
  .post-body h2 { page-break-after: avoid; }
  .table-wrap { overflow: visible; }
  table { min-width: 0; }
}

/* =========================================================
   Article components — stats, framework steps, comparison
   (additive; used by long-form analysis posts)
   ========================================================= */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 34px 0 40px;
}

.stat {
  display: flex;
  flex-direction: column;
  background: var(--whiteColor);
  border: 1px solid var(--borderColor);
  border-top: 3px solid var(--mainColor);
  border-radius: 8px;
  padding: 22px 20px 18px;
}

.stat .num {
  font-family: var(--headingFontFamily);
  font-size: 33px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--mainColor2);
  letter-spacing: -.5px;
}

.stat .label {
  font-size: 15px;
  line-height: 1.55;
  color: var(--optionalColor);
  margin-top: 9px;
}

.stat .src {
  margin-top: auto;
  padding-top: 14px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: #9aa2a2;
}

/* Numbered framework steps */
.steps { counter-reset: step; margin: 30px 0 6px; }

.step {
  position: relative;
  background: var(--whiteColor);
  border: 1px solid var(--borderColor);
  border-radius: 8px;
  padding: 22px 26px 22px 78px;
  margin-bottom: 16px;
}

.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 22px;
  top: 20px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--mainColor2);
  color: var(--whiteColor);
  font-family: var(--headingFontFamily);
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step h4 {
  margin: 0 0 8px;
  font-family: var(--headingFontFamily);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--blackColor);
}

.step h4 span {
  color: var(--mainColor);
  font-weight: 800;
}

.step p { margin: 0; font-size: 16px; line-height: 1.75; }
.step p + p { margin-top: 10px; }

.step .output {
  display: block;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--borderColor);
  font-size: 14.5px;
  color: #7d8585;
}
.step .output strong { color: var(--mainColor2); }

/* Two-column split for before/after arguments */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 30px 0 36px;
}

.split .panel {
  border: 1px solid var(--borderColor);
  border-radius: 8px;
  padding: 24px 26px;
  background: var(--bgWarm);
}

.split .panel.alt { background: var(--bgTeal); border-color: #dde8e8; }

.split h4 {
  margin: 0 0 12px;
  font-family: var(--headingFontFamily);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--mainColor2);
}

.split ul { margin: 0; padding-left: 18px; }
.split li { font-size: 15px; line-height: 1.65; margin-bottom: 9px; color: var(--optionalColor); }

/* Tag pills inside table cells */
.tt {
  display: inline-block;
  font-family: var(--headingFontFamily);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .03em;
  padding: 2px 9px;
  border-radius: 30px;
  background: #f0f3f3;
  color: var(--mainColor2);
  white-space: nowrap;
}

@media only screen and (max-width: 991px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; }
}

@media only screen and (max-width: 600px) {
  .stat-grid { grid-template-columns: 1fr; gap: 12px; }
  .stat .num { font-size: 28px; }
  .step { padding: 20px 20px 20px 20px; }
  .step::before { position: static; margin-bottom: 12px; }
}

/* ---------- Figures ---------- */
.figure {
  margin: 34px 0 40px;
  border: 1px solid var(--borderColor);
  border-radius: 10px;
  background: var(--whiteColor);
  padding: 24px 24px 16px;
  box-shadow: var(--shadow);
}

.figure svg { width: 100%; height: auto; display: block; }

.fig-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.fig-caption {
  font-size: 14px;
  line-height: 1.65;
  color: #7d8585;
  margin: 16px 4px 4px;
  text-align: center;
}
.fig-caption strong { color: var(--mainColor2); }

@media only screen and (max-width: 600px) {
  .figure { padding: 14px 12px 10px; }
  .fig-scroll svg { min-width: 700px; }
  .fig-caption { font-size: 13px; text-align: left; }
}

.fig-hint { display: none; }
@media only screen and (max-width: 600px) {
  .fig-hint {
    display: block;
    font-size: 12.5px;
    color: #8a9191;
    text-align: center;
    margin: 10px 0 0;
  }
}

/* ---------- Photograph figures ---------- */
.figure-photo {
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  padding: 14px 14px 10px;
}
.figure-photo img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
}
.figure-photo .fig-caption {
  text-align: left;
  font-size: 13px;
  line-height: 1.6;
  margin: 14px 2px 4px;
}
