:root{
  --bg:#fbf8f1;
  --text:#211f1b;
  --muted:#6f675d;
  --soft:#f3eee4;
  --border:#ded3c3;
  --accent:#5f4632;
  --accentSoft:#f6efe6;
  --shadow: 0 10px 26px rgba(44,34,24,.06);
  --radius: 14px;
  --page-bg:#f5efe6;
  --panel-bg:#fffdf8;
}

*{box-sizing:border-box}

section[id]{
  scroll-margin-top: 90px;
}

body{
  margin:0;
  background:var(--page-bg);
  color:var(--text);
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  line-height:1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.site-logo img{
  height:56px;
  width:auto;
  display:block;
}

.navbar{
  background: var(--panel-bg) !important;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom:1px solid var(--border) !important;
}

.nav-link{
  font-size: 15px;
  font-weight: 500;
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  color:var(--muted);
}

.nav-link:hover,
.nav-link:focus{
  color:var(--text);
}

.navbar .navbar-brand{
  padding: 0;
  margin: 0;
  line-height: normal;
  display: flex;
  align-items: center;
}

.navbar .navbar-brand img{
  height: 84px !important;
  width: auto !important;
  max-height: none !important;
  min-height: 0 !important;
  display: block;
}

.nav-subscribe {
  background: var(--accent);
  color: var(--panel-bg);
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 14px;
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  font-weight: 600;
  text-decoration: none;
  border: none;
}

.nav-subscribe:hover,
.nav-subscribe:focus {
  background: var(--text);
  color: var(--panel-bg);
}

a{
  color:var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover,
a:focus{
  color:var(--text);
}

h1{
  margin:0 0 16px;
  font-size: clamp(36px, 4vw, 54px);
  line-height:1.04;
  letter-spacing:-0.045em;
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  font-weight: 600;
}

h2{
  margin:0 0 14px;
  font-size: clamp(24px, 2.2vw, 31px);
  line-height:1.15;
  letter-spacing:-0.035em;
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  font-weight: 600;
}

h3,
.h6{
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  font-weight: 600;
  color:var(--text);
}

p{
  max-width: 72ch;
}


.analysis-table {
    width:100%;
    border-collapse:collapse;
    font-size:0.95rem;
    line-height:1.5;
    margin:2rem 0;
    background:#f7f3ea;
}

.analysis-table th {
    text-align:left;
    padding:12px;
    border:1px solid #d9d2c3;
    background:#efe8d9;
    font-size:0.85rem;
    letter-spacing:0.04em;
    text-transform:uppercase;
}

.analysis-table td {
    padding:12px;
    border:1px solid #d9d2c3;
    vertical-align:top;
}


.hero-profile{
  max-width: 320px;
}

.profile-photo{
  width: 100%;
  max-width: 260px;
  display: block;
  filter: grayscale(60%);
}

.lead{
  color:var(--muted);
  font-size: clamp(17px, 1.4vw, 19px);
  line-height:1.58;
}

.text-muted{
  color:var(--muted) !important;
}

.panel,
.card,
.boxcard{
  background:var(--panel-bg);
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow: var(--shadow);
}

.card,
.boxcard,
.panel{
  background-image: linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,253,248,0));
}

.badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-size:11px;
  color:var(--muted);
  padding:5px 9px;
  border-radius:999px;
  border:1px solid var(--border);
  background:var(--soft);
  width:max-content;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  font-weight:500;
  letter-spacing:.02em;
}

.callout{
  border:1px solid var(--border);
  background:var(--accentSoft);
  border-radius: var(--radius);
  padding:18px;
  box-shadow: var(--shadow);
}

.callout b{
  color:var(--text);
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  font-weight:600;
}

.meta {
  color:#a09689;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

footer{
  padding:36px 0 56px;
  border-top:1px solid var(--border);
  color:var(--muted);
  font-size:14px;
  background:var(--page-bg);
}
/* ---- GHOST KOENIG EDITOR REQUIRED CLASSES ---------------- */

.kg-width-wide {
  margin-left: calc(50% - 50vw + 2rem);
  margin-right: calc(50% - 50vw + 2rem);
  max-width: 100vw;
}

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

.kg-image-card img,
.kg-gallery-card img { max-width: 100%; height: auto; display: block; margin: 0 auto; }
.kg-image-card figcaption,
.kg-gallery-card figcaption { font-size: 0.8125rem; color: var(--muted); text-align: center; margin-top: 0.5rem; }
.kg-gallery-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0.5rem; margin: 1.5rem 0; }
.kg-gallery-row { display: contents; }
.kg-gallery-image img { width: 100%; height: 100%; object-fit: cover; }
.kg-embed-card { margin: 1.5rem 0; }
.kg-embed-card iframe, .kg-embed-card video { max-width: 100%; }
.kg-bookmark-card { border: 1px solid var(--border); border-radius: var(--radius); margin: 1.5rem 0; overflow: hidden; }
.kg-bookmark-container { display: flex; text-decoration: none; color: var(--text); }
.kg-bookmark-content { padding: 1rem 1.25rem; flex: 1; }
.kg-bookmark-title { font-weight: 600; font-size: 0.95rem; margin-bottom: 0.25rem; }
.kg-bookmark-description { font-size: 0.8125rem; color: var(--muted); line-height: 1.5; }
.kg-bookmark-metadata { font-size: 0.75rem; color: var(--muted); margin-top: 0.5rem; }
.kg-bookmark-thumbnail img { width: 160px; height: 100%; object-fit: cover; display: block; }
.kg-callout-card { display: flex; gap: 1rem; align-items: flex-start; background: #f5f1e8; border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; margin: 1.5rem 0; }
.kg-callout-emoji { font-size: 1.25rem; line-height: 1.5; }
.kg-toggle-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; margin: 1.5rem 0; }
.kg-toggle-heading { font-weight: 600; cursor: pointer; }
.kg-video-card { margin: 1.5rem 0; }
.kg-video-card video { max-width: 100%; display: block; }
.gh-portal-open { cursor: pointer; }

