/* ═══════════════════════════════════════════════════════════
   THE TRADING BOT CHRONICLE — Ghost Theme v2.0
   Dark mode · P&L badges · Pull quotes · Refined cards
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:opsz,wght@8..60,400;8..60,600;8..60,700&family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ─── LIGHT THEME (default) ─── */
:root {
  --bg:             #fafaf9;
  --bg-alt:         #f2f0ec;
  --bg-card:        #ffffff;
  --bg-elevated:    #ffffff;
  --text:           #161616;
  --text-secondary: #4a4a4a;
  --text-light:     #7a7a7a;
  --text-faint:     #a8a8a8;
  --accent:         #c0392b;
  --accent-hover:   #a93226;
  --green:          #16a34a;
  --green-bg:       #dcfce7;
  --green-border:   #bbf7d0;
  --red:            #dc2626;
  --red-bg:         #fee2e2;
  --red-border:     #fecaca;
  --yellow:         #ca8a04;
  --yellow-bg:      #fef9c3;
  --yellow-border:  #fef08a;
  --blue:           #0369a1;
  --blue-bg:        #e0f2fe;
  --blue-border:    #bae6fd;
  --purple:         #7c3aed;
  --purple-bg:      #ede9fe;
  --purple-border:  #ddd6fe;
  --border:         #e5e2dd;
  --border-light:   #f0ede8;
  --shadow-sm:      0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:      0 2px 8px rgba(0,0,0,0.06);
  --shadow-lg:      0 4px 16px rgba(0,0,0,0.08);
  --serif:          'Source Serif 4', Georgia, serif;
  --sans:           'DM Sans', -apple-system, sans-serif;
  --mono:           'JetBrains Mono', monospace;
  --max-w:          680px;
  --wide-w:         960px;
  --radius:         8px;
  --radius-sm:      4px;
  --transition:     0.2s ease;
}

/* ─── DARK THEME ─── */
[data-theme="dark"] {
  --bg:             #0d1117;
  --bg-alt:         #161b22;
  --bg-card:        #161b22;
  --bg-elevated:    #1c2129;
  --text:           #e6edf3;
  --text-secondary: #9ca3af;
  --text-light:     #6b7280;
  --text-faint:     #4b5563;
  --accent:         #ef6351;
  --accent-hover:   #f87171;
  --green:          #34d399;
  --green-bg:       rgba(52, 211, 153, 0.12);
  --green-border:   rgba(52, 211, 153, 0.25);
  --red:            #f87171;
  --red-bg:         rgba(248, 113, 113, 0.12);
  --red-border:     rgba(248, 113, 113, 0.25);
  --yellow:         #fbbf24;
  --yellow-bg:      rgba(251, 191, 36, 0.12);
  --yellow-border:  rgba(251, 191, 36, 0.25);
  --blue:           #60a5fa;
  --blue-bg:        rgba(96, 165, 250, 0.12);
  --blue-border:    rgba(96, 165, 250, 0.25);
  --purple:         #a78bfa;
  --purple-bg:      rgba(167, 139, 250, 0.12);
  --purple-border:  rgba(167, 139, 250, 0.25);
  --border:         #21262d;
  --border-light:   #1a1f26;
  --shadow-sm:      0 1px 2px rgba(0,0,0,0.2);
  --shadow-md:      0 2px 8px rgba(0,0,0,0.3);
  --shadow-lg:      0 4px 16px rgba(0,0,0,0.4);
}

[data-theme="dark"] img { opacity: 0.92; }
[data-theme="dark"] img:hover { opacity: 1; }

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background var(--transition), color var(--transition);
}

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { text-decoration: underline; color: var(--accent-hover); }

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

/* ═══════════════════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════════════════ */
.site-header {
  max-width: var(--wide-w);
  margin: 0 auto;
  padding: 28px 24px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-header__left {
  display: flex;
  align-items: center;
}

.site-header__name {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
  text-transform: uppercase;
  transition: color var(--transition);
}

.site-header__name:hover { text-decoration: none; color: var(--accent); }

.site-header__right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-header__nav a {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--text-light);
  margin-left: 24px;
  transition: color var(--transition);
}

