/* Food and Climate — 블로그(note CPT) 전용 스타일
 *
 * /blog/ 영역에서만 로드된다(functions.php: foodandclimate_enqueue_blog_styles).
 * 사이트 아티클과 눈으로 구분되어야 하는 영역이라 배경·여백·본문 리듬을 따로 잡는다.
 *   - 종이: 크림 배경 위가 아니라 흰 종이(surface-container-lowest)
 *   - 폭  : 740px (리포트 780px 보다 좁게 — 읽기 중심)
 *   - 리듬: 본문 1.13rem / 행간 1.95 — 사이트 본문보다 느슨하게
 * prose.css 는 post 전용이라 여기 실리지 않는다. 본문 타이포는 이 파일이 소유한다.
 */

/* ─────────── 공통 지면 ─────────── */

.fnc-note,
.fnc-note-archive {
    --note-paper: var(--wp--preset--color--surface-container-lowest, #fffdf8);
    --note-ink: var(--wp--preset--color--on-surface, #18220f);
    --note-ink-soft: var(--wp--preset--color--on-surface-variant, #4c5646);
    --note-rule: var(--wp--preset--color--outline-variant, #cdd0bd);
    --note-accent: var(--wp--preset--color--primary, #2b7735);
    --note-measure: 740px;

    background: var(--note-paper);
    color: var(--note-ink);
}

.fnc-note-shell,
.fnc-note-list-shell {
    padding: 0 20px;
}

/* ─────────── 글 — 커버 ─────────── */

.fnc-note-cover.wp-block-post-featured-image {
    margin: 0 0 clamp(2rem, 5vw, 3.5rem);
}

.fnc-note-cover.wp-block-post-featured-image img {
    width: 100%;
    height: clamp(220px, 38vw, 420px);
    object-fit: cover;
    display: block;
}

/* ─────────── 글 — 머리 ─────────── */

.fnc-note-head {
    padding-top: clamp(2.5rem, 6vw, 4.5rem);
}

.fnc-note .fnc-note-cover.wp-block-post-featured-image + .fnc-note-shell .fnc-note-head {
    padding-top: 0;
}

.fnc-note-topic {
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--note-accent);
    margin: 0 0 0.9rem;
}

.fnc-note-topic a {
    color: inherit;
    text-decoration: none;
}

.fnc-note-topic a:hover {
    text-decoration: underline;
}

.fnc-note-title.wp-block-post-title {
    font-size: clamp(1.85rem, 4.6vw, 2.5rem);
    line-height: 1.32;
    letter-spacing: -0.02em;
    font-weight: 700;
    margin: 0;
    color: var(--note-ink);
    word-break: keep-all;
}

.fnc-note-sub {
    font-size: 1.06rem;
    line-height: 1.6;
    color: var(--note-ink-soft);
    margin: 0.9rem 0 0;
    word-break: keep-all;
}

.fnc-note-byline {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.8rem 0 0;
    padding-bottom: 1.8rem;
    border-bottom: 1px solid var(--note-rule);
}

.fnc-note-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center 22%;
    flex: 0 0 auto;
}

.fnc-note-byline-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.fnc-note-byline-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--note-ink);
}

.fnc-note-byline-meta {
    font-size: 0.8125rem;
    color: var(--note-ink-soft);
}

.fnc-note-byline-meta .sep {
    margin: 0 0.4rem;
}

/* ─────────── 글 — 본문 ─────────── */

.fnc-note-body {
    letter-spacing: -0.003em;
    color: var(--note-ink);
    padding: 2.6rem 0 0;
    word-break: keep-all;
}

/* 본문 리듬은 블로그가 소유한다 — 이 !important 를 지우지 말 것.
   style.css 의 `.single .entry-content p, .single .wp-block-post-content p` 가
   **!important 로** 1.0625rem/1.8 을 건다. note 에도 body.single 이 붙으므로
   사이트 글의 리듬이 그대로 블로그로 새어 들어온다. 특이도를 올려도 소용없고
   (상대가 !important 다) 공용 규칙에서 note 를 빼는 쪽은 발행글 전체를 건드린다.
   그래서 블로그 범위 안에서만 !important 로 되받는다.
   2026-08-26 까지 블로그 본문이 사이트 글과 똑같은 크기로 나가고 있었다. */
.fnc-note .fnc-note-body,
.fnc-note .fnc-note-body p,
.fnc-note .fnc-note-body li {
    font-size: 1.13rem !important;
    line-height: 1.95 !important;
}

.fnc-note-body > * {
    margin-top: 0;
    margin-bottom: 1.7rem;
}

.fnc-note-body > *:last-child {
    margin-bottom: 0;
}

.fnc-note-body h2 {
    font-size: 1.45rem;
    line-height: 1.45;
    font-weight: 700;
    letter-spacing: -0.015em;
    margin-top: 3.2rem;
    margin-bottom: 1.1rem;
}

.fnc-note-body h3 {
    font-size: 1.16rem;
    line-height: 1.5;
    font-weight: 700;
    margin-top: 2.4rem;
    margin-bottom: 0.9rem;
}

.fnc-note-body a {
    color: var(--note-accent);
    text-decoration: underline;
    text-underline-offset: 0.18em;
    text-decoration-thickness: 1px;
}

.fnc-note-body a:hover {
    text-decoration-thickness: 2px;
}

.fnc-note-body strong {
    font-weight: 700;
}

.fnc-note-body ul,
.fnc-note-body ol {
    padding-left: 1.3rem;
}

.fnc-note-body li {
    margin-bottom: 0.6rem;
}

.fnc-note-body li:last-child {
    margin-bottom: 0;
}

.fnc-note-body blockquote {
    margin-left: 0;
    margin-right: 0;
    padding: 0.2rem 0 0.2rem 1.25rem;
    border-left: 3px solid var(--note-accent);
    color: var(--note-ink-soft);
}

.fnc-note-body blockquote p:last-child {
    margin-bottom: 0;
}

.fnc-note-body hr {
    border: 0;
    height: 1px;
    background: var(--note-rule);
    margin: 3rem auto;
    width: 40%;
}

.fnc-note-body img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

.fnc-note-body figure {
    margin: 2.4rem 0;
}

.fnc-note-body figcaption {
    font-size: 0.84rem;
    line-height: 1.6;
    color: var(--note-ink-soft);
    margin-top: 0.6rem;
    text-align: center;
}

.fnc-note-body code {
    font-size: 0.92em;
    background: var(--wp--preset--color--surface-container, #ece8db);
    padding: 0.1em 0.35em;
    border-radius: 3px;
}

.fnc-note-body table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    line-height: 1.6;
}

.fnc-note-body th,
.fnc-note-body td {
    border-bottom: 1px solid var(--note-rule);
    padding: 0.55rem 0.6rem;
    text-align: left;
}

.fnc-note-body th {
    font-weight: 600;
    color: var(--note-ink-soft);
}

/* 본문 안 「함께 읽기」 — 홈페이지 글로 넘기는 카드 */
.fnc-note-related {
    margin: 2.6rem 0;
    padding: 1.1rem 1.25rem;
    border: 1px solid var(--note-rule);
    border-radius: 8px;
    background: var(--wp--preset--color--surface-container-low, #f3f0e6);
}

.fnc-note-related-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--note-ink-soft);
    margin-bottom: 0.55rem;
}

