/*
Theme Name: blog-medium
Theme URI: https://wp-blog.platformholder.site
Description: Medium 스타일 읽기 경험. Twenty Twenty-Five child theme. 설계서 §5.3.
Author: Kevin
Template: twentytwentyfive
Version: 2.0.0
Requires PHP: 8.0
Text Domain: blog-medium
*/

/* =============================================================================
   대부분의 스타일은 theme.json 에 있다 — 블록 테마에서는 그게 정본이고,
   **편집기와 프론트에 동시에 적용된다**는 점이 핵심이다. CSS 로만 잡으면
   Gutenberg 안에서는 다르게 보여서, 사용자가 검토·수정하는 화면(§3)과
   실제 발행물이 어긋난다.

   여기 남기는 것은 theme.json 이 표현하지 못하는 것뿐이다.
   ============================================================================= */

/* 한글 줄바꿈 — 어절 단위로 끊어야 읽힌다.
   theme.json 에는 word-break 대응 항목이 없다. */
.wp-block-post-content,
.entry-content,
.wp-block-post-excerpt {
  word-break: keep-all;
  overflow-wrap: break-word;
}

/* 본문 링크에 밑줄. 블록 테마 기본은 밑줄이 없어 본문 안에서 링크가 잘 안 보인다. */
.wp-block-post-content a:where(:not(.wp-element-button)) {
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

/* 코드 블록 가로 스크롤 — 긴 줄이 레이아웃을 밀어내지 않게.
   레이아웃이 밀리면 CLS 로 잡히고 그건 랭킹 신호다(§1.2). */
.wp-block-code, .wp-block-preformatted {
  overflow-x: auto;
  font-size: 0.82em;
  line-height: 1.6;
}

/* 표 — 넓은 표가 본문 폭을 넘길 때 스크롤로 흡수 */
.wp-block-table { overflow-x: auto; }
.wp-block-table table { font-size: 0.92em; }

/* 글 헤더 메타 — 발행일 + 읽기 시간 (functions.php 가 주입) */
.bm-postmeta {
  font-family: var(--wp--preset--font-family--ui);
  font-size: 0.875rem;
  opacity: 0.7;
  margin: 0.6rem 0 2rem;
}
.bm-readtime::before { content: " · "; }