/* ---- POST LIST (archive style) --------------------------- */

.archive-list article { margin-bottom: 1.5rem; padding-bottom: 1.5rem; }

.archive-list h2 a {
  color: var(--text);
  text-decoration: none;
}

.archive-list h2 a:hover {
  color: var(--accent);
}

.post-title-link {
  color: var(--text);
  text-decoration: none;
}

.post-title-link:hover {
  color: var(--accent);
}

.tag-link {
  color: var(--muted);
  text-decoration: none;
}

.tag-link:hover { color: var(--text); }

.read-more {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.875rem;
}

.read-more:hover { color: var(--text); }

.tag-pill {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  background: var(--soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.8rem;
  color: var(--muted);
  transition: background 0.15s ease;
}

.tag-pill:hover { background: var(--border); color: var(--text); }

/* ---- POST CONTENT ---------------------------------------- */

.post-content { font-size: 1.0625rem; line-height: 1.8; }
.post-content p { margin-bottom: 1.25rem; max-width: 72ch; }
.post-content h2 { margin-top: 2.5rem; }
.post-content h3 { margin-top: 2rem; }
.post-content blockquote { border-left: 3px solid var(--border); padding-left: 1.25rem; margin-left: 0; color: var(--muted); font-style: italic; }
.post-content hr { border: none; border-top: 1px solid var(--border); margin: 2.5rem 0; }
.post-content figure { margin: 2rem 0; }
.post-content figcaption { font-size: 0.8125rem; color: var(--muted); margin-top: 0.5rem; }
.post-content pre { background: var(--soft); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; overflow-x: auto; font-size: 0.875rem; }
.post-content code { background: var(--soft); border-radius: 3px; padding: 0.1em 0.35em; font-size: 0.875em; }
.post-content pre code { background: none; padding: 0; }


/* ============================================================
   HOMEPAGE LAYOUT
   ============================================================ */

/* ---- TOP SECTION: hero + popular ------------------------- */

.home-top {
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
}

.home-top-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 3rem;
  align-items: start;
}

/* Hero */
.home-hero-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
}

.home-hero-body {
  padding-top: 1.25rem;
}

.home-hero-title {
  font-size: clamp(1.5rem, 2.5vw, 2.1rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
  margin-bottom: 0.75rem;
}

.home-hero-title a {
  color: var(--text);
  text-decoration: none;
}

.home-hero-title a:hover { color: var(--accent); }

.home-hero-excerpt {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
  max-width: 60ch;
}

.home-lock { font-size: 0.75rem; opacity: 0.6; }

/* Popular list */
.home-popular-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.home-popular-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.home-popular-viewall {
  font-size: 0.8rem;
  color: var(--accent);
  text-decoration: none;
}

.home-popular-viewall:hover { color: var(--text); }

.home-popular-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.home-popular-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.home-popular-body { flex: 1; min-width: 0; }

.home-popular-title {
  font-size: 0.9375rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: 0.25rem;
}

.home-popular-title a {
  color: var(--text);
  text-decoration: none;
}

.home-popular-title a:hover { color: var(--accent); }

.home-popular-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
  flex-shrink: 0;
}

/* ---- BELOW FOLD: list + sidebar -------------------------- */

.home-below { padding: 2.5rem 0; }

.home-below-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 3rem;
  align-items: start;
}

.home-below-heading {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

/* Archive list item with optional image */
.home-list-item {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  padding: 1.25rem 0;
}

.home-list-body { flex: 1; min-width: 0; }

.home-list-title {
  font-size: 1.1rem;
  line-height: 1.25;
  letter-spacing: -0.025em;
  margin-bottom: 0.35rem;
}

.home-list-title a {
  color: var(--text);
  text-decoration: none;
}

.home-list-title a:hover { color: var(--accent); }

.home-list-excerpt {
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 0.35rem;
}

.home-list-thumb-wrap { flex-shrink: 0; }

.home-list-thumb {
  width: 120px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

/* ---- RESPONSIVE ------------------------------------------ */

@media (max-width: 1024px) {
  .home-top-grid { grid-template-columns: 1fr; }
  .home-popular-col { border-top: 1px solid var(--border); padding-top: 1.5rem; }
  .home-below-grid { grid-template-columns: 1fr; }
}

@media (max-width: 767px) {
  .home-list-thumb { width: 80px; height: 56px; }
}

/* ---- SECTION/TAG PAGE HEADER ----------------------------- */

.section-header {
  padding: 2.5rem 0 2rem;
  background: var(--panel-bg);
}

.section-title {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  letter-spacing: -0.04em;
  margin-bottom: 0.5rem;
}

.section-desc {
  color: var(--muted);
  font-size: clamp(1rem, 1.4vw, 1.125rem);
  max-width: 64ch;
  margin-bottom: 0;
}

/* ---- INSIGHTS FREE TO READ BOX -------------------------- */

.insights-free-box {
  background: var(--soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.insights-free-title {
  font-size: 0.875rem;
  font-family: var(--font-ui, ui-serif, Georgia, serif);
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 3px;
  font-weight: 500;
}

.insights-free-title:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}
