/* ================================================================
   Advertorial — Case Study v2
   Chrome: Classic News style (topbar, header, nav, offerbar, footer)
   Colour: Green (#16a34a) — overridable via config.js cta_color
   Typography: Serif for headings + body, sans for UI chrome
   Container: 1080px wide; article text constrained to ~680px via
              .prose wrapper for comfortable line length
   ================================================================ */

/* ─── Tokens ─────────────────────────────────────────────────── */
:root{
  --bg:         #ffffff;
  --ink:        #111111;
  --muted:      #5b5b5b;
  --border:     #e5e5e5;
  --paper:      #fafafa;
  --link:       #166534;       /* green link, matches CTA family */
  --link-hover: #14532d;

  --cta:        #16a34a;       /* overridden by config.js cta_color */
  --cta-hover:  #15803d;       /* overridden by config.js cta_hover_color */

  /* CTA box tint — green wash */
  --cta-bg:     #f0fdf4;
  --cta-border: #bbf7d0;

  --max:        1080px;        /* wider container so nav doesn't wrap */
  --prose:      680px;         /* readable article line length */
  --radius:     14px;
  --serif:  ui-serif, Georgia, "Times New Roman", Times, serif;
  --sans:   ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  --mono:   ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Courier New", monospace;
}

/* ─── Reset ──────────────────────────────────────────────────── */
*{ box-sizing: border-box }
html, body{ height: 100% }
body{
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);     /* serif body */
  font-size: 18.5px;
  line-height: 1.80;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  padding-bottom: 76px;
}
a{ color: var(--link); text-decoration: none }
a:hover{ color: var(--link-hover); text-decoration: underline }
img{ max-width: 100%; display: block }

/* Wide container for chrome (nav won't wrap) */
.container{
  width: min(100% - 32px, var(--max));
  margin-inline: auto;
}
/* Narrower prose container for article readability */
.prose{
  max-width: var(--prose);
  margin-inline: auto;
}

