/* TrackNList Blog: tnl-site v2.0.0
   Design tokens taken from tracknlist.com (Tailwind build): system UI stack,
   gray-900/700/600/500 text, softBlue #6C7DFF, brightPurple #7B5EFF, deepPurple #5D3FD3,
   rounded-md/xl/2xl, shadow-lg cards, gradient CTAs, gray-50 -> white footer. */

@font-face { font-family: "TNL Avenir"; src: url("../fonts/avenir-black-wordmark.woff2") format("woff2"); font-weight: 900; font-display: swap; }
@font-face { font-family: "TNL Retreat"; src: url("../fonts/retreat-wordmark.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --sys: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
  --font: var(--gh-font-body, var(--sys));
  --font-head: var(--gh-font-heading, var(--sys));
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  --soft-blue: #6C7DFF; --bright-purple: #7B5EFF; --deep-purple: #5D3FD3; --indigo: #4F46E5;
  --grad: linear-gradient(to right, #6C7DFF, #7B5EFF, #5D3FD3);
  --grad-br: linear-gradient(to bottom right, #6C7DFF, #7B5EFF, #5D3FD3);

  --gray-50: #F9FAFB; --gray-100: #F3F4F6; --gray-200: #E5E7EB; --gray-300: #D1D5DB; --gray-400: #9CA3AF;
  --gray-500: #6B7280; --gray-600: #4B5563; --gray-700: #374151; --gray-800: #1F2937; --gray-900: #111827;

  --shadow-sm: 0 1px 2px 0 rgba(0,0,0,.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -2px rgba(0,0,0,.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,.1), 0 8px 10px -6px rgba(0,0,0,.1);
  --shadow-brand: 0 10px 15px -3px rgba(108,125,255,.3), 0 4px 6px -4px rgba(108,125,255,.3);

  --r-md: 6px; --r-lg: 8px; --r-xl: 12px; --r-2xl: 16px;
  --header-h: 85px; --topbar-h: 34px;
  --max: 1280px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
/* beats the legacy head code injection (body{Inter !important; dark bg !important}) */
html body.tnl {
  margin: 0; background: #fff !important; color: var(--gray-900);
  font-family: var(--font) !important; font-size: 16px; line-height: 1.5; font-weight: 400;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
body.tnl a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
h1, h2, h3, h4, p, figure, ol, ul, dl { margin: 0; }
::selection { background: rgba(108,125,255,.22); }
:focus-visible { outline: 2px solid var(--soft-blue); outline-offset: 2px; border-radius: 4px; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding-left: 32px; padding-right: 32px; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 1000; background: var(--soft-blue); color: #fff !important; padding: 8px 14px; border-radius: var(--r-md); font-weight: 600; font-size: 14px; }
.skip-link:focus { top: 12px; }
.c-brand { color: var(--deep-purple); font-weight: 700; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.eyebrow { font-size: 16px; line-height: 28px; font-weight: 600; color: var(--deep-purple); }

/* ---------- banner ---------- */
.topbar { display: block; position: relative; z-index: 60; overflow: hidden; height: var(--topbar-h); background: var(--grad); color: #fff !important; }
.topbar-track { display: flex; width: max-content; height: 100%; align-items: center; animation: tnl-marquee 40s linear infinite; }
.topbar-track span { padding: 0 32px; font-size: 12px; font-weight: 700; letter-spacing: .08em; white-space: nowrap; }
.topbar-track span::after { content: "\2726"; margin-left: 64px; opacity: .7; }
.topbar:hover .topbar-track { animation-play-state: paused; }
@keyframes tnl-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- header (mirrors tracknlist.com: white, 85px, max-w-7xl, p-6 lg:px-8) ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s; }
.site-header.is-scrolled { border-bottom-color: var(--gray-200); box-shadow: var(--shadow-sm); }
.header-inner { max-width: var(--max); margin: 0 auto; height: var(--header-h); padding: 24px 32px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; }
.brand-logo { height: 32px; width: auto; }
.brand-name { font-family: "TNL Avenir", var(--sys); font-weight: 900; font-size: 20px; line-height: 30px; letter-spacing: .025em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.nav { display: flex; align-items: center; gap: 48px; }
body.tnl .nav-link { font-size: 14px; line-height: 24px; font-weight: 600; color: var(--gray-900); transition: color .2s; }
body.tnl .nav-link:hover, body.tnl .nav-link.is-active { color: var(--soft-blue); }
.nav-login-m { display: none !important; }
.header-actions { display: flex; align-items: center; gap: 20px; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 0; background: none; color: var(--gray-500); transition: color .2s; }
body.tnl .icon-btn:hover { color: var(--gray-700); }
body.tnl a.icon-btn { color: var(--gray-500); }
.menu-btn { display: none; color: var(--gray-700); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: var(--r-xl); border: 0; font-size: 15px; font-weight: 600; line-height: 1; white-space: nowrap; transition: transform .2s, box-shadow .2s, background .2s, color .2s; }
body.tnl .btn-nav { height: auto; padding: 8px 12px; border-radius: var(--r-md); background: var(--soft-blue); color: #fff; font-size: 14px; line-height: 21px; box-shadow: var(--shadow-sm); }
body.tnl .btn-nav:hover { background: var(--bright-purple); }
body.tnl .btn-primary { background: var(--grad); color: #fff; box-shadow: var(--shadow-brand); }
body.tnl .btn-primary:hover { transform: translateY(-1px); box-shadow: 0 14px 22px -4px rgba(108,125,255,.4), 0 6px 8px -4px rgba(108,125,255,.35); }
body.tnl .btn-secondary { background: #fff; color: var(--gray-900); box-shadow: inset 0 0 0 1px var(--gray-200), var(--shadow-sm); }
body.tnl .btn-secondary:hover { color: var(--deep-purple); box-shadow: inset 0 0 0 1px rgba(108,125,255,.5), var(--shadow-sm); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 14px; border-radius: var(--r-lg); }
.btn-block { width: 100%; }
.btn.is-disabled { opacity: .45; pointer-events: none; }

/* homepage "Free Trial / Get Started" style: 72px, rounded-xl, gradient, icon + 2-line label */
.btn-hero { position: relative; display: inline-flex; align-items: center; gap: 12px; height: 72px; padding: 0 32px; border-radius: var(--r-xl); background: var(--grad); color: #fff !important; box-shadow: var(--shadow-brand); overflow: hidden; isolation: isolate; transition: transform .2s, box-shadow .2s; }
.btn-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to right, transparent, rgba(255,255,255,.25), transparent); transform: translateX(-100%); transition: transform .6s; }
.btn-hero:hover { transform: translateY(-2px) scale(1.02); }
.btn-hero:hover::after { transform: translateX(100%); }
.btn-hero-icon { width: 32px; height: 32px; flex-shrink: 0; transform: rotate(-8deg); }
.btn-hero-label { display: flex; flex-direction: column; align-items: flex-start; }
.btn-hero-label small { font-size: 12px; line-height: 16px; font-weight: 500; opacity: .9; }
.btn-hero-label span { font-size: 18px; line-height: 28px; font-weight: 700; }
.btn-hero-alt { background: #fff; color: var(--gray-900) !important; box-shadow: inset 0 0 0 1px var(--gray-200), var(--shadow-lg); }
.btn-hero-alt .btn-hero-icon { transform: none; color: var(--deep-purple); }
.btn-hero-alt::after { background: linear-gradient(to right, transparent, rgba(108,125,255,.08), transparent); }

/* icon tile: homepage feature icon (rounded-xl gradient square) */
.icon-tile { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: var(--r-xl); background: var(--grad-br); color: #fff; box-shadow: var(--shadow-brand); flex-shrink: 0; }
.icon-tile-lg { width: 56px; height: 56px; }

/* ---------- hero ---------- */
.hero, .post-head, .archive-head, .error-wrap { position: relative; isolation: isolate; overflow: hidden; }
.hero-blob { position: absolute; z-index: -1; top: -200px; right: -8%; width: 62%; max-width: 900px; height: 900px; pointer-events: none;
  background: radial-gradient(closest-side at 62% 40%, rgba(144,137,252,.38), rgba(144,137,252,0) 100%), radial-gradient(closest-side at 40% 62%, rgba(255,128,181,.22), rgba(255,128,181,0) 100%);
  filter: blur(24px); }
.hero-blob-sm { top: -420px; width: 50%; opacity: .7; }
.hero { padding: 72px 0 16px; }
.hero-inner { max-width: var(--max); }
.hero-title { margin-top: 12px; max-width: 860px; font-family: var(--font-head); font-size: 48px; line-height: 1.2; font-weight: 700; letter-spacing: -.025em; color: var(--gray-900); }
.hero-sub { margin-top: 24px; max-width: 640px; font-size: 18px; line-height: 32px; color: var(--gray-600); }
.hero-sub strong { color: var(--deep-purple); }
.hero-actions { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 16px; }
.tag-row { margin-top: 56px; display: flex; gap: 10px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
.tag-row::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 16px; border-radius: 9999px; background: #fff; box-shadow: inset 0 0 0 1px var(--gray-200); font-size: 14px; font-weight: 600; color: var(--gray-700) !important; white-space: nowrap; transition: color .2s, box-shadow .2s, background .2s; }
.chip:hover { color: var(--deep-purple) !important; box-shadow: inset 0 0 0 1px rgba(108,125,255,.55); }
.chip.is-active { background: var(--grad); color: #fff !important; box-shadow: var(--shadow-brand); }
.chip-count { font-size: 12px; font-weight: 600; color: var(--gray-400); }
.chip.is-active .chip-count { color: rgba(255,255,255,.8); }
.pill { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 9999px; background: linear-gradient(to bottom right, rgba(108,125,255,.12), rgba(123,94,255,.12)); color: var(--deep-purple); font-size: 12px; font-weight: 600; }

/* ---------- feed + cards (homepage: rounded-2xl, white, ring-1 gray-200, shadow-lg) ---------- */
.feed-section { padding-top: 56px; padding-bottom: 96px; }
.feed-section-tight { padding-top: 24px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 32px; }
.section-title { font-family: var(--font-head); font-size: 36px; line-height: 40px; font-weight: 700; letter-spacing: -.025em; color: var(--gray-900); }
.section-meta { font-size: 14px; color: var(--gray-500); }
body.tnl .section-link { font-size: 14px; font-weight: 600; color: var(--soft-blue); }
body.tnl .section-link:hover { color: var(--bright-purple); }
.feed { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.card { position: relative; border-radius: var(--r-2xl); background: #fff; box-shadow: 0 0 0 1px var(--gray-200), var(--shadow-lg); transition: transform .25s, box-shadow .25s; }
.card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--grad-br); opacity: 0; transition: opacity .3s; pointer-events: none; }
.card:hover { transform: translateY(-4px); box-shadow: 0 0 0 1px rgba(108,125,255,.35), var(--shadow-xl); }
.card:hover::after { opacity: .05; }
.card-link { display: flex; flex-direction: column; height: 100%; }
.card-media { aspect-ratio: 1200 / 630; overflow: hidden; border-radius: var(--r-2xl) var(--r-2xl) 0 0; background: var(--gray-100); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover .card-media img { transform: scale(1.03); }
.card-media-fallback { display: flex; align-items: center; justify-content: center; height: 100%; background: var(--grad-br); color: #fff; font-family: "TNL Avenir", var(--sys); font-weight: 900; font-size: 28px; }
.card-body { display: flex; flex-direction: column; align-items: flex-start; flex: 1; padding: 24px 28px 28px; }
.card-title { margin-top: 14px; font-family: var(--font-head); font-size: 18px; line-height: 28px; font-weight: 600; color: var(--gray-900); letter-spacing: -.01em; }
.card:hover .card-title { color: var(--deep-purple); }
.card-excerpt { margin-top: 8px; font-size: 14px; line-height: 24px; color: var(--gray-600); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { margin-top: auto; padding-top: 18px; font-size: 13px; color: var(--gray-500); }
.sep { margin: 0 6px; color: var(--gray-300); }
/* page 1: lead story spans the row, horizontal */
.feed-home { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.feed-home .card { grid-column: span 2; }
.feed-home .card:first-child { grid-column: 1 / -1; }
.feed-home .card:nth-child(2), .feed-home .card:nth-child(3) { grid-column: span 3; }
.feed-home .card:first-child .card-link { flex-direction: row; }
.feed-home .card:first-child .card-media { flex: 0 0 58%; aspect-ratio: 1200 / 630; border-radius: var(--r-2xl) 0 0 var(--r-2xl); }
.feed-home .card:first-child .card-body { justify-content: center; padding: 40px 48px; }
.feed-home .card:first-child .card-title { font-size: 30px; line-height: 38px; font-weight: 700; letter-spacing: -.025em; }
.feed-home .card:first-child .card-excerpt { font-size: 16px; line-height: 28px; -webkit-line-clamp: 4; }
.feed-home .card:first-child .card-meta { margin-top: 0; }

.pager { display: flex; align-items: center; justify-content: center; gap: 20px; margin-top: 56px; }
.pager-info { font-size: 14px; color: var(--gray-500); }

/* ---------- archive ---------- */
.archive-head { padding: 64px 0 32px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--gray-500); }
body.tnl .crumbs a { color: var(--soft-blue); }
body.tnl .crumbs a:hover { color: var(--bright-purple); }
.crumb-sep { color: var(--gray-300); }
.archive-title { margin-top: 16px; font-family: var(--font-head); font-size: 48px; line-height: 1.15; font-weight: 700; letter-spacing: -.025em; color: var(--gray-900); }
.archive-desc { margin-top: 16px; max-width: 680px; font-size: 18px; line-height: 32px; color: var(--gray-600); }
.archive-meta { margin-top: 20px; }

/* ---------- post ---------- */
.progress { position: fixed; z-index: 70; top: 0; left: 0; right: 0; height: 3px; pointer-events: none; }
.progress-bar { display: block; height: 100%; background: var(--grad); transform-origin: 0 50%; transform: scaleX(0); }
.post-head { padding: 56px 0 40px; }
.post-head-inner { max-width: 1156px; }
.post-head-inner > * { max-width: 880px; }
.post-title { margin-top: 18px; font-family: var(--font-head); font-size: 48px; line-height: 1.17; font-weight: 700; letter-spacing: -.025em; color: var(--gray-900); }
.post-excerpt { margin-top: 20px; font-size: 20px; line-height: 32px; color: var(--gray-600); }
.post-meta { margin-top: 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: 14px; color: var(--gray-500); }
.author { display: inline-flex; align-items: center; gap: 10px; }
.author-img { width: 40px; height: 40px; border-radius: 9999px; object-fit: cover; box-shadow: 0 0 0 1px var(--gray-200); background: #fff; }
.author-img-logo { object-fit: contain; padding: 8px; }
.author-name { font-weight: 600; color: var(--gray-900); }
body.tnl .author:hover .author-name { color: var(--deep-purple); }
.meta-dot { width: 3px; height: 3px; border-radius: 9999px; background: var(--gray-300); }
.post-media { max-width: 1156px; }
.post-media img { width: 100%; border-radius: var(--r-xl); box-shadow: 0 0 0 1px rgba(156,163,175,.1), var(--shadow-xl); }
.post-media figcaption { margin-top: 12px; font-size: 13px; color: var(--gray-500); text-align: center; }

.post-layout { display: grid; grid-template-columns: minmax(0, 720px) 300px; justify-content: center; gap: 72px; padding-top: 56px; padding-bottom: 32px; }
.post-layout.is-single { grid-template-columns: minmax(0, 720px); padding-top: 8px; padding-bottom: 80px; }
.page .post-head-inner { max-width: 784px; }
.page .post-media { max-width: 784px; }
.post-aside { position: relative; }
.aside-sticky { position: sticky; top: calc(var(--header-h) + 24px); display: flex; flex-direction: column; gap: 24px; }
.toc-h { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gray-500); margin-bottom: 12px; }
.toc-list { list-style: none; padding: 0; margin: 0; }
body.tnl .toc-list a { display: block; padding: 6px 0 6px 14px; border-left: 2px solid var(--gray-200); font-size: 14px; line-height: 20px; color: var(--gray-600); transition: color .2s, border-color .2s; }
body.tnl .toc-list li.is-h3 a { padding-left: 28px; font-size: 13px; }
body.tnl .toc-list a:hover { color: var(--gray-900); }
body.tnl .toc-list a.is-active { color: var(--deep-purple); border-left-color: var(--soft-blue); font-weight: 600; }
.toc-mobile { margin-bottom: 32px; border-radius: var(--r-xl); background: var(--gray-50); box-shadow: inset 0 0 0 1px var(--gray-200); }
.toc-mobile summary { padding: 14px 18px; font-size: 15px; font-weight: 600; color: var(--gray-900); cursor: pointer; }
.toc-mobile .toc-list { padding: 0 18px 14px; }

.cta-card { position: relative; padding: 28px; border-radius: var(--r-2xl); background: linear-gradient(to bottom right, #fff, var(--gray-50)); box-shadow: 0 0 0 1px var(--gray-200), var(--shadow-lg); overflow: hidden; }
.cta-card::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom right, rgba(108,125,255,.08), rgba(123,94,255,.06), transparent 70%); pointer-events: none; }
.cta-card > * { position: relative; }
.cta-title { margin-top: 18px; font-size: 18px; line-height: 26px; font-weight: 700; color: var(--gray-900); }
.cta-text { margin-top: 8px; font-size: 14px; line-height: 22px; color: var(--gray-600); margin-bottom: 20px; }
.cta-note { margin-top: 12px; font-size: 12px; color: var(--gray-500); text-align: center; }

.post-content { font-size: 18px; line-height: 1.75; color: var(--gray-700); overflow-wrap: break-word; }
.post-content > * + * { margin-top: 1.25em; }
.post-content h2, .post-content h3, .post-content h4 { font-family: var(--font-head); color: var(--gray-900); letter-spacing: -.02em; scroll-margin-top: calc(var(--header-h) + 24px); }
.post-content h2 { margin-top: 2.2em; font-size: 30px; line-height: 1.3; font-weight: 700; }
.post-content h3 { margin-top: 1.8em; font-size: 22px; line-height: 1.4; font-weight: 600; }
.post-content h4 { margin-top: 1.6em; font-size: 18px; font-weight: 600; }
.post-content h2 + *, .post-content h3 + *, .post-content h4 + * { margin-top: .6em; }
body.tnl .post-content .anchor { margin-left: .4ch; color: var(--gray-300); opacity: 0; transition: opacity .2s; font-weight: 500; }
.post-content h2:hover .anchor, .post-content h3:hover .anchor, .post-content .anchor:focus { opacity: 1; }
body.tnl .post-content a { color: var(--deep-purple); font-weight: 500; text-decoration: underline; text-decoration-color: rgba(108,125,255,.4); text-underline-offset: 3px; text-decoration-thickness: 1.5px; transition: color .2s, text-decoration-color .2s; }
body.tnl .post-content a:hover { color: var(--soft-blue); text-decoration-color: var(--soft-blue); }
.post-content strong { color: var(--gray-900); font-weight: 650; }
.post-content ul, .post-content ol { padding-left: 1.4em; }
.post-content li + li { margin-top: .5em; }
.post-content li::marker { color: var(--soft-blue); font-weight: 600; }
.post-content blockquote { margin-left: 0; margin-right: 0; padding: 4px 0 4px 24px; border-left: 4px solid var(--soft-blue); color: var(--gray-900); font-size: 20px; line-height: 1.6; font-weight: 500; }
.post-content hr { border: 0; height: 1px; margin: 3em 0; background: linear-gradient(to right, transparent, var(--soft-blue), transparent); opacity: .5; }
/* code is the one monospace accent */
.post-content code { font-family: var(--mono); font-size: .85em; padding: 2px 6px; border-radius: var(--r-md); background: rgba(108,125,255,.1); color: var(--deep-purple); }
.post-content pre { position: relative; margin-top: 1.6em; padding: 48px 20px 20px; background: var(--gray-900); border-radius: var(--r-xl); overflow-x: auto; font-size: 14px; line-height: 1.7; box-shadow: var(--shadow-lg); }
.post-content pre::before { content: attr(data-lang); position: absolute; top: 0; left: 0; right: 0; height: 36px; padding: 0 16px; display: flex; align-items: center; font-family: var(--mono); font-size: 12px; color: var(--gray-400); border-bottom: 1px solid rgba(255,255,255,.08); text-transform: lowercase; }
.post-content pre code { padding: 0; background: none; color: #E5E7EB; font-size: inherit; }
.copy-btn { position: absolute; top: 6px; right: 8px; height: 24px; padding: 0 10px; border: 0; border-radius: var(--r-md); background: rgba(255,255,255,.08); color: var(--gray-300); font-size: 12px; font-weight: 600; }
.copy-btn:hover { background: rgba(255,255,255,.16); color: #fff; }
.post-content figure { margin-left: 0; margin-right: 0; }
.post-content figure img { border-radius: var(--r-xl); box-shadow: 0 0 0 1px var(--gray-200); }
.post-content figcaption { margin-top: 10px; font-size: 14px; color: var(--gray-500); text-align: center; }
.post-content table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 15px; display: block; overflow-x: auto; border-radius: var(--r-xl); box-shadow: inset 0 0 0 1px var(--gray-200); }
.post-content th, .post-content td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--gray-200); white-space: nowrap; }
.post-content tr:last-child td { border-bottom: 0; }
.post-content th { color: var(--gray-900); font-weight: 600; background: var(--gray-50); }
.post-content mark { background: rgba(123,94,255,.18); color: var(--gray-900); padding: 0 3px; border-radius: 3px; }
.post-content .kg-width-wide { position: relative; width: min(100vw - 64px, 1024px); max-width: none; margin-left: 50%; transform: translateX(-50%); }
.post-content .kg-width-full { position: relative; width: 100vw; max-width: none; margin-left: 50%; transform: translateX(-50%); }
.post-content .kg-width-full img { border-radius: 0; box-shadow: none; }
body.tnl .post-content .kg-callout-card { padding: 20px 24px; border-radius: var(--r-xl); background: linear-gradient(to bottom right, rgba(108,125,255,.08), rgba(123,94,255,.05)); box-shadow: inset 0 0 0 1px rgba(108,125,255,.25); color: var(--gray-800); font-size: 17px; }
body.tnl .post-content .kg-bookmark-card a.kg-bookmark-container { border-radius: var(--r-xl); box-shadow: 0 0 0 1px var(--gray-200), var(--shadow-md); color: var(--gray-900); text-decoration: none; }
.post-content .kg-bookmark-description, .post-content .kg-bookmark-metadata { color: var(--gray-500); }
body.tnl .post-content .kg-button-card a.kg-btn { border-radius: var(--r-xl); background: var(--grad); color: #fff; text-decoration: none; font-weight: 600; box-shadow: var(--shadow-brand); }
body.tnl .post-content .kg-toggle-card { border-radius: var(--r-xl); box-shadow: inset 0 0 0 1px var(--gray-200); }

.post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 48px; }
.post-end { position: relative; margin-top: 48px; display: grid; grid-template-columns: auto 1fr; gap: 20px 24px; align-items: start; padding: 36px; border-radius: var(--r-2xl); background: linear-gradient(to bottom right, #fff, var(--gray-50)); box-shadow: 0 0 0 1px var(--gray-200), var(--shadow-lg); overflow: hidden; }
.post-end::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom right, rgba(108,125,255,.1), rgba(123,94,255,.1), transparent 75%); pointer-events: none; }
.post-end > * { position: relative; }
.post-end .btn-hero { grid-column: 2; justify-self: start; }
.post-end-title { font-size: 24px; line-height: 32px; font-weight: 700; letter-spacing: -.02em; color: var(--gray-900); }
.post-end-text { margin-top: 8px; font-size: 16px; line-height: 26px; color: var(--gray-600); }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 32px; }
.share-label { font-size: 14px; font-weight: 600; color: var(--gray-500); margin-right: 6px; }
.related { padding-top: 48px; padding-bottom: 96px; }

/* ---------- footer CTA + footer (homepage footer: gradient top line, gray-50 -> white) ---------- */
.footer-cta { padding: 96px 0; background: linear-gradient(#fff, var(--gray-50), #fff); text-align: center; }
.footer-cta-inner { display: flex; flex-direction: column; align-items: center; }
.footer-cta-title { margin-top: 8px; max-width: 760px; font-family: var(--font-head); font-size: 36px; line-height: 1.25; font-weight: 700; letter-spacing: -.025em; color: var(--gray-900); }
.footer-cta-text { margin-top: 16px; max-width: 600px; font-size: 18px; line-height: 30px; color: var(--gray-600); margin-bottom: 36px; }
.site-footer { position: relative; background: linear-gradient(var(--gray-50), #fff); border-top: 1px solid var(--gray-200); }
.footer-line { position: absolute; top: -1px; left: 0; right: 0; height: 1px; background: linear-gradient(to right, transparent, var(--soft-blue), transparent); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr; gap: 40px; padding-top: 48px; padding-bottom: 56px; }
body.tnl .footer-wordmark { display: inline-block; font-family: "TNL Retreat", var(--sys); font-size: 30px; line-height: 40px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.footer-brand p { margin-top: 12px; max-width: 280px; font-size: 14px; line-height: 22px; color: var(--gray-600); }
body.tnl .footer-more { display: inline-block; margin-top: 16px; font-size: 14px; font-weight: 600; color: var(--soft-blue); }
body.tnl .footer-more:hover { color: var(--bright-purple); }
.footer-h { font-size: 14px; font-weight: 600; color: var(--gray-900); margin-bottom: 16px; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col .footer-h { margin-bottom: 6px; }
body.tnl .footer-col > a { font-size: 14px; line-height: 21px; color: var(--gray-600); transition: color .2s; }
body.tnl .footer-col > a:hover { color: var(--soft-blue); }
.footer-copy { font-size: 14px; line-height: 21px; color: var(--gray-600); }
.socials { display: flex; gap: 12px; }
body.tnl .social { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: var(--r-lg); background: #fff; box-shadow: inset 0 0 0 1px var(--gray-200); color: var(--gray-600); transition: color .2s, box-shadow .2s, transform .2s; }
body.tnl .social:hover { color: var(--soft-blue); box-shadow: inset 0 0 0 1px rgba(108,125,255,.5); transform: translateY(-2px); }

/* ---------- mobile sticky CTA ---------- */
.mobile-cta { display: none; }

/* ---------- error ---------- */
.error-wrap { min-height: 100vh; display: flex; align-items: center; }
.error-inner .brand { margin-bottom: 48px; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .nav { gap: 28px; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .post-layout { grid-template-columns: minmax(0, 720px) 260px; gap: 48px; }
}
@media (max-width: 1023px) {
  .header-inner { padding: 24px; }
  .menu-btn { display: inline-flex; }
  .nav-login, .icon-discord, .brand-name { display: none !important; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 24px 20px; background: #fff; border-bottom: 1px solid var(--gray-200); box-shadow: var(--shadow-lg); }
  .nav.is-open { display: flex; }
  body.tnl .nav .nav-link { padding: 12px 0; font-size: 16px; border-bottom: 1px solid var(--gray-100); }
  .nav-login-m { display: block !important; border-bottom: 0 !important; }
  .feed { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
  .feed-home { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feed-home .card, .feed-home .card:nth-child(2), .feed-home .card:nth-child(3) { grid-column: auto; }
  .feed-home .card:first-child { grid-column: 1 / -1; }
  .post-layout { grid-template-columns: minmax(0, 720px); gap: 0; }
  .post-aside { display: none; }
  .toc-mobile:not([hidden]) { display: block; }
  .feed-home .card:first-child .card-link { flex-direction: column; }
  .feed-home .card:first-child .card-media { flex: none; width: 100%; border-radius: var(--r-2xl) var(--r-2xl) 0 0; }
  .feed-home .card:first-child .card-body { padding: 28px; }
  .feed-home .card:first-child .card-title { font-size: 24px; line-height: 32px; }
}
@media (min-width: 1024px) { .toc-mobile { display: none !important; } }
@media (max-width: 767px) {
  .container { padding-left: 24px; padding-right: 24px; }
  .header-inner { height: 72px; padding: 16px 24px; }
  :root { --header-h: 72px; }
  .header-actions { gap: 16px; }
  .header-cta { display: none !important; }
  .hero { padding: 40px 0 8px; text-align: center; }
  .hero-title { font-size: 30px; line-height: 1.33; margin-left: auto; margin-right: auto; }
  .hero-sub { font-size: 18px; line-height: 30px; margin-left: auto; margin-right: auto; }
  .hero-actions { flex-direction: column; align-items: center; margin-top: 32px; }
  .btn-hero { height: 56px; padding: 0 20px; }
  .btn-hero-icon { width: 24px; height: 24px; }
  .btn-hero-label small { font-size: 11px; line-height: 14px; }
  .btn-hero-label span { font-size: 16px; line-height: 22px; }
  .tag-row { margin-top: 40px; margin-left: 0; padding-left: 24px; padding-right: 24px; }
  .feed, .feed-home { grid-template-columns: minmax(0, 1fr); }
  .feed-section { padding-top: 40px; padding-bottom: 72px; }
  .section-title { font-size: 30px; line-height: 36px; }
  .card-body { padding: 20px 22px 24px; }
  .post-head { padding: 32px 0 28px; }
  .post-title, .archive-title { font-size: 30px; line-height: 1.3; }
  .post-excerpt { font-size: 18px; line-height: 28px; }
  .post-layout { padding-top: 32px; }
  .post-media { padding-left: 16px; padding-right: 16px; }
  .post-content { font-size: 17px; }
  .post-content h2 { font-size: 24px; }
  .post-content h3 { font-size: 20px; }
  .post-end { grid-template-columns: 1fr; padding: 28px 24px; }
  .post-end .btn-hero { grid-column: 1; }
  .archive-head { padding: 40px 0 16px; }
  .archive-desc { font-size: 17px; line-height: 28px; }
  .footer-cta { padding: 72px 0; }
  .footer-cta-title { font-size: 30px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; padding-bottom: 96px; }
  .footer-brand { grid-column: 1 / -1; }
  .mobile-cta { position: fixed; z-index: 55; left: 12px; right: 12px; bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 10px 10px 16px; border-radius: var(--r-2xl); background: rgba(255,255,255,.96); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: 0 0 0 1px var(--gray-200), var(--shadow-xl); transform: translateY(140%); transition: transform .3s; }
  .mobile-cta.is-visible { transform: translateY(0); }
  .mobile-cta-text { display: flex; flex-direction: column; min-width: 0; }
  .mobile-cta-text strong { font-size: 14px; line-height: 20px; color: var(--gray-900); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mobile-cta-text span { font-size: 12px; line-height: 16px; color: var(--gray-500); }
  .mobile-cta .btn { flex-shrink: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
