/* ============================================================
   TrendPrep Ghost Theme — screen.css
   Single-file CSS with custom property theming
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&family=Montserrat:wght@700;800&family=Playfair+Display:ital,wght@0,700;1,400&display=swap');


/* ─── THEME TOKENS: WARM LIGHT (default) ─── */

body,
body[data-color-scheme="Warm Light"] {
  --bg:        #F5F3EF;
  --surface:   #FFFFFF;
  --panel:     #EDE9E3;
  --border:    #D9D4CC;
  --teal:      #2D6CB0;
  --teal-fill: rgba(45,108,176,.055);
  --teal-hi:   rgba(45,108,176,.1);
  --gold:      #9C7330;
  --gold-fill: rgba(156,115,48,.06);
  --text-1:    #18181F;
  --text-2:    #4A5568;
  --text-3:    #8896A8;
  --up:        #1A8A4A;
  --down:      #C94040;
  --rule:      #D9D4CC;
}


/* ─── THEME TOKENS: DARK ─── */

body[data-color-scheme="Dark"] {
  --bg:        #0E1624;
  --surface:   #141E2E;
  --panel:     #1B2A40;
  --border:    #243451;
  --teal:      #5B9BDB;
  --teal-fill: rgba(91,155,219,.07);
  --teal-hi:   rgba(91,155,219,.13);
  --gold:      #C9943A;
  --gold-fill: rgba(201,148,58,.07);
  --text-1:    #EDF2F7;
  --text-2:    #8DA4BE;
  --text-3:    #4F6780;
  --up:        #22C55E;
  --down:      #F87171;
  --rule:      #243451;
}


/* ─── GHOST CUSTOM FONT SUPPORT ─── */

:root {
  --gh-font-heading: 'Playfair Display', Georgia, serif;
  --gh-font-body: 'Inter', system-ui, -apple-system, sans-serif;
}


/* ─── RESET + BASE ─── */

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text-1);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

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

ul, ol {
  list-style: none;
}


/* ─── LAYOUT ─── */

.page-wrapper {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 32px;
}

.width-720 {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.width-680 {
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

.width-600 {
  max-width: 600px;
}

.width-560 {
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}


/* ─── TYPOGRAPHY ─── */

.eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 12px;
}

.eyebrow-gold {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}

.hero-heading {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(30px, 4vw, 52px);
  font-weight: 700;
  color: var(--text-1);
  line-height: 1.15;
  margin-bottom: 24px;
}

.hero-heading em {
  font-style: italic;
  color: var(--teal);
}

.section-heading {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--text-1);
  line-height: 1.2;
  margin-bottom: 8px;
}

.sub-text {
  font-size: 16px;
  color: var(--text-2);
  line-height: 1.7;
  max-width: 520px;
}

.mono {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
}


/* ─── BUTTONS ─── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .01em;
  cursor: pointer;
  border: none;
  text-decoration: none;
  line-height: 1;
  transition: opacity .15s, box-shadow .15s;
}

.btn:hover {
  opacity: .9;
}

.btn-primary {
  background: var(--teal);
  color: #fff;
}

body[data-color-scheme="Dark"] .btn-primary {
  color: #0E1624;
}

.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border: 1.5px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--text-3);
  color: var(--text-1);
  opacity: 1;
}

.btn-gold {
  background: var(--gold);
  color: #fff;
}

body[data-color-scheme="Dark"] .btn-gold {
  color: #0E1624;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 12px;
}


/* ─── NAVIGATION ─── */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  height: 62px;
}

.nav-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 24px;
}

.nav-logo img {
  flex-shrink: 0;
  display: block;
}

/* Logo auto-pill: warm = bare image, dark = white pill wrap */
.nav-logo-pill-auto {
  display: inline-flex;
  align-items: center;
}

.nav-logo-pill-auto img {
  height: 34px;
  display: block;
}

body[data-color-scheme="Dark"] .nav-logo-pill-auto {
  background: #fff;
  border-radius: 5px;
  padding: 5px 10px;
}

body[data-color-scheme="Dark"] .nav-logo-pill-auto img {
  height: 26px;
}