.fnc-note-related ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.fnc-note-related li + li {
    margin-top: 0.4rem;
}

.fnc-note .fnc-note-related a {
    font-size: 0.98rem;
    line-height: 1.55;
    color: var(--note-ink);
    text-decoration: none;
    font-weight: 600;
}

.fnc-note-related a:hover {
    color: var(--note-accent);
    text-decoration: underline;
}

/* 근거 — 외부 1차 출처. 「함께 읽기」가 상자라면 이쪽은 실선 위 목록이다.
   독자가 하는 행동이 다르다 — 앞은 더 읽고, 뒤는 확인한다. */
.fnc-note-sources {
    display: block;
    margin: 2.8rem 0 0;
    padding-top: 1.1rem;
    border-top: 1px solid var(--note-rule);
}

.fnc-note-sources-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--note-ink-soft);
    margin-bottom: 0.7rem;
}

.fnc-note-sources ol {
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: src;
}

.fnc-note .fnc-note-sources li {
    counter-increment: src;
    position: relative;
    padding-left: 1.6rem;
    margin: 0 0 0.55rem;
    font-size: 0.84rem !important;
    line-height: 1.65 !important;
    color: var(--note-ink-soft);
    word-break: keep-all;
    overflow-wrap: anywhere;
}

.fnc-note .fnc-note-sources li::before {
    content: counter(src);
    position: absolute;
    left: 0;
    top: 0.1rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--note-rule);
}

