/* ============================================================
 * v3-blog.css — finishing layer for /blog/* (loaded after v3-site.css)
 * Scope: the 11 pages under /blog/ only. Tokens come from v3-site.css.
 * Nothing here changes copy; it only fixes spacing and heading wraps
 * that the shared layer could not reach on these templates.
 * Spacing rules are screen-only so v3-site.css's print block keeps control.
 * ============================================================ */

@media screen {
  /* 1. First block after the page head.
        The article templates carry inline style="padding-top:0" on this section,
        which beats v3-site.css (.tk-hero + .section { padding-top: 48px }).
        Result was 40px (1512) / 28px (390) between the hero answer box and the
        next section label. Restore the intended value. */
  body.v3-site .tk-hero + .section { padding-top: 48px !important; }

  /* 2. Two plain (dark) sections in a row have no tone change to separate them
        (eigo-kaigi-hanasenai: 5. → WHERE TO START). Keep the same rhythm but
        draw a hairline at the boundary, aligned with the text column. */
  body.v3-site main > .section:not(.soft):not(.tk-hero) + .section:not(.soft):not(.tk-hero) { padding-top: 0; }
  body.v3-site main > .section:not(.soft):not(.tk-hero) + .section:not(.soft):not(.tk-hero) > .wrap::before {
    content: "";
    display: block;
    border-top: 1px solid var(--v3-rule);
    margin-bottom: 104px;
  }
}
@media screen and (max-width: 720px) {
  body.v3-site main > .section:not(.soft):not(.tk-hero) + .section:not(.soft):not(.tk-hero) > .wrap::before { margin-bottom: 72px; }
}

/* 3. A section that opens with the small "関連リンク" label: its 56px top margin
      stacked on the section padding (160px of empty ground). */
body.v3-site .section > .wrap > .free-h:first-child { margin-top: 0; }

/* 4. Headings: avoid a single character left alone on the last line
      (例: 「…答える材料がな / い」「…分け / る」). "pretty" only re-breaks the
      tail, so line lengths stay close to the original (balance halved them). */
body.v3-site main :is(h1, h2),
body.v3-site .band h2 { text-wrap: pretty; }