/* Footer logo auto-pill */
.footer-logo-pill-auto {
  display: inline-flex;
  align-items: center;
}

.footer-logo-pill-auto img {
  height: 22px;
  display: block;
}

body[data-color-scheme="Dark"] .footer-logo-pill-auto {
  background: #fff;
  border-radius: 5px;
  padding: 4px 9px;
  margin-bottom: 12px;
}

body[data-color-scheme="Dark"] .footer-logo-pill-auto img {
  height: 18px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0;
  flex: 1;
  justify-content: center;
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-links li {
  list-style: none;
  display: inline-flex;
}

.nav-links a {
  display: block;
  padding: 6px 14px;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  transition: color .15s, background .15s;
}

.nav-links a:hover {
  color: var(--text-1);
  background: var(--panel);
}

.nav-links .nav-current a,
.nav-links a.nav-current {
  color: var(--teal);
}

.nav-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
}

.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--text-2);
}

.nav-hamburger svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}

.nav-drawer {
  display: none;
  position: fixed;
  top: 62px;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--surface);
  z-index: 49;
  padding: 24px 32px;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
}

.nav-drawer.is-open {
  display: flex;
}

.nav-drawer a {
  display: block;
  padding: 12px 0;
  font-size: 16px;
  font-weight: 500;
  color: var(--text-2);
  border-bottom: 1px solid var(--rule);
}

.nav-drawer a:hover,
.nav-drawer .nav-current a {
  color: var(--teal);
}

.nav-drawer .nav-drawer-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

.nav-drawer .nav-drawer-actions .btn {
  width: 100%;
  justify-content: center;
  padding: 12px 20px;
  font-size: 15px;
}


/* ─── SECTIONS ─── */

.tp-section {
  padding: 48px 0;
}

.tp-section-bg {
  background: var(--bg);
}

.tp-section-surface {
  background: var(--surface);
}

.tp-section-dark {
  background: #0E1624;
  color: #EDF2F7;
  --surface: #141E2E;
  --panel: #1B2A40;
  --border: #243451;
  --teal: #5B9BDB;
  --teal-fill: rgba(91,155,219,.07);
  --teal-hi: rgba(91,155,219,.13);
  --gold: #C9943A;
  --gold-fill: rgba(201,148,58,.07);
  --text-1: #EDF2F7;
  --text-2: #8DA4BE;
  --text-3: #4F6780;
  --up: #22C55E;
  --down: #F87171;
  --rule: #243451;
}


/* ─── HERO ─── */

.hero {
  padding: 80px 0 72px;
  background: var(--bg);
}

.hero-content {
  max-width: 600px;
}

.hero-sub {
  font-size: 16px;
  color: var(--text-2);
  line-height: 1.7;
  max-width: 520px;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}


/* ─── THREE PILLARS ─── */

.pillars {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
}

.pillar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
}

.pillar.featured {
  background: var(--teal-fill);
  border-color: var(--teal);
  border-width: 1.5px;
}

.pillar-icon {
  width: 36px;
  height: 36px;
  background: var(--panel);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  margin-bottom: 16px;
  color: var(--text-3);
}

.pillar.featured .pillar-icon {
  background: var(--teal-hi);
  color: var(--teal);
}

.pillar-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 8px;
}

.pillar-body {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.6;
}


/* ─── POST CARDS ─── */

.post-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.post-card-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  transition: box-shadow .2s, transform .2s;
}

.post-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
  transform: translateY(-2px);
}

.post-card a {
  display: block;
  text-decoration: none;
  color: inherit;
}

.post-card-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.tag {
  display: inline-flex;
  padding: 3px 9px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  background: var(--panel);
  color: var(--text-3);
}

.tag-teal {
  background: var(--teal-fill);
  color: var(--teal);
}

.tag-gold {
  background: var(--gold-fill);
  color: var(--gold);
}

.post-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-1);
  line-height: 1.4;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-excerpt {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.65;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-3);
}

.post-card-read-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
}


/* ─── ARTICLE LIST (homepage style) ─── */