.fnc-note .fnc-note-sources li:last-child {
    margin-bottom: 0;
}

.fnc-note-sources .claim {
    color: var(--note-ink);
    font-weight: 600;
}

.fnc-note-sources a {
    color: var(--note-ink-soft);
    text-decoration: underline;
    text-underline-offset: 0.15em;
    text-decoration-color: var(--note-rule);
}

.fnc-note-sources a:hover {
    color: var(--note-accent);
    text-decoration-color: currentColor;
}

/* ─────────── 글 — 꼬리 ─────────── */

.fnc-note-stance {
    margin: 3.2rem 0 0;
    padding: 0.75rem 0 0.75rem 1rem;
    border-left: 2px solid var(--note-rule);
    font-size: 0.86rem;
    line-height: 1.7;
    color: var(--note-ink-soft);
}

.fnc-note-profile {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin: 2.2rem 0 0;
    padding: 1.4rem;
    border: 1px solid var(--note-rule);
    border-radius: 10px;
}

.fnc-note-profile-photo {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center 22%;
    flex: 0 0 auto;
}

.fnc-note-profile-text {
    min-width: 0;
}

.fnc-note-profile-name {
    margin: 0 0 0.35rem;
    font-size: 1rem;
    font-weight: 700;
}

.fnc-note-profile-role {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--note-ink-soft);
    margin-top: 0.15rem;
}

.fnc-note-profile-bio {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--note-ink-soft);
    word-break: keep-all;
}

/* 글 아래 한 줄 — 목록 링크와 이웃 글이 같은 행에 선다. 상자 없이 실선 하나.
   이웃 글이 없으면 core 가 빈 <div> 를 남기므로 감추고, 둘 다 비면 행이
   백링크만 남는다(줄 자체는 유지 — 목록으로 돌아갈 길은 항상 있어야 한다). */
.fnc-note-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem 1.6rem;
    margin: 3rem 0 clamp(3rem, 7vw, 5rem);
    padding-top: 1.2rem;
    border-top: 1px solid var(--note-rule);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* core 의 flow 레이아웃이 두 번째 자식에 margin-block-start:24px 를 건다 —
   행으로 세운 뒤에는 이 값이 이웃 글만 한 줄 아래로 밀어 내린다. */
.fnc-note-foot > * {
    margin-block: 0;
}

.fnc-note-foot .wp-block-post-navigation-link:empty {
    display: none;
}

.fnc-note-foot .fnc-note-backlink {
    margin: 0;
    margin-right: auto;
}

.fnc-note-foot .wp-block-post-navigation-link {
    min-width: 0;
}

.fnc-note-foot .post-navigation-link__label {
    color: var(--note-ink-soft);
    margin-right: 0.35rem;
}

.fnc-note-foot .post-navigation-link__label::after {
    content: " ·";
}

.fnc-note-foot a {
    color: var(--note-ink);
    text-decoration: none;
    font-weight: 600;
}

.fnc-note-foot .fnc-note-backlink a {
    color: var(--note-ink-soft);
    font-weight: 500;
}

.fnc-note-foot a:hover {
    color: var(--note-accent);
    text-decoration: underline;
}

/* ─────────── 목록 — 프로필 커버 ─────────── */

.fnc-note-cover {
    border-bottom: 1px solid var(--note-rule);
    padding: clamp(2.6rem, 6vw, 4.5rem) 20px clamp(2rem, 4vw, 3rem);
    text-align: center;
}

.fnc-note-cover-inner {
    max-width: 620px;
    margin: 0 auto;
}

.fnc-note-cover-photo {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center 22%;
    margin: 0 auto 1.2rem;
    display: block;
}

.fnc-note-cover-title {
    font-size: clamp(1.6rem, 4vw, 2.1rem);
    line-height: 1.3;
    letter-spacing: -0.02em;
    font-weight: 700;
    margin: 0;
}

.fnc-note-cover-role {
    margin: 0.5rem 0 0;
    font-size: 0.92rem;
    color: var(--note-ink-soft);
}

.fnc-note-cover-bio {
    margin: 1.1rem 0 0;
    font-size: 0.98rem;
    line-height: 1.75;
    color: var(--note-ink-soft);
    word-break: keep-all;
}

.fnc-note-cover-count {
    margin: 1.2rem 0 0;
    font-size: 0.8125rem;
    letter-spacing: 0.03em;
    color: var(--note-ink-soft);
}

.fnc-note-cover--topic {
    text-align: left;
}