.site-header__nav a:hover { color: var(--text); text-decoration: none; }

/* Dark mode toggle */
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 20px;
  cursor: pointer;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-light);
  transition: all var(--transition);
  margin-left: 16px;
}

.theme-toggle:hover {
  border-color: var(--text-light);
  color: var(--text);
}

.theme-toggle__icon {
  font-size: 14px;
  line-height: 1;
}

[data-theme="dark"] .theme-toggle__sun { display: inline; }
[data-theme="dark"] .theme-toggle__moon { display: none; }
.theme-toggle__sun { display: none; }
.theme-toggle__moon { display: inline; }

/* ═══════════════════════════════════════════════════════════
   HERO (home page)
   ═══════════════════════════════════════════════════════════ */
.hero {
  max-width: var(--max-w);
  margin: 72px auto 0;
  padding: 0 24px;
}

.hero__title {
  font-family: var(--serif);
  font-size: 40px;
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}

.hero__body {
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 16px;
}

.hero__body strong { color: var(--text); }

.hero__credit {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--text-light);
  border-top: 1px solid var(--border);
  padding-top: 16px;
  margin-top: 28px;
  margin-bottom: 48px;
}

.hero__credit a { color: var(--text-secondary); }

/* ═══════════════════════════════════════════════════════════
   STATS BAR — redesigned with cards
   ═══════════════════════════════════════════════════════════ */
.stats {
  max-width: var(--max-w);
  margin: 0 auto 48px;
  padding: 0 24px;
}

.stats__label {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-light);
  margin-bottom: 16px;
}

.stats__note {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 16px;
}

.stats__row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.stats__item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}

.stats__item:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--text-faint);
}

.stats__item span {
  display: block;
  font-size: 24px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
  letter-spacing: -0.02em;
  text-transform: none;
}

.stats__item--green span { color: var(--green); }
.stats__item--red span { color: var(--red); }

/* ═══════════════════════════════════════════════════════════
   SUBSCRIBE BAR
   ═══════════════════════════════════════════════════════════ */
.subscribe {
  max-width: var(--max-w);
  margin: 0 auto 56px;
  padding: 0 24px;
}

.subscribe__inner {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.subscribe__text {
  font-family: var(--sans);
  font-size: 15px;
  color: var(--text-secondary);
}

.subscribe__text strong { color: var(--text); }

.subscribe__form {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.subscribe__form input[type="email"] {
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--sans);
  font-size: 14px;
  background: var(--bg);
  color: var(--text);
  width: 220px;
  outline: none;
  transition: border-color var(--transition);
}

.subscribe__form input[type="email"]:focus {
  border-color: var(--accent);
}

.subscribe__form button {
  padding: 10px 20px;
  background: var(--text);
  color: var(--bg);
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--sans);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: opacity var(--transition);
}

.subscribe__form button:hover { opacity: 0.85; }

/* ═══════════════════════════════════════════════════════════
   POST CARDS (index) — redesigned with P&L badges
   ═══════════════════════════════════════════════════════════ */
.post-feed {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

.post-feed__heading {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-light);
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.post-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--text-faint);
}

/* Left accent stripe on cards */
.post-card--win { border-left: 3px solid var(--green); }
.post-card--loss { border-left: 3px solid var(--red); }
.post-card--entry { border-left: 3px solid var(--yellow); }
.post-card--recap { border-left: 3px solid var(--blue); }
.post-card--weekly { border-left: 3px solid var(--blue); }
.post-card--learn { border-left: 3px solid var(--purple); }

.post-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.post-card__meta {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 10px;
}