.article-list-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 24px;
}

.article-list-header .view-all {
  font-size: 13px;
  font-weight: 600;
  color: var(--teal);
}

.article-list-header .view-all:hover {
  opacity: .8;
}


/* ─── MEMBERS TEASER ─── */

.members-teaser-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 48px;
  align-items: center;
}

.members-teaser-sub {
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.7;
  margin-bottom: 24px;
}

.signal-preview {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}

.signal-preview-blur {
  filter: blur(4px);
  pointer-events: none;
  user-select: none;
}

.signal-preview-lock {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.signal-preview-lock svg {
  width: 32px;
  height: 32px;
  opacity: .5;
  color: var(--text-3);
}

.signal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 7px;
}

.signal-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-1);
}

.signal-sub {
  font-size: 11px;
  color: var(--text-3);
  margin-top: 2px;
}

.signal-right {
  display: flex;
  align-items: center;
  gap: 9px;
}

.sig-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.sig-dot.up   { background: var(--up); }
.sig-dot.down { background: var(--down); }
.sig-dot.flat { background: var(--text-3); }

.sig-txt {
  font-size: 12px;
  font-weight: 700;
}

.sig-txt.up   { color: var(--up); }
.sig-txt.down { color: var(--down); }
.sig-txt.flat { color: var(--text-3); }


/* ─── STRATEGY STATS ─── */

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  max-width: 860px;
  margin: 0 auto;
}

.stat-card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 4px;
}

.stat-card-sub {
  font-size: 12px;
  color: var(--text-3);
  margin-bottom: 16px;
}

.stats-row {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}

.stat-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 30px;
  font-weight: 500;
  color: var(--text-1);
  line-height: 1;
}

.stat-val.up   { color: var(--up); }
.stat-val.down { color: var(--down); }

.stat-lbl {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 5px;
}

.stat-disclaimer {
  font-size: 11px;
  color: var(--text-3);
  line-height: 1.6;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
}


/* ─── MEMBERS GATE ─── */

.members-gate {
  background: var(--gold-fill);
  border: 1px solid rgba(156,115,48,.25);
  border-radius: 10px;
  padding: 20px 24px;
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

body[data-color-scheme="Dark"] .members-gate,
.tp-section-dark .members-gate {
  border-color: rgba(201,148,58,.25);
}

.gate-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 4px;
}

.gate-sub {
  font-size: 12px;
  color: var(--text-2);
}


/* ─── MEMBER CTA BANNER ─── */

.member-cta {
  background: #0E1624;
  padding: 64px 32px;
  text-align: center;
  /* Always dark tokens */
  --surface: #141E2E;
  --teal: #5B9BDB;
  --text-1: #EDF2F7;
  --text-2: #8DA4BE;
  --text-3: #4F6780;
}

.member-cta-inner {
  max-width: 560px;
  margin: 0 auto;
}

.member-cta .eyebrow {
  color: #5B9BDB;
}

.member-cta-heading {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 700;
  color: #EDF2F7;
  line-height: 1.2;
  margin-bottom: 16px;
}

.member-cta-text {
  font-size: 15px;
  color: #8DA4BE;
  line-height: 1.7;
  margin-bottom: 24px;
}

.member-cta .btn-primary {
  background: #5B9BDB;
  color: #0E1624;
}

.member-cta-reassure {
  font-size: 12px;
  color: #4F6780;
  margin-top: 12px;
}


/* ─── FILTER PILLS ─── */

.filter-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-pill {
  display: inline-flex;
  padding: 6px 16px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  background: var(--panel);
  text-decoration: none;
  transition: background .15s, color .15s;
}

.filter-pill:hover {
  color: var(--text-1);
}

.filter-pill.active {
  background: var(--teal);
  color: #fff;
}

body[data-color-scheme="Dark"] .filter-pill.active {
  color: #0E1624;
}


/* ─── PAGINATION ─── */

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 48px 0 24px;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 10px;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background .15s, color .15s;
}

.pagination a {
  border: 1.5px solid var(--border);
  color: var(--text-2);
}

