/* ===========================================================
   Vancouver Impact — vi-ghost.css
   Ghost custom post template (custom-insight.hbs)

   Tokens, header, footer, .eyebrow, .btn and .reveal match the
   live site (assets/css/style.css) so posts are visually
   continuous with vancouverimpact.org.

   -----------------------------------------------------------
   SCOPING
   -----------------------------------------------------------
   Everything that styles post content is nested under .vi-post.
   Nothing leaks into the rest of your theme, so this file is
   safe to add to an existing theme (Casper or otherwise) — only
   posts using the "Insight" template pick it up.

   The shell styles (.site-header / .site-footer / :root tokens)
   are NOT scoped, because they style default.hbs. If your theme
   already has a header you like, delete the SHELL section.

   -----------------------------------------------------------
   GHOST EDITOR CARDS COVERED
   -----------------------------------------------------------
   Writers can use all of these and they will look designed:

     Image (+ wide / full width, + caption)
     Gallery
     Bookmark
     Button
     Callout          (all 9 colour variants)
     Toggle
     Header           (v1 + v2)
     Embed            (YouTube, X, etc.)
     Audio / Video / File / Product
     Blockquote       (both styles)
     Code / Markdown / HTML
     Table            (from Markdown or HTML card — scrolls on mobile)
     Divider, Email CTA, Signup

   Any card not listed inherits the base prose rhythm rather
   than rendering unstyled.

   -----------------------------------------------------------
   JAPANESE LINE BREAKING
   -----------------------------------------------------------
   Every element here uses word-break: normal + line-break:
   strict. No exceptions — and that is deliberate.

   THE RULE: keep-all is only safe where the markup controls
   the breaks, i.e. where an author can place a manual <br>.
   Never use it on editor-supplied text.

   In Ghost, none of this text is author-controlled at the
   markup level: {{title}}, {{custom_excerpt}} and {{content}}
   are all editor data, so a writer has no way to insert a
   break to repair a bad wrap.

   WHY keep-all BREAKS: it suppresses every inter-character
   break opportunity inside a run of CJK. In a string like
   「…公表。ただし…」 the only candidate left is the position
   before 。 — exactly the position kinsoku forbids. With no
   earlier candidate to fall back to, the browser takes the
   prohibited break and the next line starts with 。
   line-break: strict cannot rescue it, because strict only
   chooses among existing candidates.

   This is not a narrow-measure problem. What matters is
   characters per line: an h1 at 40px in an 832px column holds
   only ~20 characters, so titles are the most exposed element
   on the page, not the least.

   normal + strict keeps per-character candidates available and
   lets strict enforce kinsoku, so a line can never begin with
   。、）」 or a small kana.
=========================================================== */

/* =========================================================
   TOKENS
========================================================= */
:root{
  --green:        #0B6B3E;
  --green-dark:   #073F26;
  --green-soft:   #E5F1EA;
  --gold:         #EFCE72;
  --gold-soft:    #FBF3DC;
  --blue:         #2CA9E1;
  --ink:          #1B1E1C;
  --gray:         #5B6570;
  --gray-light:   #8B9399;
  --bg:           #FFFFFF;
  --bg-soft:      #FAFAF7;
  --line:         #E7E5DE;

  --font-jp: "Noto Sans JP", "Hiragino Kaku Gothic ProN", sans-serif;
  --font-en: "Poppins", var(--font-jp);

  --container: 1220px;
  --gutter: clamp(24px, 5vw, 64px);
  --measure: 720px;
  --measure-wide: 1020px;
}

/* =========================================================
   SHELL — styles default.hbs. Delete this section if your
   theme already provides a header and footer.
========================================================= */
*,*::before,*::after{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0;
  font-family:var(--font-jp);
  color:var(--ink);
  background:var(--bg);
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
}
img{ max-width:100%; }
.vi-container{
  max-width:var(--container);
  margin:0 auto;
  padding:0 var(--gutter);
}

.site-header{
  position:fixed;
  top:0; left:0; right:0;
  z-index:100;
  padding:20px 0;
  transition:background .35s ease, padding .35s ease, box-shadow .35s ease;
}
.site-header .vi-container{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
}
.site-header.solid{
  background:rgba(255,255,255,.92);
  backdrop-filter:blur(10px);
  padding:14px 0;
  box-shadow:0 1px 0 var(--line);
}
.logo{
  font-family:var(--font-en);
  font-weight:800;
  font-size:19px;
  letter-spacing:-.01em;
  color:#fff;
  text-decoration:none;
  transition:color .35s ease;
  display:flex;
  align-items:center;
  flex:none;
}
.logo .bang{ color:var(--gold); }
.site-header.solid .logo{ color:var(--ink); }
.site-header.solid .logo .bang{ color:var(--green); }

.nav-links{ display:flex; gap:38px; align-items:center; }
.nav-links a{
  font-size:14px;
  font-weight:700;
  color:rgba(255,255,255,.88);
  text-decoration:none;
  position:relative;
  padding:4px 0;
  transition:color .3s ease;
}
.nav-links a::after{
  content:"";
  position:absolute; left:0; bottom:-3px;
  width:0; height:2px; background:var(--gold);
  transition:width .3s ease;
}
.nav-links a:hover::after,
.nav-links a.current::after{ width:100%; }
.site-header.solid .nav-links a{ color:var(--ink); }
.site-header.solid .nav-links a::after{ background:var(--green); }