.post-card__tag {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tag--entry  { background: var(--yellow-bg); color: var(--yellow); border: 1px solid var(--yellow-border); }
.tag--win    { background: var(--green-bg);  color: var(--green);  border: 1px solid var(--green-border); }
.tag--loss   { background: var(--red-bg);    color: var(--red);    border: 1px solid var(--red-border); }
.tag--recap  { background: var(--blue-bg);   color: var(--blue);   border: 1px solid var(--blue-border); }
.tag--weekly { background: var(--blue-bg);   color: var(--blue);   border: 1px solid var(--blue-border); }
.tag--learn  { background: var(--purple-bg); color: var(--purple); border: 1px solid var(--purple-border); }

/* P&L badge on card */
.post-card__pnl {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  letter-spacing: -0.01em;
}

.pnl--green  { background: var(--green-bg); color: var(--green); border: 1px solid var(--green-border); }
.pnl--red    { background: var(--red-bg);   color: var(--red);   border: 1px solid var(--red-border); }
.pnl--live   { background: var(--yellow-bg);color: var(--yellow);border: 1px solid var(--yellow-border); }
.pnl--learn  { background: var(--purple-bg);color: var(--purple);border: 1px solid var(--purple-border); }

.post-card__title {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.post-card__title a { color: var(--text); }
.post-card__title a:hover { color: var(--accent); text-decoration: none; }

.post-card__excerpt {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Featured image in card */
.post-card__image {
  border-radius: var(--radius-sm);
  width: 100%;
  margin-bottom: 16px;
  aspect-ratio: 16 / 7;
  object-fit: cover;
}

/* ═══════════════════════════════════════════════════════════
   SINGLE POST
   ═══════════════════════════════════════════════════════════ */
.post {
  max-width: var(--max-w);
  margin: 56px auto 0;
  padding: 0 24px;
}

.post__header {
  margin-bottom: 40px;
}

.post__tag {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  display: inline-block;
  margin-bottom: 16px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.post__title {
  font-family: var(--serif);
  font-size: 38px;
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.post__meta {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--text-light);
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

/* Featured image on post page */
.post__feature-image {
  margin: 0 0 32px;
  max-width: var(--max-w);
}

.post__feature-image img {
  border-radius: var(--radius);
  width: 100%;
  box-shadow: var(--shadow-md);
}

/* ─── Post body ─── */
.post__content {
  margin-top: 40px;
}

.post__content h2 {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 700;
  margin: 48px 0 16px;
  letter-spacing: -0.02em;
}

.post__content h3 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  margin: 36px 0 12px;
}

.post__content p {
  margin-bottom: 20px;
}

.post__content strong { color: var(--text); }

/* Standard blockquote */
.post__content blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 20px;
  margin: 24px 0;
  color: var(--text-secondary);
  font-style: italic;
}

/* ─── PULL QUOTE ───
   Just bold text with breathing room. No decoration.
   The content engine wraps key insights in class="pull-quote".
   Ghost's alt blockquote (kg-blockquote-alt) gets the same treatment. */
.pull-quote,
.post__content blockquote.pull-quote,
.kg-blockquote-alt {
  border: none;
  border-left: none;
  font-style: normal;
  padding: 0;
  margin: 32px 0;
  text-align: left;
}

.pull-quote::before,
.pull-quote::after,
.kg-blockquote-alt::before,
.kg-blockquote-alt::after {
  display: none;
}

.pull-quote p,
.kg-blockquote-alt p {
  font-family: var(--serif);
  font-size: inherit;
  font-weight: 700;
  line-height: 1.72;
  color: var(--text);
  margin: 0;
}

/* ─── Report card (inline summary for recaps/weeklies) ─── */
.feat-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin: 24px 0;
  text-align: center;
}

.feat-card__label {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-light);
  margin-bottom: 8px;
}

.feat-card__num {
  font-family: var(--mono);
  font-size: 38px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.feat-card__num--green { color: var(--green); }
.feat-card__num--red { color: var(--red); }

.feat-card__sub {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-light);
  margin-top: 8px;
}

.feat-card__sub span { color: var(--text-secondary); }

/* ─── Code blocks ─── */
.post__content code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: var(--bg-alt);
  padding: 2px 6px;
  border-radius: 3px;
}

