/* ============================================================
   Field Notes — theme styles
   Klim "Family" Medium = headings · FreightText Medium = body
   Palette matched to steveschlafman.com (paper / charcoal / forest green)
   ============================================================ */

@font-face {
    font-family: "Family";
    src: url("../fonts/family-medium.woff2") format("woff2");
    font-weight: 400 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "FreightText";
    src: url("../fonts/FreightText-Medium.woff2") format("woff2");
    font-weight: 400 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --paper: #f0eee8;
    --ink:   #2c2b27;
    --muted: #6f6b62;
    --green: #41562a;
    --rule:  #d9d5cb;
}

* { box-sizing: border-box; }

html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-y: scroll; }

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: "FreightText", Georgia, "Times New Roman", serif;
    font-size: 20px;
    line-height: 1.62;
}

.reading-bar { position: fixed; top: 0; left: 0; height: 4px; width: 0; background: linear-gradient(90deg, #355b3b, #6f9a3c, #c9a23f); background-size: 100vw 100%; z-index: 200; }

.wrap { max-width: 680px; margin: 0 auto; padding: 0 24px; }

a { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--green); }

/* ---------- Site header ---------- */
.site-head { border-bottom: none; }
.site-head-inner {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 20px; flex-wrap: wrap; padding-top: 22px; padding-bottom: 22px;
}
.site-brand {
    font-family: "Family", Georgia, serif;
    font-size: 23px; letter-spacing: .2px; text-decoration: none; color: var(--ink);
}
.site-nav .nav { list-style: none; margin: 0; padding: 0; display: flex; gap: 22px; }
.site-nav .nav a { font-size: 20px; text-decoration: none; color: var(--ink); opacity: 1; }
.site-nav .nav a:visited { color: var(--ink); }
.site-nav .nav a:hover { opacity: 1; color: var(--green); }

/* ---------- Masthead (home) ---------- */
.masthead { text-align: left; padding: 60px 0 32px; }
.masthead-title {
    font-family: "Family", Georgia, serif; font-weight: 500;
    font-size: 42px; line-height: 1.06; margin: 0 0 14px; letter-spacing: .2px;
}
.masthead-desc {
    font-size: 23px; color: #55524c; font-style: normal;
    margin: 0; max-width: 34em;
}

/* ---------- Post feed (home) ---------- */
.section-label {
    font-family: "Family", Georgia, serif; font-size: 13px;
    letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
    border-bottom: 1px solid var(--rule); padding-bottom: 10px; margin: 16px 0 6px;
}
.post-card { border-bottom: 1px solid var(--rule); }
.post-feed .post-card:first-child { border-top: 1px solid var(--rule); }
.post-card-link { display: block; text-decoration: none; color: inherit; padding: 20px 0; }
.post-card-link:hover .post-card-title { color: var(--green); }
.post-card-title { font-family: "Family", Georgia, serif; font-weight: 500; font-size: 25px; line-height: 1.2; margin: 0 0 4px; }
.post-card-date { font-size: 14px; color: var(--muted); letter-spacing: .02em; }
.post-card-excerpt { margin: 8px 0 0; color: var(--muted); font-size: 17px; }

/* ---------- Single post ---------- */
.post { padding: 56px 24px 40px; }
.post-header { text-align: left; margin-bottom: 36px; }
.post-date { font-size: 16px; color: #6f6a62; letter-spacing: .03em; display: block; margin-bottom: 12px; }
.post-title {
    font-family: "Family", Georgia, serif; font-weight: 500;
    font-size: 34px; line-height: 1.14; margin: 0; max-width: 18em;
}

.post-content > * { margin: 0 0 1.25em; }
.post-content p { margin: 0 0 1.25em; }
.post-content em { font-style: italic; }
.post-content strong { font-weight: 700; }
.post-content a { color: var(--green); }
.post-content h2, .post-content h3 {
    font-family: "Family", Georgia, serif; font-weight: 500; line-height: 1.2;
    margin: 1.8em 0 .5em;
}
.post-content h2 { font-size: 30px; }
.post-content h3 { font-size: 24px; }
.post-content blockquote {
    margin: 1.5em 0; padding: 4px 0 4px 24px;
    border-left: 3px solid var(--green); color: var(--muted); font-style: italic;
}
.post-content ul, .post-content ol { margin: 0 0 1.25em; padding-left: 1.4em; }
.post-content li { margin-bottom: .4em; }
.post-content img { max-width: 100%; height: auto; border-radius: 3px; margin: 1.5em 0; }
.post-content figcaption { text-align: center; font-size: 15px; color: var(--muted); margin-top: 8px; }
.post-content hr { border: none; border-top: 1px solid var(--rule); margin: 2.5em 0; }

/* ---------- Subscribe CTA + footer ---------- */
.subscribe-btn {
    display: inline-block; background: var(--green); color: #f4f2ec;
    font-family: "Family", Georgia, serif; font-size: 16px;
    padding: 11px 22px; border-radius: 3px; text-decoration: none;
}
.subscribe-btn:hover { color: #fff; opacity: .94; }

.post-cta {
    text-align: center; padding: 30px 24px 56px; border-top: 1px solid var(--rule);
}
.post-cta p { color: var(--muted); margin: 0 0 14px; }

.site-foot { border-top: 1px solid var(--rule); margin-top: 40px; }
.site-foot .wrap { padding: 36px 24px 60px; text-align: center; }
.foot-line { color: var(--muted); margin: 0 0 14px; }
.copyright { color: var(--muted); font-size: 14px; margin: 22px 0 0; }

/* ---------- Pagination ---------- */
.pagination { display: flex; justify-content: space-between; align-items: center; margin: 40px 0; font-size: 16px; }
.pagination a { color: var(--green); text-decoration: none; }
.pagination .page-number { color: var(--muted); }

/* ---------- Ghost editor (Koenig) cards — images, embeds, galleries, bookmarks ---------- */
.kg-card { margin: 1.8em 0; }
.post-content img, .kg-image { max-width: 100%; height: auto; border-radius: 3px; }
.kg-width-wide { position: relative; width: min(92vw, 1020px); left: 50%; transform: translateX(-50%); max-width: none; }
.kg-width-full { position: relative; width: 100vw; left: 50%; transform: translateX(-50%); max-width: none; }
.kg-width-full img { width: 100%; }
.kg-embed-card, .kg-gallery-card, .kg-video-card, .kg-audio-card { margin: 1.8em 0; }
.kg-embed-card iframe, iframe { max-width: 100%; }
.kg-gallery-container { display: flex; flex-direction: column; gap: 10px; }
.kg-gallery-row { display: flex; gap: 10px; }
.kg-gallery-image img { width: 100%; height: 100%; object-fit: cover; }
figure.kg-card figcaption { text-align: center; font-size: 14px; color: var(--muted); margin-top: 8px; }
.kg-bookmark-card .kg-bookmark-container { display: flex; text-decoration: none; border: 1px solid var(--rule); border-radius: 4px; overflow: hidden; color: inherit; }
.kg-bookmark-content { padding: 18px 20px; flex: 1; }
.kg-bookmark-title { font-family: "Family", Georgia, serif; }
.kg-bookmark-description { color: var(--muted); font-size: 15px; margin-top: 4px; }
.kg-bookmark-thumbnail img { width: 100%; height: 100%; object-fit: cover; }
.kg-callout-card { padding: 16px 20px; border-radius: 4px; background: #e7e4dc; margin: 1.8em 0; }
.kg-callout-card.kg-callout-card-grey { background: #e7e4dc; }
.kg-button-card { text-align: center; }
.kg-btn { background: var(--green); color: #f4f2ec; text-decoration: none; font-family: "Family", Georgia, serif; padding: 11px 24px; border-radius: 4px; display: inline-block; }
.kg-toggle-card { border-bottom: 1px solid var(--rule); padding: 12px 0; }

/* ---------- Topics page ---------- */
.topics-list { padding: 20px 24px 50px; }
.topic-row {
    display: flex; justify-content: space-between; align-items: baseline;
    text-decoration: none; color: inherit; padding: 16px 0; border-bottom: 1px solid var(--rule);
}
.topic-row:hover .topic-name { color: var(--green); }
.topic-name { font-family: "Family", Georgia, serif; font-size: 23px; }
.topic-count { color: var(--muted); font-size: 14px; }
.topics-empty { color: var(--muted); font-style: italic; padding: 20px 0; }

/* ---------- Archive (full compact index) ---------- */
.archive-list { padding: 8px 24px 40px; }
.archive-row { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; text-decoration: none; color: inherit; padding: 15px 0; border-bottom: 1px solid var(--rule); }
.archive-row:first-child { border-top: 1px solid var(--rule); }
.archive-row:hover .archive-title { color: var(--green); }
.archive-title { font-family: "Family", Georgia, serif; font-size: 21px; line-height: 1.3; }
.archive-date { color: var(--muted); font-size: 14px; white-space: nowrap; }

/* homepage "All posts ->" */
.feed-more { margin-top: 30px; }
.all-posts-link { font-family: "Family", Georgia, serif; color: var(--green); text-decoration: none; font-size: 18px; }
.all-posts-link:hover { text-decoration: underline; }

/* ---------- Mobile ---------- */
@media (max-width: 600px) {
    body { font-size: 19px; }
    .masthead { padding: 44px 0 28px; }
    .masthead-title { font-size: 32px; }
    .post-title { font-size: 28px; }
    .error-title { font-size: 30px; }
    .post { padding: 40px 24px 32px; }
    .site-head-inner { gap: 12px; }
    .site-nav .nav { gap: 16px; }
}

/* ===================================================================
   FINAL — approved design (palette, full-width header, components)
   =================================================================== */
:root { --paper:#f7f6f2; --ink:#333333; --green:#355b3b; --muted:#83817c; --rule:#dad7d0; }
body {
    background-color:#f7f6f2;
    background-image:url("../background.jpg");
    background-size:cover; background-attachment:fixed; background-position:center top;
    font-size:22px; overflow-x:hidden;
}

/* full-width header, logo far left like steveschlafman.com */
.site-head-inner { display:flex; align-items:center; justify-content:space-between; max-width:1280px; margin:0 auto; padding:20px 44px; gap:20px; flex-wrap:wrap; }
.brand-logo { height:46px; width:auto; display:block; }
.site-nav .nav { display:flex; align-items:center; gap:24px; list-style:none; margin:0; padding:0; }
.nav-link { font-size:22px; color:var(--ink); text-decoration:none; opacity:.85; }
.nav-link:hover { color:var(--green); opacity:1; }
.nav-subscribe { display:inline-block; background:var(--green); color:#f4f2ec; font-family:"Family",Georgia,serif; font-size:14px; text-decoration:none; padding:9px 18px; border-radius:6px; }
.nav-subscribe:hover { background:#4f7a55; color:#f4f2ec; }
/* win over the more-specific `.site-nav .nav a` charcoal color */
.site-nav .nav a.nav-subscribe, .site-nav .nav a.nav-subscribe:hover { color:#f4f2ec; }

/* post-card excerpt */
.post-card-excerpt { margin:8px 0 0; color:var(--muted); font-size:17px; }

/* end-of-post: quiet email invite */
.post-cta { text-align:center; padding:52px 24px 12px; border-top:1px solid var(--rule); }
.cta-line { font-size:19px; color:var(--ink); margin:0 0 18px; }
.cta-email-btn { display:inline-block; background:var(--green); color:#f4f2ec; border:none; font-family:"Family",Georgia,serif; font-size:16px; text-decoration:none; padding:12px 26px; border-radius:6px; }
.cta-email-btn:hover { background:#4f7a55; color:#f4f2ec; }

/* newer / older */
.post-nav { display:flex; justify-content:space-between; gap:24px; padding:10px 24px 24px; }
.post-nav:empty { display:none; }
.post-nav a { text-decoration:none; color:var(--green); font-size:18px; }
.post-nav .pn-next { margin-left:auto; text-align:right; }
.post-nav a:hover { filter:brightness(1.1); }
.post-topics-line { color:var(--muted); font-size:14px; margin-top:30px; }
.post-topic { color:var(--green); text-decoration:underline; text-underline-offset:3px; margin-right:12px; }

/* on-page subscribe block (branded — replaces the Ghost Portal popup) */
.subscribe-block { border-top:1px solid var(--rule); margin-top:40px; }
.subscribe-inner { padding:48px 24px 8px; text-align:center; }
.subscribe-title { font-family:"Family",Georgia,serif; font-weight:500; font-size:28px; color:var(--ink); margin:0 0 8px; }
.subscribe-sub { color:var(--muted); font-size:16px; margin:0 0 22px; }
.subscribe-form { display:block; max-width:440px; margin:0 auto; }
.subscribe-input { display:block; width:100%; box-sizing:border-box; padding:13px 14px; margin:0 0 12px; border:1px solid var(--rule); border-radius:5px; background:#fff; font-family:"FreightText",Georgia,serif; font-size:16px; color:var(--ink); }
.subscribe-input:focus { outline:none; border-color:var(--green); }
.subscribe-btn { display:block; width:100%; background:var(--green); color:#f4f2ec; border:none; font-family:"Family",Georgia,serif; font-size:16px; padding:13px 26px; border-radius:6px; cursor:pointer; margin-top:4px; }
.subscribe-btn:hover { background:#4f7a55; }
.subscribe-msg { font-size:18px; margin:16px 0 0; display:none; }
.subscribe-msg-success { color:var(--green); }
.subscribe-msg-error { color:#a33; }
.subscribe-form.success .subscribe-msg-success { display:block; }
.subscribe-form.error .subscribe-msg-error { display:block; }
.subscribe-form.success .subscribe-input,
.subscribe-form.success .subscribe-btn { display:none; }

/* 404 error page (mirrors steveschlafman.com/404) */
.error-page { max-width:820px; padding:64px 24px 100px; text-align:center; }
.error-trees { display:flex; justify-content:center; align-items:flex-end; gap:10px; margin:0 auto 34px; max-width:100%; }
.error-trees img { width:210px; max-width:30%; height:auto; display:block; }
.error-title { font-family:"Family",Georgia,serif; font-weight:500; font-size:44px; line-height:1.2; color:var(--ink); margin:0 0 22px; }
.error-text { font-family:"FreightText",Georgia,serif; font-size:22px; line-height:1.55; color:var(--ink); margin:0 auto 34px; max-width:740px; }
.error-btn { display:inline-block; background:var(--green); color:#f4f2ec; font-family:"Family",Georgia,serif; font-size:16px; text-decoration:none; padding:13px 30px; border-radius:6px; }
.error-btn:hover { background:#4f7a55; color:#f4f2ec; }

/* footer socials */
.site-foot { border-top:1px solid var(--rule); margin-top:40px; }
.site-foot .wrap { padding:36px 24px 60px; text-align:center; }
.social { display:flex; gap:22px; justify-content:center; margin-bottom:20px; }
.social a { color:var(--muted); display:inline-flex; }
.social a:hover { color:var(--green); }
.made-with { color:var(--muted); font-size:15px; margin:0 0 8px; }
.copyright { color:var(--muted); font-size:14px; margin:0; }

@media (max-width:600px){
    .site-head-inner { padding:16px 20px; }
    .brand-logo { height:42px; }
    body { font-size:20px; }
}