.nav-end{ display:flex; align-items:center; gap:14px; }
.lang-toggle{
  display:flex;
  border:1.5px solid rgba(255,255,255,.45);
  border-radius:999px;
  padding:3px;
  transition:border-color .3s ease;
}
.lang-toggle a{
  font-family:var(--font-en);
  font-weight:700;
  font-size:11.5px;
  letter-spacing:.06em;
  padding:6px 12px;
  border-radius:999px;
  color:rgba(255,255,255,.8);
  text-decoration:none;
  transition:background .3s ease, color .3s ease;
}
.lang-toggle a.on{ background:#fff; color:var(--green-dark); }
.site-header.solid .lang-toggle{ border-color:var(--line); }
.site-header.solid .lang-toggle a{ color:var(--gray); }
.site-header.solid .lang-toggle a.on{ background:var(--green); color:#fff; }

.nav-cta{
  font-size:13.5px;
  font-weight:700;
  padding:10px 22px;
  border-radius:999px;
  border:1.5px solid rgba(255,255,255,.6);
  color:#fff;
  text-decoration:none;
  transition:all .3s ease;
  white-space:nowrap;
}
.site-header.solid .nav-cta{ border-color:var(--green); color:var(--green); }
.nav-cta:hover{ background:#fff; color:var(--green); }
.site-header.solid .nav-cta:hover{ background:var(--green); color:#fff; }

.nav-toggle{
  display:none;
  width:26px; height:20px;
  position:relative;
  cursor:pointer;
  background:none; border:none;
  flex:none;
}
.nav-toggle span{
  position:absolute; left:0; right:0; height:2px;
  background:#fff; transition:all .3s ease;
}
.site-header.solid .nav-toggle span{ background:var(--ink); }
.nav-toggle span:nth-child(1){ top:0; }
.nav-toggle span:nth-child(2){ top:9px; }
.nav-toggle span:nth-child(3){ top:18px; }

.mobile-nav{
  position:fixed; inset:0;
  background:var(--green-dark);
  z-index:99;
  display:flex; flex-direction:column;
  align-items:flex-start; justify-content:center;
  gap:26px;
  padding:0 40px;
  transform:translateY(-100%);
  transition:transform .45s ease;
}
.mobile-nav.open{ transform:translateY(0); }
.mobile-nav a{
  font-size:28px; font-weight:800; color:#fff;
  font-family:var(--font-en); text-decoration:none;
}
.mobile-nav .nav-cta{ margin-top:10px; font-size:15px; }
.mobile-nav .mobile-lang{ display:flex; gap:18px; margin-top:6px; }
.mobile-nav .mobile-lang a{ font-size:15px; color:rgba(255,255,255,.65); }
.mobile-nav .mobile-lang a.on{ color:var(--gold); }

.site-footer{
  background:var(--ink);
  color:rgba(255,255,255,.6);
  padding:36px 0;
}
.site-footer .vi-container{
  display:flex; justify-content:space-between; align-items:center;
  flex-wrap:wrap; gap:14px;
}
.site-footer .logo{ color:#fff; font-size:15px; }
.footer-links{ display:flex; gap:24px; flex-wrap:wrap; }
.footer-links a{
  font-size:13px; color:rgba(255,255,255,.6);
  text-decoration:none; transition:color .3s;
}
.footer-links a:hover{ color:#fff; }
.footer-copy{ font-size:12.5px; }

/* =========================================================
   SHARED UTILITIES
   Used by BOTH .vi-post (article) and .vi-listing (index),
   so these are deliberately unscoped. Keep them that way —
   re-scoping them under .vi-post silently breaks the listing
   hero (the blob falls back to position:static and renders
   in flow). Do not add .vi-post to the listing's <main>
   either; that class is the article scope.
========================================================= */
.vi-eyebrow{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-family:var(--font-en);
  font-weight:700;
  font-size:12.5px;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:var(--green);
}
.vi-eyebrow::before{
  content:"";
  width:22px; height:2px;
  background:var(--green);
  display:inline-block;
  flex:none;
}
.vi-eyebrow.on-dark{ color:var(--gold); }
.vi-eyebrow.on-dark::before{ background:var(--gold); }

.vi-blob{
  position:absolute;
  border-radius:50%;
  pointer-events:none;
  z-index:0;
}

/* =========================================================
   POST — header
========================================================= */
.vi-post{ background:var(--bg); }

.vi-post-head{
  background:var(--green-dark);
  color:#fff;
  overflow:hidden;
  padding:170px 0 60px;
}
.vi-post-head .vi-blob{
  width:560px; height:560px;
  top:-240px; right:-160px;
  background:radial-gradient(circle at 40% 40%, rgba(11,107,62,.9), rgba(7,63,38,0) 70%);
}
.vi-post-head .vi-container{ position:relative; z-index:1; }

.vi-breadcrumb{
  display:flex;
  align-items:center;
  gap:9px;
  flex-wrap:wrap;
  font-family:var(--font-en);
  font-weight:600;
  font-size:12.5px;
  color:rgba(255,255,255,.6);
  margin-bottom:24px;
}
.vi-breadcrumb a{ color:rgba(255,255,255,.6); text-decoration:none; }
.vi-breadcrumb a:hover{ color:#fff; }
.vi-breadcrumb .current{ color:var(--gold); }

.vi-post-head h1{
  font-weight:900;
  font-size:clamp(28px, 4.4vw, 56px);
  line-height:1.42;
  color:#fff;
  max-width:960px;
  margin:18px 0 0;
  word-break:normal;
  overflow-wrap:break-word;
  line-break:strict;
}
.vi-post-excerpt{
  font-size:clamp(15px, 1.6vw, 18px);
  line-height:1.9;
  color:rgba(255,255,255,.75);
  max-width:640px;
  margin:20px 0 0;
  word-break:normal;
  overflow-wrap:break-word;
  line-break:strict;
}

.vi-byline{
  display:flex;
  align-items:center;
  gap:16px;
  flex-wrap:wrap;
  margin-top:32px;
}
.vi-avatar{
  width:44px; height:44px;
  border-radius:50%;
  overflow:hidden;
  flex:none;
  background:rgba(255,255,255,.14);
}
.vi-avatar img{ width:100%; height:100%; object-fit:cover; display:block; }
.vi-avatar.is-empty{
  display:flex; align-items:center; justify-content:center;
  background:var(--green);
  font-family:var(--font-en);
  font-weight:800;
  font-size:15px;
  color:#FFFFFF;
}
.vi-byline-text{ display:flex; flex-direction:column; gap:3px; min-width:0; }
.vi-byline-name{ font-size:14.5px; font-weight:700; color:#fff; }
.vi-byline-meta{
  font-family:var(--font-en);
  font-weight:600;
  font-size:12.5px;
  color:rgba(255,255,255,.62);
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}
.vi-dot{ width:3px; height:3px; border-radius:50%; background:rgba(255,255,255,.4); flex:none; }

/* feature image */
.vi-feature{
  position:relative;
  width:100%;
  aspect-ratio:16/8;
  overflow:hidden;
  background:var(--green-dark);
}
.vi-feature img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.vi-feature::after{
  content:"";
  position:absolute; inset:0;
  background:linear-gradient(to top, rgba(7,63,38,.55) 0%, rgba(7,63,38,.10) 45%, rgba(7,63,38,0) 100%);
  pointer-events:none;
}
.vi-feature-caption{
  font-size:13px;
  line-height:1.8;
  color:var(--gray);
  margin:12px 0 0;
  word-break:normal;
  line-break:strict;
}
/* no feature image: a green band closes the header instead */
.vi-feature-fallback{ height:64px; background:var(--green-dark); }

/* =========================================================
   POST — content column
   Ghost emits .kg-* cards inside .vi-content.
========================================================= */
.vi-article-body{ padding:76px 0 0; }

.vi-content{
  max-width:var(--measure);
  margin:0 auto;
  min-width:0;
  font-size:clamp(16px, 1.7vw, 18px);
  line-height:1.95;
  color:var(--ink);
}
.vi-content > *:first-child{ margin-top:0; }
.vi-content > *:last-child{ margin-bottom:0; }

.vi-content p,
.vi-content li,
.vi-content blockquote,
.vi-content dt,
.vi-content dd,
.vi-content th,
.vi-content td,
.vi-content caption{
  word-break:normal;
  overflow-wrap:break-word;
  line-break:strict;
}
.vi-content p{ margin:0 0 1.55em; }

/* lead-in paragraph */
.vi-content > p:first-of-type{
  font-size:clamp(17px, 1.9vw, 20px);
  line-height:1.9;
  font-weight:500;
  color:var(--gray);
}

/* ---------- headings ----------
   h1 inside content is styled as h2: the template renders the
   real <h1>, so a stray one must not compete with it. */
.vi-content h1,
.vi-content h2{
  font-weight:900;
  font-size:clamp(24px, 3.2vw, 34px);
  line-height:1.55;
  color:var(--ink);
  margin:2.4em 0 .85em;
  padding-top:.7em;
  border-top:2px solid var(--ink);
  word-break:normal;
  overflow-wrap:break-word;
  line-break:strict;
}
.vi-content h3{
  font-weight:700;
  font-size:clamp(19px, 2.2vw, 24px);
  line-height:1.7;
  color:var(--ink);
  margin:2em 0 .7em;
  padding-left:14px;
  border-left:3px solid var(--green);
  word-break:normal;
  overflow-wrap:break-word;
  line-break:strict;
}
.vi-content h4{
  font-weight:700;
  font-size:clamp(17px, 1.8vw, 19px);
  line-height:1.75;
  color:var(--ink);
  margin:1.8em 0 .6em;
  word-break:normal;
  overflow-wrap:break-word;
}
.vi-content h5,
.vi-content h6{
  font-family:var(--font-en);
  font-weight:700;
  font-size:12.5px;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:var(--green);
  margin:1.8em 0 .6em;
}

/* ---------- inline ---------- */
.vi-content a{
  color:var(--green);
  font-weight:700;
  text-decoration:underline;
  text-decoration-thickness:1px;
  text-underline-offset:3px;
  transition:text-decoration-thickness .2s ease, color .2s ease;
}
.vi-content a:hover{ color:var(--green-dark); text-decoration-thickness:2px; }
.vi-content strong,
.vi-content b{ font-weight:700; color:var(--ink); }
.vi-content em,
.vi-content i{ font-style:italic; }
.vi-content s,
.vi-content del{ color:var(--gray); }
.vi-content mark{ background:var(--gold-soft); color:var(--ink); padding:.1em .25em; }
.vi-content small{ font-size:.85em; color:var(--gray); }
.vi-content sub,
.vi-content sup{ font-size:.72em; line-height:0; }
.vi-content code,
.vi-content kbd{
  font-family:ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size:.88em;
  background:var(--bg-soft);
  border:1px solid var(--line);
  border-radius:4px;
  padding:.12em .4em;
}

/* ---------- lists ---------- */
.vi-content ul,
.vi-content ol{
  margin:0 0 1.55em;
  padding:0;
  list-style:none;
}
.vi-content li{
  position:relative;
  padding-left:1.6em;
  margin-bottom:.7em;
}
.vi-content ul > li::before{
  content:"";
  position:absolute;
  left:.25em;
  top:.82em;
  width:7px; height:7px;
  border-radius:50%;
  background:var(--green);
}
.vi-content ol{ counter-reset:vi-ol; }
.vi-content ol > li{ counter-increment:vi-ol; }
.vi-content ol > li::before{
  content:counter(vi-ol);
  position:absolute;
  left:0;
  top:.06em;
  font-family:var(--font-en);
  font-weight:700;
  font-size:.82em;
  color:var(--green);
}
.vi-content li > ul,
.vi-content li > ol{ margin:.6em 0 0; }
.vi-content li > ul > li::before{ background:var(--gray-light); width:6px; height:6px; }

/* ---------- blockquote (both Ghost styles) ---------- */
.vi-content blockquote{
  margin:2em 0;
  padding:26px 28px;
  background:var(--bg-soft);
  border-left:3px solid var(--green);
  border-radius:0 10px 10px 0;
}
.vi-content blockquote p{
  font-weight:700;
  font-size:clamp(17px, 1.9vw, 20px);
  line-height:1.85;
  color:var(--ink);
  margin:0 0 .8em;
}
.vi-content blockquote p:last-child{ margin-bottom:0; }
.vi-content blockquote cite,
.vi-content blockquote footer{
  display:block;
  font-style:normal;
  font-size:13.5px;
  color:var(--gray);
  margin-top:10px;
}
/* Ghost's alternate blockquote: big gold rule, no ground */
.vi-content blockquote.kg-blockquote-alt{
  background:none;
  border-left:4px solid var(--gold);
  border-radius:0;
  padding:4px 0 4px 26px;
}
.vi-content blockquote.kg-blockquote-alt p{
  font-size:clamp(19px, 2.3vw, 25px);
  line-height:1.75;
}

.vi-content hr{
  border:none;
  height:1px;
  background:var(--line);
  margin:3em 0;
}
/* Ghost renders <hr> inside a card wrapper in some versions */
.vi-content .kg-divider-card{ margin:3em 0; }

/* =========================================================
   GHOST CARDS — widths
   Ghost adds .kg-width-wide / .kg-width-full to cards.
   The column is 720px, so wide and full break out of it.
========================================================= */
.vi-content .kg-card{ margin:2.2em 0; }
.vi-content .kg-card:first-child{ margin-top:0; }
.vi-content .kg-card:last-child{ margin-bottom:0; }

.vi-content .kg-width-wide{
  position:relative;
  width:100vw;
  max-width:var(--measure-wide);
  margin-left:50%;
  transform:translateX(-50%);
}
.vi-content .kg-width-full{
  position:relative;
  width:100vw;
  max-width:100vw;
  margin-left:50%;
  transform:translateX(-50%);
  border-radius:0;
}
.vi-content .kg-width-full img{ border-radius:0; }

/* =========================================================
   GHOST CARDS — image, gallery
========================================================= */
.vi-content .kg-image-card img,
.vi-content .kg-image{
  display:block;
  width:100%;
  height:auto;
  margin:0 auto;
  border-radius:14px;
}
.vi-content figure{ margin:2.2em 0; }
.vi-content figcaption,
.vi-content .kg-card figcaption{
  font-size:13px;
  line-height:1.8;
  color:var(--gray);
  text-align:left;
  margin-top:12px;
  word-break:normal;
  overflow-wrap:break-word;
  line-break:strict;
}
.vi-content figcaption a{ font-weight:700; }
/* captions on breakout cards stay inside the reading measure */
.vi-content .kg-width-wide figcaption,
.vi-content .kg-width-full figcaption{
  max-width:var(--measure);
  margin-left:auto;
  margin-right:auto;
  padding:0 var(--gutter);
}

.vi-content .kg-gallery-container{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.vi-content .kg-gallery-row{
  display:flex;
  gap:10px;
  justify-content:center;
}
.vi-content .kg-gallery-image{ min-width:0; }
.vi-content .kg-gallery-image img{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  border-radius:10px;
}

/* =========================================================
   GHOST CARDS — callout (all 9 colour variants)
   Mapped onto the VI palette: the green and accent variants
   become green-soft, yellow becomes gold-soft, everything
   else lands on a neutral ground. Writers can pick any
   colour and nothing looks foreign.
========================================================= */
.vi-content .kg-callout-card{
  display:flex;
  gap:14px;
  align-items:flex-start;
  padding:24px 26px;
  border-radius:14px;
  border-left:4px solid var(--green);
  background:var(--green-soft);
}
.vi-content .kg-callout-emoji{
  font-size:20px;
  line-height:1.6;
  flex:none;
}
.vi-content .kg-callout-text{
  font-size:15.5px;
  line-height:1.9;
  color:var(--ink);
  min-width:0;
  word-break:normal;
  overflow-wrap:break-word;
  line-break:strict;
}
.vi-content .kg-callout-card-green,
.vi-content .kg-callout-card-accent{ background:var(--green-soft); border-left-color:var(--green); }
.vi-content .kg-callout-card-yellow{ background:var(--gold-soft); border-left-color:var(--gold); }
.vi-content .kg-callout-card-grey,
.vi-content .kg-callout-card-white{ background:var(--bg-soft); border-left-color:var(--line); }
.vi-content .kg-callout-card-blue{ background:#EAF4FA; border-left-color:var(--blue); }
.vi-content .kg-callout-card-red,
.vi-content .kg-callout-card-pink{ background:#FBEFEF; border-left-color:#C0563F; }
.vi-content .kg-callout-card-purple{ background:#F2EFF8; border-left-color:#6B5B9A; }
.vi-content .kg-callout-card-white{ border:1px solid var(--line); border-left-width:4px; }

/* =========================================================
   GHOST CARDS — bookmark
========================================================= */
.vi-content .kg-bookmark-card{ width:100%; }
.vi-content .kg-bookmark-container{
  display:flex;
  min-height:148px;
  text-decoration:none;
  border:1px solid var(--line);
  border-radius:14px;
  overflow:hidden;
  color:var(--ink);
  font-weight:400;
  transition:transform .3s ease, box-shadow .3s ease;
}
.vi-content .kg-bookmark-container:hover{
  transform:translateY(-3px);
  box-shadow:0 14px 34px rgba(27,30,28,.10);
  text-decoration:none;
}
.vi-content .kg-bookmark-content{
  flex-grow:1;
  display:flex;
  flex-direction:column;
  justify-content:flex-start;
  align-items:flex-start;
  padding:22px 24px;
  min-width:0;
}
.vi-content .kg-bookmark-title{
  font-weight:700;
  font-size:16px;
  line-height:1.6;
  color:var(--ink);
  word-break:normal;
  overflow-wrap:break-word;
  line-break:strict;
}
.vi-content .kg-bookmark-description{
  font-size:14px;
  line-height:1.8;
  color:var(--gray);
  margin-top:8px;
  max-height:3.6em;
  overflow:hidden;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  word-break:normal;
  overflow-wrap:break-word;
  line-break:strict;
}
.vi-content .kg-bookmark-metadata{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:8px;
  margin-top:auto;
  padding-top:16px;
  font-family:var(--font-en);
  font-weight:600;
  font-size:12.5px;
  color:var(--gray);
}
.vi-content .kg-bookmark-icon{
  width:18px; height:18px;
  margin:0;
  border-radius:3px;
}
.vi-content .kg-bookmark-author::after{
  content:"·";
  margin:0 2px 0 8px;
  color:var(--line);
}
.vi-content .kg-bookmark-thumbnail{
  position:relative;
  flex-grow:0;
  flex-shrink:0;
  width:33%;
  min-height:100%;
  background:var(--green-soft);
}
.vi-content .kg-bookmark-thumbnail img{
  position:absolute; inset:0;
  width:100%; height:100%;
  object-fit:cover;
  border-radius:0;
  margin:0;
}

/* =========================================================
   GHOST CARDS — button
========================================================= */
.vi-content .kg-button-card{ display:flex; }
.vi-content .kg-button-card.kg-align-center{ justify-content:center; }
.vi-content .kg-button-card.kg-align-left{ justify-content:flex-start; }
.vi-content .kg-btn{
  display:inline-flex;
  align-items:center;
  gap:10px;
  font-family:var(--font-jp);
  font-weight:700;
  font-size:15px;
  padding:15px 30px;
  border-radius:999px;
  text-decoration:none;
  background:var(--green);
  color:#fff;
  box-shadow:0 10px 24px -8px rgba(11,107,62,.55);
  transition:transform .25s ease, box-shadow .25s ease;
}
.vi-content .kg-btn:hover{
  transform:translateY(-2px);
  box-shadow:0 14px 30px -8px rgba(11,107,62,.65);
  text-decoration:none;
  color:#fff;
}
.vi-content .kg-btn-accent{ background:var(--green); color:#fff; }

/* =========================================================
   GHOST CARDS — toggle
========================================================= */
.vi-content .kg-toggle-card{
  border:1px solid var(--line);
  border-radius:14px;
  padding:22px 24px;
}
.vi-content .kg-toggle-heading{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
  cursor:pointer;
}
.vi-content .kg-toggle-heading-text{
  font-weight:700;
  font-size:16.5px;
  line-height:1.7;
  color:var(--ink);
  margin:0;
  min-width:0;
  word-break:normal;
  overflow-wrap:break-word;
  line-break:strict;
}
.vi-content .kg-toggle-card-icon{
  width:22px; height:22px;
  flex:none;
  color:var(--green);
  transition:transform .3s ease;
}
.vi-content .kg-toggle-card[data-kg-toggle-state="open"] .kg-toggle-card-icon{ transform:rotate(180deg); }
.vi-content .kg-toggle-content{
  font-size:15.5px;
  line-height:1.9;
  color:var(--gray);
  margin-top:0;
  max-height:0;
  visibility:hidden;
  opacity:0;
  overflow:hidden;
  transition:max-height .3s ease, opacity .3s ease, margin-top .3s ease;
}
.vi-content .kg-toggle-card[data-kg-toggle-state="open"] .kg-toggle-content{
  margin-top:14px;
  max-height:1000px;
  visibility:visible;
  opacity:1;
}
.vi-content .kg-toggle-content p:last-child{ margin-bottom:0; }

/* =========================================================
   GHOST CARDS — header (v1 and v2)
   Dark green ground, gold eyebrow — the site's hero treatment.
========================================================= */
.vi-content .kg-header-card{
  background:var(--green-dark);
  color:#fff;
  padding:clamp(48px,7vw,88px) var(--gutter);
  text-align:center;
  border-radius:0;
}
.vi-content .kg-header-card.kg-size-small{ padding:clamp(34px,5vw,56px) var(--gutter); }
.vi-content .kg-header-card.kg-size-large{ padding:clamp(64px,10vw,124px) var(--gutter); }
.vi-content .kg-header-card-heading,
.vi-content .kg-header-card h2{
  font-weight:900;
  font-size:clamp(26px,4vw,46px);
  line-height:1.4;
  color:#fff;
  margin:0;
  word-break:normal;
  overflow-wrap:break-word;
  line-break:strict;
}
.vi-content .kg-header-card-subheading,
.vi-content .kg-header-card h3{
  font-weight:500;
  font-size:clamp(15px,1.8vw,19px);
  line-height:1.85;
  color:#D6E8DE;
  margin:16px 0 0;
  word-break:normal;
  overflow-wrap:break-word;
  line-break:strict;
}
.vi-content .kg-header-card-button,
.vi-content .kg-header-card .kg-btn{
  display:inline-flex;
  margin-top:28px;
  background:var(--gold);
  color:var(--green-dark);
  box-shadow:none;
}
.vi-content .kg-header-card-button:hover,
.vi-content .kg-header-card .kg-btn:hover{
  background:var(--gold);
  color:var(--green-dark);
  transform:translateY(-2px);
}
/* v2 header card variants */
.vi-content .kg-header-card.kg-v2{ background:var(--green-dark); }
.vi-content .kg-header-card.kg-v2 .kg-header-card-text{ max-width:var(--measure-wide); margin:0 auto; }
.vi-content .kg-header-card.kg-style-accent{ background:var(--green); }

/* =========================================================
   GHOST CARDS — embed, audio, video, file, product
========================================================= */
.vi-content .kg-embed-card{
  display:flex;
  flex-direction:column;
  align-items:center;
  width:100%;
}
.vi-content .kg-embed-card iframe,
.vi-content iframe,
.vi-content video{
  width:100%;
  aspect-ratio:16/9;
  height:auto;
  border:0;
  border-radius:14px;
  display:block;
}
.vi-content .kg-embed-card > iframe[src*="twitter"],
.vi-content .kg-embed-card > blockquote{ aspect-ratio:auto; }

.vi-content .kg-audio-card,
.vi-content .kg-file-card-container,
.vi-content .kg-product-card-container{
  border:1px solid var(--line);
  border-radius:14px;
  padding:20px 22px;
  background:var(--bg-soft);
}
.vi-content .kg-file-card-container{
  display:flex;
  align-items:center;
  gap:18px;
  text-decoration:none;
  color:var(--ink);
  transition:transform .3s ease, box-shadow .3s ease;
}
.vi-content .kg-file-card-container:hover{
  transform:translateY(-3px);
  box-shadow:0 14px 34px rgba(27,30,28,.10);
  text-decoration:none;
}
.vi-content .kg-file-card-title{ font-weight:700; font-size:16px; line-height:1.6; }
.vi-content .kg-file-card-caption{ font-size:13.5px; line-height:1.8; color:var(--gray); }
.vi-content .kg-file-card-metadata{
  font-family:var(--font-en);
  font-weight:600;
  font-size:12.5px;
  color:var(--gray);
  margin-top:6px;
}
.vi-content .kg-file-card-icon{ color:var(--green); flex:none; }

.vi-content .kg-audio-card audio{ width:100%; }
.vi-content .kg-audio-title{ font-weight:700; font-size:16px; }

/* =========================================================
   GHOST CARDS — code / markdown / html
========================================================= */
.vi-content pre{
  margin:2em 0;
  padding:22px 24px;
  background:var(--green-dark);
  border-radius:12px;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
}
.vi-content pre code{
  background:none;
  border:none;
  padding:0;
  color:#EAF2ED;
  font-size:13.5px;
  line-height:1.8;
  white-space:pre;
}

/* =========================================================
   TABLES — from a Markdown or HTML card.
   Wide tables scroll; the wrapper is added by JS in the
   template so writers never have to think about it.
========================================================= */
.vi-content .vi-table-scroll{
  overflow-x:auto;
  margin:2em 0;
  border:1px solid var(--line);
  border-radius:12px;
  -webkit-overflow-scrolling:touch;
}
.vi-content table{
  width:100%;
  border-collapse:collapse;
  font-size:15px;
  min-width:520px;
}
.vi-content .vi-table-scroll > table{ margin:0; }
.vi-content caption{
  caption-side:bottom;
  font-size:13px;
  color:var(--gray);
  padding:12px 16px;
  text-align:left;
}
.vi-content thead th{
  background:var(--green-soft);
  font-weight:700;
  font-size:13.5px;
  color:var(--green-dark);
  text-align:left;
}
.vi-content th,
.vi-content td{
  padding:14px 18px;
  border-bottom:1px solid var(--line);
  line-height:1.8;
  vertical-align:top;
}
.vi-content tbody tr:last-child td{ border-bottom:none; }

/* =========================================================
   POST — footer furniture
========================================================= */
.vi-post-foot{ max-width:var(--measure); margin:0 auto; min-width:0; }

.vi-tags{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  margin-top:56px;
  padding-top:30px;
  border-top:1px solid var(--line);
}
.vi-tags-label,
.vi-share-label{
  font-family:var(--font-en);
  font-weight:700;
  font-size:11.5px;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:var(--gray);
  margin-right:4px;
}
.vi-tag{
  font-size:13px;
  font-weight:700;
  padding:9px 16px;
  border-radius:999px;
  background:var(--green-soft);
  color:var(--green);
  text-decoration:none;
  word-break:normal;
  line-break:strict;
  transition:background .25s ease;
}
.vi-tag:hover{ background:#D6E8DE; }

.vi-share{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  margin-top:22px;
}
.vi-share a{
  font-family:var(--font-en);
  font-weight:700;
  font-size:13px;
  padding:11px 18px;
  border-radius:999px;
  border:1px solid var(--line);
  color:var(--ink);
  text-decoration:none;
  transition:border-color .25s ease, color .25s ease;
}
.vi-share a:hover{ border-color:var(--green); color:var(--green); }

.vi-author{
  display:flex;
  gap:24px;
  align-items:flex-start;
  flex-wrap:wrap;
  margin-top:44px;
  padding:30px;
  background:var(--bg-soft);
  border:1px solid var(--line);
  border-radius:16px;
}
.vi-author-photo{
  width:84px; height:84px;
  border-radius:50%;
  overflow:hidden;
  flex:none;
  background:var(--green-soft);
}
.vi-author-photo img{ width:100%; height:100%; object-fit:cover; display:block; }
.vi-author-photo.is-empty{
  display:flex; align-items:center; justify-content:center;
  background:var(--green);
  font-family:var(--font-en);
  font-weight:800;
  font-size:24px;
  color:var(--gold);
}
.vi-author-body{ flex:1 1 280px; min-width:0; }
.vi-author-label{
  font-family:var(--font-en);
  font-weight:700;
  font-size:11.5px;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:var(--gray);
  margin-bottom:10px;
}
.vi-author-name{ font-weight:900; font-size:18px; line-height:1.6; }
.vi-author-role{ font-size:13.5px; line-height:1.8; color:var(--gray); margin-top:4px; }
.vi-author-bio{
  font-size:14.5px;
  line-height:1.95;
  color:var(--gray);
  margin-top:12px;
  word-break:normal;
  overflow-wrap:break-word;
  line-break:strict;
}

/* =========================================================
   MEMBER CTA — Ghost Portal
========================================================= */
.vi-cta{
  background:var(--green-dark);
  color:#fff;
  overflow:hidden;
  position:relative;
  margin-top:96px;
  padding:96px 0;
}
.vi-cta .vi-blob{
  width:520px; height:520px;
  right:-140px; bottom:-200px;
  background:radial-gradient(circle at 50% 50%, rgba(239,206,114,.13), rgba(7,63,38,0) 68%);
}
.vi-cta .vi-container{ position:relative; z-index:1; }
.vi-cta-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0,1fr));
  gap:56px;
  align-items:center;
}
.vi-cta-grid > *{ min-width:0; }
.vi-cta h2{
  font-weight:900;
  font-size:clamp(24px, 3.4vw, 42px);
  line-height:1.45;
  color:#fff;
  margin:16px 0 0;
  word-break:normal;
  overflow-wrap:break-word;
  line-break:strict;
}
.vi-cta p{
  font-size:15.5px;
  line-height:1.95;
  color:rgba(255,255,255,.75);
  margin:18px 0 0;
  max-width:520px;
}
/* looks like a form, but it is a link to Portal — Ghost handles
   validation and submission */
.vi-cta-form{
  display:flex;
  align-items:center;
  gap:10px;
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.2);
  border-radius:999px;
  padding:7px 7px 7px 26px;
  text-decoration:none;
  max-width:460px;
  transition:border-color .25s ease;
}
.vi-cta-form:hover{ border-color:var(--gold); }
.vi-cta-input{
  flex:1 1 auto;
  font-size:15px;
  color:rgba(255,255,255,.55);
  min-width:0;
}
.vi-cta-form span{
  flex:none;
  font-family:var(--font-en);
  font-weight:700;
  font-size:14.5px;
  background:var(--gold);
  color:var(--green-dark);
  padding:14px 26px;
  border-radius:999px;
}
.vi-cta-note{
  font-size:12.5px;
  line-height:1.8;
  color:rgba(255,255,255,.55);
  margin-top:14px;
}
.vi-cta-note a{ color:rgba(255,255,255,.8); }

/* =========================================================
   READ NEXT
========================================================= */
.vi-readnext{
  background:var(--bg-soft);
  border-top:1px solid var(--line);
  padding:96px 0;
}
.vi-card{
  display:flex;
  flex-direction:column;
  min-width:0;
  text-decoration:none;
  color:inherit;
  transition:transform .3s ease;
}
.vi-card:hover{ transform:translateY(-4px); text-decoration:none; }
.vi-card-media{
  position:relative;
  width:100%;
  aspect-ratio:16/9;
  border-radius:14px;
  overflow:hidden;
  background:var(--green-soft);
}
.vi-card-media img{
  width:100%; height:100%;
  object-fit:cover;
  display:block;
}
.vi-card-media.is-empty{
  display:flex; align-items:center; justify-content:center;
}
.vi-card-media.is-empty span{
  font-family:var(--font-en);
  font-weight:800;
  font-size:13px;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:var(--green);
  opacity:.65;
}
.vi-card-meta{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
  margin-top:18px;
}
.vi-card-topic{
  font-family:var(--font-en);
  font-weight:700;
  font-size:11px;
  letter-spacing:.1em;
  text-transform:uppercase;
  color:var(--green);
}
.vi-card-dot{ width:3px; height:3px; border-radius:50%; background:var(--line); flex:none; }
.vi-card-date{
  font-family:var(--font-en);
  font-weight:600;
  font-size:12px;
  color:var(--gray);
}
.vi-card h3{
  font-weight:900;
  font-size:19.5px;
  line-height:1.65;
  margin:12px 0 0;
  word-break:normal;       /* narrow measure — see header comment */
  overflow-wrap:break-word;
  line-break:strict;
}
.vi-card p{
  font-size:14px;
  line-height:1.9;
  color:var(--gray);
  margin:10px 0 0;
  word-break:normal;
  overflow-wrap:break-word;
  line-break:strict;
}

/* =========================================================
   REVEAL ON SCROLL
========================================================= */
.reveal{ opacity:0; transform:translateY(28px); transition:opacity .8s ease, transform .8s ease; }
.reveal.in{ opacity:1; transform:translateY(0); }
.reveal-delay-1{ transition-delay:.08s; }
.reveal-delay-2{ transition-delay:.16s; }

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior:auto; }
  .reveal{ opacity:1; transform:none; transition:none; }
  .vi-card, .kg-btn, .vi-content .kg-bookmark-container{ transition:none; }
}

/* =========================================================
   RESPONSIVE
========================================================= */
@media (max-width: 1100px){
}
@media (max-width: 980px){
  .nav-links, .nav-end{ display:none; }
  .nav-toggle{ display:block; }
  .vi-post-head{ padding:148px 0 52px; }
  .vi-article-body{ padding:56px 0 0; }
  .vi-cta-grid{ grid-template-columns:1fr; gap:36px; }
  .vi-cta{ margin-top:76px; padding:76px 0; }
  .vi-readnext{ padding:76px 0; }
  .vi-content .kg-width-wide{ max-width:100%; margin-left:0; transform:none; width:100%; }
  .vi-content .kg-width-wide figcaption{ padding:0; }
}
@media (max-width: 640px){
  .vi-post-head{ padding:126px 0 44px; }
  .vi-feature{ aspect-ratio:4/3; }
  .vi-content{ font-size:16px; }
  .vi-content blockquote{ padding:22px 22px; }
  .vi-content blockquote.kg-blockquote-alt{ padding:4px 0 4px 18px; }
  .vi-content th, .vi-content td{ padding:12px 14px; }
  .vi-content .kg-callout-card{ padding:20px 20px; }
  .vi-content .kg-bookmark-container{ flex-direction:column; }
  .vi-content .kg-bookmark-thumbnail{ width:100%; min-height:180px; order:-1; }
  .vi-content .kg-bookmark-thumbnail img{ position:relative; height:180px; }
  .vi-content .kg-gallery-row{ flex-direction:column; }
  .vi-readnext{ padding:64px 0; }
  .vi-cta{ padding:64px 0; }
  .vi-cta-form{ flex-direction:column; align-items:stretch; border-radius:16px; padding:18px; gap:14px; }
  .vi-cta-form span{ text-align:center; }
  .vi-author{ padding:24px; gap:18px; }
  .vi-author-photo{ width:64px; height:64px; }
  .vi-author-photo.is-empty{ font-size:19px; }
  .site-footer .vi-container{ justify-content:flex-start; }
}

/* =========================================================
   SECTION TITLE — shared by read-next and listing blocks
========================================================= */
.vi-section-title{
  font-weight:900;
  font-size:clamp(24px, 3.2vw, 38px);
  line-height:1.45;
  margin:14px 0 0;
  word-break:normal;
  overflow-wrap:break-word;
  line-break:strict;
}

/* =========================================================
   CARD GRID — read-next and the listing share this
========================================================= */
.vi-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0,1fr));
  gap:40px 32px;
}
.vi-grid > *{ min-width:0; }
.vi-readnext .vi-grid{ margin-top:44px; }

/* listing cards use h2, read-next uses h3 — same treatment */
.vi-card h2{
  font-weight:900;
  font-size:19.5px;
  line-height:1.65;
  margin:12px 0 0;
  word-break:normal;
  overflow-wrap:break-word;
  line-break:strict;
}

/* =========================================================
   LISTING — index.hbs
========================================================= */
.vi-listing-hero{
  background:var(--green-dark);
  color:#fff;
  overflow:hidden;
  position:relative;
  padding:186px 0 96px;
}
.vi-listing-hero .vi-blob{
  width:620px; height:620px;
  top:-260px; right:-180px;
  background:radial-gradient(circle at 35% 35%, rgba(11,107,62,.85), rgba(7,63,38,0) 70%);
}
.vi-listing-hero .vi-container{ position:relative; z-index:1; }
.vi-listing-hero h1{
  font-weight:900;
  font-size:clamp(34px, 5.4vw, 64px);
  line-height:1.22;
  letter-spacing:-.01em;
  color:#fff;
  margin:20px 0 0;
  word-break:normal;
  overflow-wrap:break-word;
  line-break:strict;
}
.vi-listing-lead{
  font-size:clamp(15px, 1.6vw, 18px);
  line-height:1.9;
  color:rgba(255,255,255,.75);
  max-width:640px;
  margin:22px 0 0;
  word-break:normal;
  overflow-wrap:break-word;
  line-break:strict;
}
.vi-listing-body{ padding:96px 0; }

.vi-empty{
  border:1px solid var(--line);
  border-radius:14px;
  padding:64px 32px;
  text-align:center;
}
.vi-empty p{
  font-size:16px;
  line-height:1.9;
  color:var(--gray);
  margin:0;
}

/* =========================================================
   PAGINATION — partials/pagination.hbs
========================================================= */
.vi-pager{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  flex-wrap:wrap;
  margin-top:72px;
}
.vi-pager a,
.vi-pager span{
  font-family:var(--font-en);
  font-weight:700;
  font-size:14px;
  padding:13px 24px;
  border-radius:999px;
  border:1px solid var(--line);
  color:var(--ink);
  text-decoration:none;
  transition:border-color .25s ease, color .25s ease;
}
.vi-pager a:hover{ border-color:var(--green); color:var(--green); }
.vi-pager .is-disabled{ color:var(--gray); border-color:var(--line); opacity:.55; }
.vi-pager .vi-pager-count{
  border:none;
  color:var(--gray);
  font-weight:600;
}

/* =========================================================
   BARE VARIANT — custom-insight.hbs
   No dark title header, so the post can open with a
   full-bleed Header card.

   The default here is SAFE: clear the fixed nav. Going flush
   is opt-in via :has(), because only a leading Header card
   supplies its own dark ground for the transparent nav to sit
   on. An author who starts an "Insight" post with a paragraph
   or an image gets readable content instead of text sliding
   under an invisible nav — and they cannot be expected to
   know the rule, so the CSS has to assume the worst.

   If :has() is unavailable the padding simply stays, which
   degrades to a gap above a Header card — never to overlap.
========================================================= */
.vi-post-bare .vi-article-body{ padding-top:126px; }
.vi-post-bare .vi-article-body:has(.vi-content > .kg-header-card:first-child){ padding-top:0; }
.vi-post-bare .vi-content > .kg-header-card:first-child{
  padding-top:calc(clamp(48px,7vw,88px) + 66px);
}
.vi-byline-foot{
  margin-top:48px;
  padding-top:28px;
  border-top:1px solid var(--line);
}
.vi-byline-foot .vi-byline-name{ color:var(--ink); }
.vi-byline-foot .vi-byline-meta{ color:var(--gray); }
.vi-byline-foot .vi-dot{ background:var(--line); }

/* =========================================================
   STATIC PAGES — page.hbs
========================================================= */
.vi-post-head-page{ padding:170px 0 52px; }
.vi-article-page{ padding-bottom:96px; }

/* the listing CTA sits flush against the section above it */
.vi-cta-flush{ margin-top:0; }

/* =========================================================
   RESPONSIVE — additions
========================================================= */
@media (max-width: 1100px){
  .vi-grid{ gap:36px 28px; }
}
@media (max-width: 980px){
  .vi-grid{ grid-template-columns:repeat(2, minmax(0,1fr)); }
  .vi-listing-hero{ padding:158px 0 76px; }
  .vi-listing-body{ padding:76px 0; }
  .vi-post-head-page{ padding:148px 0 44px; }
  .vi-article-page{ padding-bottom:76px; }
}
@media (max-width: 640px){
  .vi-grid{ grid-template-columns:1fr; gap:34px; }
  .vi-listing-hero{ padding:132px 0 60px; }
  .vi-listing-body{ padding:64px 0; }
  .vi-post-head-page{ padding:126px 0 40px; }
  .vi-article-page{ padding-bottom:64px; }
  .vi-pager{ margin-top:52px; }
  .vi-pager a, .vi-pager span{ padding:12px 18px; font-size:13px; }
}