.post__content pre {
  background: #0d1117;
  color: #e6edf3;
  padding: 20px 24px;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 24px 0;
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.6;
  border: 1px solid #21262d;
}

[data-theme="dark"] .post__content pre {
  background: #010409;
  border-color: #21262d;
}

.post__content pre code {
  background: none;
  padding: 0;
}

/* ─── Lists, tables, etc. ─── */
.post__content ul, .post__content ol {
  margin: 16px 0 20px 24px;
}

.post__content li {
  margin-bottom: 8px;
}

.post__content table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 16px;
}

.post__content th {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: left;
  padding: 10px 12px;
  border-bottom: 2px solid var(--border);
  color: var(--text-light);
}

.post__content td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

.post__content img {
  border-radius: var(--radius);
  margin: 24px 0;
}

.post__content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 40px 0;
}

/* ═══════════════════════════════════════════════════════════
   POST FOOTER / TAGS
   ═══════════════════════════════════════════════════════════ */
.post__footer {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.post__tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.post__tags a {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-light);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  padding: 4px 12px;
  border-radius: 20px;
  transition: all var(--transition);
}

.post__tags a:hover {
  color: var(--text);
  border-color: var(--text-light);
  text-decoration: none;
}

/* ═══════════════════════════════════════════════════════════
   POST NAVIGATION
   ═══════════════════════════════════════════════════════════ */
.post-nav {
  max-width: var(--max-w);
  margin: 48px auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.post-nav__item {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: all var(--transition);
}

.post-nav__item:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--text-faint);
}

.post-nav__label {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-light);
  margin-bottom: 8px;
}

.post-nav__title {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
}

.post-nav__title a { color: var(--text); }
.post-nav__title a:hover { color: var(--accent); text-decoration: none; }

.post-nav__item--next { text-align: right; }

/* ═══════════════════════════════════════════════════════════
   PAGE (static pages)
   ═══════════════════════════════════════════════════════════ */
.page {
  max-width: var(--max-w);
  margin: 56px auto 0;
  padding: 0 24px;
}

.page__title {
  font-family: var(--serif);
  font-size: 38px;
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.03em;
  margin-bottom: 32px;
}

.page__content {
  margin-bottom: 64px;
}

.page__content p { margin-bottom: 20px; }
.page__content h2 { font-size: 28px; font-weight: 700; margin: 40px 0 16px; }
.page__content strong { color: var(--text); }

/* ═══════════════════════════════════════════════════════════
   PAGINATION
   ═══════════════════════════════════════════════════════════ */
.pagination {
  max-width: var(--max-w);
  margin: 40px auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--sans);
  font-size: 14px;
}

.pagination__count { color: var(--text-light); }

.pagination a {
  color: var(--text);
  font-weight: 500;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.pagination a:hover {
  border-color: var(--text-light);
  text-decoration: none;
}

/* ═══════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════ */
.site-footer {
  max-width: var(--wide-w);
  margin: 48px auto 0;
  padding: 28px 24px;
  display: flex;
  justify-content: space-between;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--text-light);
  border-top: 1px solid var(--border);
}

.site-footer a { color: var(--text-light); margin-left: 20px; }
.site-footer a:hover { color: var(--text); }

/* ═══════════════════════════════════════════════════════════
   GHOST CONTENT EDITOR (kg classes)
   ═══════════════════════════════════════════════════════════ */
.kg-width-wide {
  max-width: 860px;
  margin-left: calc((var(--max-w) - 860px) / 2);
  width: calc(100% + 180px);
}

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

.kg-width-wide img,
.kg-width-full img {
  width: 100%;
}

.kg-image-card,
.kg-gallery-card,
.kg-embed-card,
.kg-video-card,
.kg-audio-card {
  margin: 24px 0;
}

.kg-image-card img,
.kg-gallery-card img {
  border-radius: var(--radius);
}