.pagination a:hover {
  border-color: var(--text-3);
  color: var(--text-1);
}

.pagination .page-number {
  background: var(--teal);
  color: #fff;
  border: none;
}

body[data-color-scheme="Dark"] .pagination .page-number {
  color: #0E1624;
}


/* ─── ARTICLE HEADER (post.hbs) ─── */

.article-header {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 32px 32px;
  background: var(--bg);
}

.article-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 700;
  color: var(--text-1);
  line-height: 1.2;
  margin-bottom: 24px;
}

.article-byline {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.byline-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.byline-avatar-placeholder {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--panel);
  flex-shrink: 0;
}

.byline-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-1);
}

.byline-meta {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 2px;
}

.byline-sep {
  width: 1px;
  height: 32px;
  background: var(--rule);
  flex-shrink: 0;
}

.byline-read {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text-3);
}


/* ─── ARTICLE BODY / PROSE ─── */

.post-content {
  max-width: 680px;
  margin: 0 auto;
  padding: 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.post-content > p,
.post-content .gh-content > p {
  font-size: 16px;
  color: var(--text-2);
  line-height: 1.8;
  margin-bottom: 24px;
}

/* Drop cap — first paragraph only */
.post-content > p:first-of-type::first-letter,
.post-content .gh-content > p:first-child::first-letter {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 3.6em;
  font-weight: 700;
  color: var(--teal);
  float: left;
  line-height: .82;
  margin: 5px 12px 0 0;
}

.post-content h2,
.post-content .gh-content h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--text-1);
  margin: 40px 0 16px;
}

.post-content h3,
.post-content .gh-content h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-1);
  margin: 36px 0 14px;
}

.post-content h4,
.post-content .gh-content h4 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-1);
  margin: 32px 0 12px;
}

.post-content ul,
.post-content ol,
.post-content .gh-content ul,
.post-content .gh-content ol {
  padding-left: 24px;
  margin-bottom: 24px;
  color: var(--text-2);
  font-size: 16px;
  line-height: 1.8;
}

.post-content ul li,
.post-content .gh-content ul li {
  list-style: disc;
  margin-bottom: 8px;
}

.post-content ol li,
.post-content .gh-content ol li {
  list-style: decimal;
  margin-bottom: 8px;
}

.post-content a,
.post-content .gh-content a {
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.post-content a:hover,
.post-content .gh-content a:hover {
  opacity: .8;
}

.post-content strong,
.post-content .gh-content strong {
  color: var(--text-1);
  font-weight: 600;
}

.post-content hr,
.post-content .gh-content hr {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 32px 0;
}

/* Blockquote / Pull quote */
.post-content blockquote,
.post-content .gh-content blockquote {
  border-left: 3px solid var(--gold);
  padding: 14px 20px;
  background: var(--gold-fill);
  border-radius: 0 7px 7px 0;
  margin: 24px 0;
}

.post-content blockquote p,
.post-content .gh-content blockquote p {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 17px;
  font-style: italic;
  color: var(--text-1);
  line-height: 1.6;
  margin-bottom: 0;
}

/* Callout / aside */
.post-content .callout,
.post-content .kg-callout-card {
  border-left: 3px solid var(--teal);
  padding: 14px 20px;
  background: var(--teal-fill);
  border-radius: 0 7px 7px 0;
  margin: 24px 0;
}

.post-content .callout p,
.post-content .kg-callout-card .kg-callout-text {
  font-size: 14px;
  font-style: italic;
  margin-bottom: 0;
}

/* Code blocks */
.post-content pre,
.post-content .gh-content pre {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  margin: 24px 0;
  overflow-x: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-2);
}

.post-content code,
.post-content .gh-content code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  background: var(--panel);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--teal);
}

.post-content pre code {
  background: none;
  padding: 0;
  border-radius: 0;
  color: inherit;
}

/* Ghost image card */
.post-content .kg-image-card,
.post-content .gh-content .kg-image-card {
  margin: 32px 0;
}

.post-content .kg-image-card img {
  border-radius: 8px;
  margin-left: auto;
  margin-right: auto;
}