/* ─── Topbar — Classic News ──────────────────────────────────── */
.topbar{
  position: sticky;
  top: 0;
  z-index: 50;
  background: #111;
  color: #fff;
  border-bottom: 1px solid #222;
}
.topbar-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
}
.badge{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-weight: 650;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: 12px;
}
.badge-dot{
  width: 8px; height: 8px;
  border-radius: 99px;
  background: #ffcc00;
  display: inline-block;
  flex-shrink: 0;
}
.topbar-right{
  font-size: 12px;
  color: #cfcfcf;
  white-space: nowrap;
  font-family: var(--sans);
}
.topbar-right a{ color: #cfcfcf; text-decoration: underline; text-underline-offset: 2px }
.topbar-right a:hover{ color: #fff }
@media (max-width: 600px) { .topbar-detail { display: none } }

/* ─── Site header — Classic News ─────────────────────────────── */
.sitehead{
  border-bottom: 1px solid var(--border);
  background: #fff;
}
.sitehead-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
  flex-wrap: nowrap;   /* never wrap: container is wide enough */
}
@media (max-width: 680px) { .sitehead-inner { justify-content: center } }
.brand{
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-shrink: 0;      /* brand never shrinks */
}
@media (max-width: 600px) { .brand { flex-direction: column; align-items: center; gap: 2px } }
.brand-mark{
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-weight: 800;
  font-size: 24px;
  letter-spacing: -.02em;
  white-space: nowrap;
}
.brand-icon{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border-radius: 999px;
  background: rgba(0,0,0,.06);
  color: var(--cta);
  flex-shrink: 0;
}
.brand-tag{
  font-family: var(--sans);
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

/* ─── Nav — Classic News + CTA pill ─────────────────────────── */
.nav{
  display: flex;
  gap: 4px;
  align-items: center;
  font-family: var(--sans);
  flex-shrink: 0;
  flex-wrap: nowrap;
}
.nav a{
  font-size: 13px;
  color: #222;
  padding: 6px 9px;
  border-radius: 10px;
  text-decoration: none;
  white-space: nowrap;
}
.nav a:hover{
  background: var(--paper);
  text-decoration: none;
  color: #111;
}
.nav a.nav-cta{
  background: var(--cta);
  color: #fff !important;
  padding: 7px 15px;
  border-radius: 999px;
  font-weight: 750;
  margin-left: 6px;
}
.nav a.nav-cta:hover{
  background: var(--cta-hover);
  opacity: 1;
}
@media (max-width: 680px){
  .nav{ display: none }
}

/* ─── Page layout ────────────────────────────────────────────── */
.main{ padding: 26px 0 0; }

.breadcrumb{
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 14px;
  font-family: var(--sans);
}
.breadcrumb span{ color: #aaa }

.kicker{
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #222;
  font-weight: 650;
  font-family: var(--sans);
  margin-bottom: 8px;
}

h1{
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.10;
  font-size: clamp(30px, 3.8vw, 46px);
  margin: 0 0 12px;
}

/* Subhead — serif to match body register */
.subhead{
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 400;
  color: #2a2a2a;
  line-height: 1.60;
  margin: 0 0 14px;
}

/* ─── Meta chips ─────────────────────────────────────────────── */
.meta{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 20px;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
}
.meta strong{ color: #222; font-weight: 650 }
.chip{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  background: var(--paper);
  padding: 4px 10px;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 12px;
}
.chip .pin{
  color: var(--cta);
  display: inline-flex;
  align-items: center;
}

/* ─── Hero image ─────────────────────────────────────────────── */
.hero{
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper);
  margin-bottom: 26px;
}
.hero img{ width: 100%; height: auto; display: block }
.caption{
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  font-family: var(--sans);
  font-size: 12px;
  color: var(--muted);
}

/* ─── Body copy ──────────────────────────────────────────────── */
.section{ padding: 4px 0 26px; }
.section p{ margin: 0 0 18px; font-family: var(--serif) }

hr.sep{
  border: 0;
  border-top: 1px solid var(--border);
  margin: 26px 0;
}

/* Section label (uppercase sans kicker above story-title) */
.h2{
  font-family: var(--sans);
  font-weight: 900;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--cta);
  margin: 22px 0 4px;
}
/* Section heading (serif, larger) */
.story-title{
  font-family: var(--serif);
  font-weight: 700;
  font-size: 26px;
  line-height: 1.22;
  letter-spacing: -.01em;
  margin: 0 0 14px;
}

/* ─── Callout box ────────────────────────────────────────────── */
.callout{
  border: 1px solid var(--border);
  background: var(--paper);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin: 20px 0;
  font-family: var(--sans);
}
.callout-title,
.callout > strong:first-child{
  display: block;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #222;
  font-weight: 750;
  margin-bottom: 8px;
}
.callout .note{
  font-family: var(--sans);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}
.callout ul{
  margin: 8px 0 0;
  padding-left: 18px;
  color: #333;
  font-size: 14.5px;
  font-family: var(--sans);
  line-height: 1.6;
}
.callout li{ margin: 5px 0 }

/* ─── Pull quote ─────────────────────────────────────────────── */
.pullquote{
  border-left: 4px solid #111;
  padding: 8px 0 8px 16px;
  margin: 24px 0;
  font-family: var(--serif);
  font-size: 23px;
  line-height: 1.30;
  color: #111;
}
.pullquote cite{
  display: block;
  margin-top: 8px;
  font-family: var(--sans);
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

/* ─── Inline images ──────────────────────────────────────────── */
.inline-img{
  margin: 20px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.inline-img img{ width: 100%; height: auto; display: block }
.inline-img .cap{
  padding: 9px 12px;
  border-top: 1px solid var(--border);
  font-family: var(--sans);
  font-size: 12px;
  color: var(--muted);
}

/* ─── Timeline ───────────────────────────────────────────────── */
.timeline{
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 18px 0;
}
.step{
  display: flex;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: var(--radius);
}
.step .dot{
  width: 10px; height: 10px;
  border-radius: 999px;
  background: var(--cta);
  margin-top: 9px;
  flex: 0 0 auto;
}
.step .kicker{
  font-family: var(--sans);
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: 11px;
  color: var(--cta);
  margin-bottom: 4px;
}
.step p{
  margin: 0;
  font-size: 16px;
  color: #222;
  font-family: var(--serif);
  line-height: 1.65;
}

/* ─── Before / After ────────────────────────────────────────── */
.ba{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 18px 0;
}
@media (max-width: 560px){
  .ba{ grid-template-columns: 1fr }
}
.ba .panel{
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}
.ba .panel img{ width: 100%; height: auto; display: block }
.ba .panel .head{
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .10em;
  color: #444;
}

/* ─── CTA box — green tint ───────────────────────────────────── */
.cta-box{
  border: 1px solid var(--cta-border);
  background: var(--cta-bg);
  border-radius: calc(var(--radius) + 2px);
  padding: 16px 18px;
  margin: 22px 0;
}
.cta-box h3{
  margin: 0 0 8px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #166534;
}
.cta-box p{
  margin: 0 0 14px;
  font-family: var(--sans);
  font-size: 14.5px;
  color: #333;
  line-height: 1.6;
}
.cta-row{
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.cta-row > div{
  font-family: var(--sans);
  font-size: 14.5px;
  color: #333;
  line-height: 1.5;
}
.cta-row strong{ color: #111; font-size: 15px }

/* ─── Button — pill, green, Classic News weight ──────────────── */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--cta);
  color: #fff !important;
  font-family: var(--sans);
  font-weight: 750;
  font-size: 14px;
  letter-spacing: .01em;
  text-decoration: none !important;
  white-space: nowrap;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .12s ease, transform .08s ease;
}
.btn:hover{ background: var(--cta-hover); color: #fff !important }
.btn:active{ transform: translateY(1px) }

/* ─── Inline link ────────────────────────────────────────────── */
.inline-link{
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.inline-link:hover{ opacity: .80 }

/* ─── Offer bar — Classic News style ────────────────────────── */
.offerbar{
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: rgba(255,255,255,.96);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 70;
  transition: transform .22s ease;
  padding: 10px 0;
}
.offerbar.hide{ transform: translateY(100%) }
.offerbar-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.offerbar-txt{
  font-family: var(--sans);
  font-size: 13px;
  color: #333;
  line-height: 1.25;
}
.offerbar-txt strong{ color: #111 }

/* ─── Footer ─────────────────────────────────────────────────── */
.footer{
  border-top: 1px solid var(--border);
  padding: 22px 0 34px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 12px;
}
.footer .cols{
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
}
.footer a{ color: var(--muted); text-decoration: underline; text-underline-offset: 2px }
.footer a:hover{ color: #111 }

/* ─── Utility ────────────────────────────────────────────────── */
.note{
  font-size: 13px;
  color: var(--muted);
  font-family: var(--sans);
  line-height: 1.5;
}
.small{
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  font-family: var(--sans);
}

/* ─── Modal prelander (built by kit.js) ─────────────────────── */
/* ── Modal ─────────────────────────────────────────────────── */
.modal-backdrop { position: fixed; inset: 0; background: rgba(6,6,12,.55); display: none; z-index: 80; align-items: center; justify-content: center; padding: 18px }
.modal-backdrop.open { display: flex }
.modal { width: min(520px, 100%); background: #fff; border: 1px solid var(--border); border-radius: 18px; box-shadow: 0 20px 60px rgba(0,0,0,.18); padding: 24px 22px 20px; font-family: var(--sans) }
.modal-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px }
.modal-brand { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-weight: 800; font-size: 17px; letter-spacing: -.01em }
.modal-brand .brand-icon { color: var(--cta) }
.modal h3 { font-family: var(--serif); font-weight: 700; font-size: 19px; letter-spacing: -.01em; margin: 10px 0 6px; color: #111 }
.modal p { margin: 0 0 14px; font-family: var(--sans); color: var(--muted); font-size: 14px; line-height: 1.55 }
.progress { height: 10px; background: rgba(22,163,74,.09); border-radius: 999px; overflow: hidden; border: 1px solid rgba(22,163,74,.18) }
.bar { width: 0%; height: 100%; background: var(--cta); border-radius: 999px; transition: width .08s linear }
.modal-steps { margin-top: 12px; font-family: var(--sans); font-weight: 700; font-size: 14px; color: #222 }
.modal-actions { margin-top: 14px; display: flex; justify-content: flex-end }
