/* Blog: index, cards, post page. Uses tokens from site.css and home.css. */
.blog .top nav a[aria-current="page"] { color: var(--text); }

/* Index hero */
.blog-hero { text-align: center; padding-block: 48px 28px; max-width: 820px; }
.blog-hero .lead { color: var(--muted); font-size: 1.15rem; max-width: 46ch; margin-inline: auto; }
.blog-tools { display: grid; gap: 16px; justify-items: center; margin-top: 26px; }
.search { display: flex; align-items: center; gap: 10px; width: min(100%, 440px); background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 12px 18px; box-shadow: var(--shadow); color: var(--muted); }
.search input { border: 0; outline: 0; background: none; font: inherit; width: 100%; color: var(--text); }
.search:focus-within { border-color: var(--firefly); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.chip { display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 999px; background: var(--chip); border: 1px solid transparent; font: 800 .8rem Nunito, system-ui, sans-serif; color: var(--text); }
button.chip { cursor: pointer; padding: 8px 14px; font-size: .88rem; }
button.chip.on { background: var(--text); color: #fff; }

/* Cards */
.post-card { display: grid; grid-template-rows: auto 1fr; text-decoration: none; background: var(--surface); border: 1px solid var(--border); border-radius: 26px; overflow: hidden; box-shadow: var(--shadow); transition: transform .2s ease, box-shadow .2s ease; }
.post-card:hover { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(118, 91, 46, .16); }
.pc-art { background: radial-gradient(circle at 50% 60%, #fff 0%, var(--tint) 70%); aspect-ratio: 16 / 9; display: grid; place-items: center; overflow: hidden; }
.pc-art img { width: 46%; filter: drop-shadow(0 12px 20px rgba(0, 0, 0, .12)); transition: transform .3s ease; }
.post-card:hover .pc-art img { transform: scale(1.05) rotate(-2deg); }
.pc-body { padding: 20px 22px 22px; display: grid; gap: 8px; align-content: start; }
.pc-body h3 { margin: 4px 0 0; font-size: 1.2rem; line-height: 1.25; }
.pc-body p { color: var(--muted); margin: 0; font-size: .96rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pc-body .chip { justify-self: start; }
.meta { color: var(--muted); font-size: .85rem; display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.meta svg { width: 15px; height: 15px; margin-right: 4px; vertical-align: -2px; }
.post-card.big { grid-template-columns: 1.1fr 1fr; grid-template-rows: none; margin-bottom: 22px; }
.post-card.big .pc-art { aspect-ratio: auto; min-height: 300px; }
.post-card.big .pc-body { padding: 36px; align-content: center; }
.post-card.big h3 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.empty { text-align: center; color: var(--muted); padding: 30px 0; }
@media (max-width: 900px) { .post-grid { grid-template-columns: 1fr 1fr; } .post-card.big { grid-template-columns: 1fr; } .post-card.big .pc-art { min-height: 200px; } .post-card.big .pc-body { padding: 24px; } }
@media (max-width: 600px) { .post-grid { grid-template-columns: 1fr; } }

/* CTA card */
.cta-card { display: grid; grid-template-columns: 160px 1fr; gap: 28px; align-items: center; background: #141B2C; color: #fff; border-radius: 30px; padding: 32px 36px; }
.cta-card p { color: rgba(255, 255, 255, .72); }
.cta-card img { width: 160px; animation: float 4s ease-in-out infinite; }
.cta-card .btn.secondary { color: var(--text); }
@media (max-width: 640px) { .cta-card { grid-template-columns: 1fr; text-align: center; } .cta-card img { margin: 0 auto; width: 120px; } .cta-card .cta-row { justify-content: center; } }

/* Post */
.post-hero { padding-block: 26px 10px; }
.crumbs { display: flex; gap: 8px; color: var(--muted); font-size: .9rem; font-weight: 600; margin-bottom: 20px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.ph-grid { display: grid; grid-template-columns: 1fr 300px; gap: 40px; align-items: center; }
.post-hero h1 { font-size: clamp(2rem, 4.6vw, 3.1rem); margin: 14px 0 12px; text-wrap: balance; }
.post-hero .lead { color: var(--muted); font-size: 1.15rem; max-width: 52ch; }
.ph-art { aspect-ratio: 1; border-radius: 32px; background: radial-gradient(circle at 50% 55%, #fff 0%, var(--tint) 72%); display: grid; place-items: center; }
.ph-art img { width: 70%; animation: float 4s ease-in-out infinite; filter: drop-shadow(0 16px 26px rgba(0, 0, 0, .14)); }
@media (max-width: 820px) { .ph-grid { grid-template-columns: 1fr; } .ph-art { display: none; } }

.post-layout { display: grid; grid-template-columns: 230px minmax(0, 720px); gap: 56px; justify-content: center; padding-block: 28px 20px; }
.toc { position: sticky; top: 92px; align-self: start; font-size: .92rem; }
.toc p { font: 800 .8rem Nunito, system-ui, sans-serif; color: var(--muted); margin-bottom: 10px; letter-spacing: .02em; }
.toc ol { list-style: none; margin: 0; padding: 0 0 0 12px; border-left: 2px solid var(--border); display: grid; gap: 8px; }
.toc a { text-decoration: none; color: var(--muted); display: block; line-height: 1.35; }
.toc a:hover, .toc a.on { color: var(--text); }
.toc a.on { font-weight: 600; }
@media (max-width: 1000px) { .post-layout { grid-template-columns: minmax(0, 720px); } .toc { display: none; } }

.takeaways { background: #FFF6D6; border: 1px solid #F3DE8A; border-radius: 22px; padding: 20px 22px; margin-bottom: 28px; }
.tk-title { font: 900 1rem Nunito, system-ui, sans-serif; margin-bottom: 10px; }
.takeaways ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.takeaways li { display: flex; gap: 10px; align-items: flex-start; }
.takeaways svg { width: 18px; height: 18px; margin-top: 4px; stroke: #2E9E60; stroke-width: 2.6; flex: none; }

.prose { font-size: 1.08rem; line-height: 1.75; }
.prose h2 { font-size: 1.7rem; margin: 1.8em 0 .5em; scroll-margin-top: 90px; }
.prose h3 { font-size: 1.25rem; margin: 1.5em 0 .4em; scroll-margin-top: 90px; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.1em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .45em; }
.prose li::marker { color: #C79A12; font-weight: 800; }
.prose a { color: inherit; text-decoration: underline; text-decoration-color: var(--firefly); text-decoration-thickness: 3px; text-underline-offset: 3px; }
.prose strong { font-weight: 700; }
.prose blockquote { margin: 1.4em 0; padding: 16px 20px; border-left: 4px solid var(--firefly); background: var(--surface); border-radius: 0 16px 16px 0; color: var(--ink2); }
.prose blockquote p:last-child { margin: 0; }
.prose code { background: var(--chip); padding: 2px 6px; border-radius: 6px; font-size: .92em; }
.prose pre { background: #141B2C; color: #F2F4F8; padding: 18px 20px; border-radius: 16px; overflow-x: auto; font-size: .9rem; line-height: 1.6; }
.prose pre code { background: none; padding: 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: .96rem; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.prose th { font: 800 .9rem Nunito, system-ui, sans-serif; background: var(--chip); }
.prose hr { border: 0; height: 1px; background: var(--border); margin: 2em 0; }
.prose img { border-radius: 16px; }

.faq-block { margin-top: 36px; }
.faq-block h2 { font-size: 1.6rem; margin-bottom: 16px; scroll-margin-top: 90px; }

.inline-cta { display: grid; grid-template-columns: 110px 1fr; gap: 20px; align-items: center; margin-top: 36px; padding: 22px; border-radius: 24px; background: var(--surface); border: 2px solid var(--firefly); }
.inline-cta img { width: 110px; }
.ic-title { font: 900 1.25rem Nunito, system-ui, sans-serif; margin-bottom: 4px; }
.inline-cta p { color: var(--muted); }
@media (max-width: 560px) { .inline-cta { grid-template-columns: 1fr; text-align: center; } .inline-cta img { margin: 0 auto; width: 90px; } }

.related h2 { text-align: center; margin-bottom: 24px; }

/* Language switcher */
.langs { position: relative; }
.langs summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; color: var(--muted); font-weight: 600; font-size: 15px; padding: 6px 4px; }
.langs summary::-webkit-details-marker { display: none; }
.langs summary svg { width: 18px; height: 18px; }
.langs[open] summary, .langs summary:hover { color: var(--text); }
.langs ul { position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; list-style: none; margin: 0; padding: 6px; min-width: 160px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 14px 34px rgba(30, 34, 48, .14); }
.langs li a { display: block; padding: 8px 12px; border-radius: 10px; text-decoration: none; color: var(--text); font-weight: 600; }
.langs li a:hover { background: var(--chip); }
.langs li a[aria-current] { background: rgba(247, 212, 76, .35); }
@media (max-width: 640px) { .top nav .langs { display: block; } }

/* Japanese and Korean: native fonts after the Latin ones. */
.lang-ja { font-family: Inter, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", system-ui, sans-serif; }
.lang-ko { font-family: Inter, "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif; }
.lang-ja h1, .lang-ja h2, .lang-ja h3 { font-family: Nunito, "Hiragino Sans", "Noto Sans JP", sans-serif; letter-spacing: 0; }
.lang-ko h1, .lang-ko h2, .lang-ko h3 { font-family: Nunito, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif; letter-spacing: 0; }
.lang-ja .prose, .lang-ko .prose { line-height: 1.9; }