/* Centre any image narrower than the reading column (incl. imported content) */
.post-content img {
  margin-left: auto;
  margin-right: auto;
  cursor: zoom-in;
}

/* Image lightbox (click to enlarge) */
.tp-lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: rgba(14, 22, 36, .92);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  cursor: zoom-out;
  opacity: 0;
  visibility: hidden;
  transition: opacity .15s ease, visibility .15s ease;
}

.tp-lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.tp-lightbox-img {
  max-width: 92vw;
  max-height: 90vh;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
  transform-origin: center center;
  will-change: transform;
  cursor: zoom-in;
  user-select: none;
  -webkit-user-drag: none;
}

.tp-lightbox.is-zoomed .tp-lightbox-img {
  cursor: grab;
}

.tp-lightbox.is-zoomed .tp-lightbox-img:active {
  cursor: grabbing;
}

.tp-lightbox-hint {
  position: absolute;
  bottom: 18px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 12px;
  letter-spacing: .03em;
  color: rgba(255, 255, 255, .55);
  pointer-events: none;
}

.tp-lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  transition: background .15s ease;
}

.tp-lightbox-close:hover {
  background: rgba(255, 255, 255, .24);
}

.post-content figure {
  text-align: center;
}

.post-content .kg-image-card figcaption,
.post-content .kg-image-card .kg-image-card-caption {
  text-align: center;
  font-size: 13px;
  color: var(--text-3);
  margin-top: 8px;
}

/* Ghost wide/full images */
.post-content .kg-width-wide {
  max-width: 1000px;
  margin-left: calc(50% - 500px);
  margin-right: calc(50% - 500px);
}

.post-content .kg-width-full {
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

/* Ghost bookmark card */
.post-content .kg-bookmark-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin: 24px 0;
}

.post-content .kg-bookmark-container {
  display: flex;
  text-decoration: none;
  color: inherit;
}

.post-content .kg-bookmark-content {
  flex: 1;
  padding: 16px;
}

.post-content .kg-bookmark-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 4px;
}

.post-content .kg-bookmark-description {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-content .kg-bookmark-metadata {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-3);
}

.post-content .kg-bookmark-icon {
  width: 16px;
  height: 16px;
}

.post-content .kg-bookmark-thumbnail {
  width: 140px;
  flex-shrink: 0;
}

.post-content .kg-bookmark-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Ghost gallery card */
.post-content .kg-gallery-card {
  margin: 32px 0;
}

.post-content .kg-gallery-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.post-content .kg-gallery-row {
  display: flex;
  gap: 8px;
}

.post-content .kg-gallery-image img {
  border-radius: 4px;
  width: 100%;
  height: 100%;
  object-fit: cover;
}


/* ─── RELATED POSTS ─── */

.related-posts {
  padding: 48px 32px;
  background: var(--bg);
}

.related-posts-inner {
  max-width: 1000px;
  margin: 0 auto;
}

.related-posts-heading {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 24px;
}


/* ─── ABOUT PAGE ─── */

.about-hero-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 48px;
  align-items: center;
}

.about-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 8px;
}

.about-credentials {
  font-size: 14px;
  color: var(--text-3);
  margin-bottom: 24px;
}

.about-bio {
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.7;
  margin-bottom: 24px;
}

.about-stats {
  display: flex;
  gap: 32px;
}

.about-stat-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 24px;
  font-weight: 500;
  color: var(--teal);
}

.about-stat-lbl {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 4px;
}

.about-photo {
  border-radius: 8px;
  width: 100%;
  object-fit: cover;
}

.about-photo-placeholder {
  background: var(--panel);
  border-radius: 8px;
  aspect-ratio: 3/4;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
  font-size: 13px;
}

.about-photo-caption {
  text-align: center;
  font-size: 13px;
  color: var(--text-3);
  margin-top: 8px;
}

.methodology-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
}

.method-card {
  background: var(--teal-fill);
  border: 1.5px solid var(--teal);
  border-radius: 10px;
  padding: 24px;
}

.method-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--teal-hi);
  color: var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 16px;
}

.method-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 8px;
}