.fnc-note-cover--topic .fnc-note-cover-inner {
    max-width: 760px;
}

.fnc-note-cover-eyebrow {
    margin: 0 0 0.6rem;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.fnc-note-cover-eyebrow a {
    color: var(--note-accent);
    text-decoration: none;
}

.fnc-note-cover-eyebrow a:hover {
    text-decoration: underline;
}

/* ─────────── 목록 — 주제 필터 ─────────── */

.fnc-note-topics {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 1.8rem 0 1.4rem;
    scrollbar-width: none;
}

.fnc-note-topics::-webkit-scrollbar {
    display: none;
}

.fnc-note-topics a {
    flex: 0 0 auto;
    padding: 0.4rem 0.9rem;
    border: 1px solid var(--note-rule);
    border-radius: 999px;
    font-size: 0.86rem;
    font-weight: 500;
    color: var(--note-ink-soft);
    text-decoration: none;
    white-space: nowrap;
}

.fnc-note-topics a:hover {
    border-color: var(--note-accent);
    color: var(--note-accent);
}

.fnc-note-topics a[aria-current="page"] {
    background: var(--note-accent);
    border-color: var(--note-accent);
    color: var(--wp--preset--color--on-primary, #fff);
}

/* ─────────── 목록 — 카드 ─────────── */

.fnc-note-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.fnc-note-list > li {
    border-bottom: 1px solid var(--note-rule);
}

.fnc-note-card {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1.9rem 0;
}

.fnc-note-card-text {
    min-width: 0;
    flex: 1 1 auto;
}

.fnc-note-card-title.wp-block-post-title {
    font-size: 1.22rem;
    line-height: 1.45;
    font-weight: 700;
    letter-spacing: -0.015em;
    margin: 0;
    word-break: keep-all;
}

.fnc-note-card-title a {
    color: var(--note-ink);
    text-decoration: none;
}

.fnc-note-card-title a:hover {
    color: var(--note-accent);
}

.fnc-note-card-sub {
    margin: 0.4rem 0 0;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--note-ink-soft);
    word-break: keep-all;
}

.fnc-note-card-excerpt {
    margin: 0.55rem 0 0;
    font-size: 0.93rem;
    line-height: 1.75;
    color: var(--note-ink-soft);
    word-break: keep-all;
}

.fnc-note-card-excerpt p {
    margin: 0;
}

.fnc-note-card-excerpt .wp-block-post-excerpt__more-text {
    display: none;
}

.fnc-note-card-meta {
    margin: 0.8rem 0 0;
    font-size: 0.8rem;
    color: var(--note-ink-soft);
}

.fnc-note-card-meta .sep {
    margin: 0 0.4rem;
}

.fnc-note-card-meta a {
    color: inherit;
    text-decoration: none;
}

.fnc-note-card-meta a:hover {
    color: var(--note-accent);
    text-decoration: underline;
}

.fnc-note-card-thumb {
    flex: 0 0 auto;
    margin: 0;
}

.fnc-note-card-thumb img {
    width: 128px;
    height: 128px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}

.fnc-note-empty {
    padding: 3rem 0;
    color: var(--note-ink-soft);
    text-align: center;
}

.fnc-note-pagination {
    padding: 2.6rem 0 clamp(3rem, 7vw, 5rem);
    font-size: 0.92rem;
}

.fnc-note-pagination a,
.fnc-note-pagination .page-numbers {
    color: var(--note-ink-soft);
    text-decoration: none;
    padding: 0.25rem 0.5rem;
}

.fnc-note-pagination a:hover {
    color: var(--note-accent);
}

.fnc-note-pagination .current {
    color: var(--note-ink);
    font-weight: 700;
}

/* ─────────── 좁은 화면 ─────────── */

@media (max-width: 640px) {
    .fnc-note-card {
        gap: 1rem;
        padding: 1.5rem 0;
    }

    .fnc-note-card-thumb img {
        width: 84px;
        height: 84px;
    }

    /* 좁은 화면에서는 한 행이 두 줄로 접힌다 — 백링크가 먼저, 이웃 글이 아래. */
    .fnc-note-foot {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.7rem;
    }

    .fnc-note-foot .fnc-note-backlink {
        margin-right: 0;
    }

    .fnc-note-profile {
        flex-direction: column;
        gap: 0.9rem;
    }

    .fnc-note-body {
        font-size: 1.07rem;
        line-height: 1.9;
    }
}