.kg-image-card figcaption,
.kg-gallery-card figcaption,
.kg-video-card figcaption,
.kg-embed-card figcaption {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--text-light);
  text-align: center;
  margin-top: 8px;
}

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

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

.kg-gallery-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.kg-callout-card {
  border-left: 3px solid var(--accent);
  padding: 16px 20px;
  margin: 24px 0;
  background: var(--bg-alt);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.kg-callout-emoji {
  margin-right: 8px;
}

.kg-toggle-card {
  margin: 24px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.kg-toggle-heading {
  padding: 16px 20px;
  cursor: pointer;
  font-family: var(--sans);
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.kg-toggle-content {
  padding: 0 20px 16px;
}

.kg-button-card {
  margin: 24px 0;
  text-align: center;
}

.kg-button-card a {
  display: inline-block;
  padding: 12px 28px;
  background: var(--text);
  color: var(--bg);
  border-radius: var(--radius-sm);
  font-family: var(--sans);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
}

.kg-button-card a:hover {
  opacity: 0.85;
  text-decoration: none;
}

.kg-header-card {
  padding: 48px 40px;
  text-align: center;
  margin: 24px 0;
  border-radius: var(--radius);
}

.kg-header-card h2 {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 12px;
}

.kg-header-card p {
  font-size: 18px;
  color: var(--text-secondary);
}

.kg-file-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kg-file-card-title {
  font-family: var(--sans);
  font-weight: 700;
}

.kg-file-card-caption {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--text-light);
}

.kg-product-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin: 24px 0;
}

.kg-product-card-title {
  font-family: var(--sans);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.kg-product-card-description {
  font-size: 16px;
  color: var(--text-secondary);
}

.kg-signup-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  margin: 24px 0;
  text-align: center;
}

.kg-bookmark-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 24px 0;
}

.kg-bookmark-container {
  display: flex;
  text-decoration: none;
  color: var(--text);
}

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

.kg-bookmark-title {
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}

.kg-bookmark-description {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.kg-bookmark-metadata {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--text-light);
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.kg-bookmark-thumbnail {
  width: 180px;
  min-height: 120px;
}

.kg-bookmark-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}

/* ═══════════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════════ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.post-card {
  animation: fadeInUp 0.4s ease both;
}

.post-card:nth-child(2) { animation-delay: 0.05s; }
.post-card:nth-child(3) { animation-delay: 0.10s; }
.post-card:nth-child(4) { animation-delay: 0.15s; }
.post-card:nth-child(5) { animation-delay: 0.20s; }
.post-card:nth-child(6) { animation-delay: 0.25s; }

.stats__item {
  animation: fadeInUp 0.4s ease both;
}

.stats__item:nth-child(2) { animation-delay: 0.06s; }
.stats__item:nth-child(3) { animation-delay: 0.12s; }
.stats__item:nth-child(4) { animation-delay: 0.18s; }
.stats__item:nth-child(5) { animation-delay: 0.24s; }

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .stats__row {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 640px) {
  .site-header {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }
  .site-header__right {
    width: 100%;
    justify-content: space-between;
  }
  .site-header__nav a { margin-left: 0; margin-right: 16px; }
  .hero__title { font-size: 30px; }
  .post__title { font-size: 28px; }
  .stats__row { grid-template-columns: repeat(2, 1fr); }
  .stats__item:last-child { grid-column: span 2; }
  .subscribe__inner { flex-direction: column; align-items: stretch; }
  .subscribe__form { flex-direction: column; }
  .subscribe__form input[type="email"] { width: 100%; }
  .post-card { padding: 20px; }
  .post-card__title { font-size: 20px; }
  .post-nav { flex-direction: column; }
  .post-nav__item--next { text-align: left; }
  .site-footer { flex-direction: column; gap: 12px; }
  .kg-width-wide { width: 100%; margin-left: 0; }
  .theme-toggle { margin-left: 0; }
}