.method-body {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.6;
}

.about-prose {
  font-size: 16px;
  color: var(--text-2);
  line-height: 1.75;
}

.about-prose p {
  margin-bottom: 24px;
}


/* ─── ERROR PAGE ─── */

.error-page {
  text-align: center;
  padding: 80px 32px;
}

.error-code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 64px;
  font-weight: 500;
  color: var(--text-3);
  margin-bottom: 16px;
}

.error-message {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 16px;
}

.error-description {
  font-size: 15px;
  color: var(--text-2);
  margin-bottom: 32px;
}


/* ─── FOOTER ─── */

.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--rule);
  padding: 48px 0 0;
}

.footer-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 32px;
}

.footer-logo img {
  height: 22px;
  margin-bottom: 12px;
}

.footer-tagline {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.6;
  max-width: 240px;
}

.footer-col-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 14px;
}

.footer-links li {
  margin-bottom: 9px;
}

.footer-links a {
  font-size: 13px;
  color: var(--text-2);
  text-decoration: none;
  transition: color .15s;
}

.footer-links a:hover {
  color: var(--teal);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 24px 0;
  border-top: 1px solid var(--rule);
  font-size: 11px;
  color: var(--text-3);
}


/* ─── TAG PAGE HEADER ─── */

.tag-header {
  padding: 48px 0 32px;
  background: var(--bg);
}

.tag-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 8px;
}

.tag-description {
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.6;
  margin-bottom: 24px;
  max-width: 520px;
}


/* ─── PAGE TEMPLATE ─── */

.page-content {
  padding: 48px 0;
  background: var(--surface);
}

.page-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 700;
  color: var(--text-1);
  line-height: 1.2;
  margin-bottom: 32px;
}


/* ─── SIGNALS (Members Area) ─── */

.signals-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.signals-head {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-3);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule);
}

.signals-head.gold {
  color: var(--gold);
}

.direction-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
}

.direction-badge.long {
  background: rgba(34,197,94,.1);
  color: var(--up);
}

.direction-badge.short {
  background: rgba(248,113,113,.1);
  color: var(--down);
}


/* ─── RESPONSIVE: TABLET ─── */

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .nav-actions {
    display: none;
  }

  .nav-hamburger {
    display: block;
  }

  .page-wrapper {
    padding: 0 24px;
  }

  .nav-inner {
    padding: 0 24px;
  }

  .pillars {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .post-card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .post-card-grid-2 {
    grid-template-columns: 1fr;
  }

  .members-teaser-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .signals-wrap {
    grid-template-columns: 1fr;
  }

  .about-hero-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .about-hero-grid > *:last-child {
    order: -1;
  }

  .methodology-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }

  .footer-grid > *:first-child {
    grid-column: 1 / -1;
  }

  .stats-row {
    gap: 24px;
  }

  .article-header {
    padding: 32px 24px 24px;
  }

  .post-content {
    padding: 24px;
  }

  .related-posts {
    padding: 32px 24px;
  }

  .post-content .kg-width-wide {
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  .hero {
    padding: 48px 0 40px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .article-list-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}


/* ─── RESPONSIVE: MOBILE ─── */

@media (max-width: 480px) {
  .page-wrapper {
    padding: 0 16px;
  }

  .nav-inner {
    padding: 0 16px;
  }

  .post-card-grid,
  .post-card-grid-2 {
    grid-template-columns: 1fr;
  }

  .post-card {
    padding: 16px;
  }

  .stat-val {
    font-size: 24px;
  }

  .stats-row {
    gap: 16px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .tp-section {
    padding: 32px 0;
  }

  .hero {
    padding: 40px 0 32px;
  }

  .hero-heading {
    font-size: 30px;
  }

  .article-header {
    padding: 24px 16px;
  }

  .post-content {
    padding: 16px;
  }

  .related-posts {
    padding: 24px 16px;
  }

  .member-cta {
    padding: 48px 16px;
  }

  .about-hero-grid > *:last-child {
    order: 0;
  }

  .members-gate {
    flex-direction: column;
    text-align: center;
  }
}
