/* modscode.com/ja/blog: what the Japanese blog adds to site.css. Loaded after it, on these pages only,
   so the shared stylesheet (and with it every English page's ?v= hash) stays as it was.
   Colours come from site.css's tokens, so the dark theme needs no block of its own. */

/* Reading Japanese: a looser line, kinsoku, and breaks at phrase boundaries where the browser can
   (word-break: auto-phrase is Chrome 119+; elsewhere it is ignored and the text breaks as usual). */
.title h1, .title .lead, .plist b, .plist span { line-break: strict; word-break: auto-phrase; }
.post .prose { font-size: 16px; line-height: 1.95; letter-spacing: 0.02em; line-break: strict; word-break: auto-phrase; overflow-wrap: anywhere; }
.post .prose.narrow { max-width: 780px; }
.post .prose h2 { font-size: 24px; line-height: 1.5; margin-top: 52px; }
.post .prose h3 { font-size: 18px; margin: 30px 0 8px; padding-left: 12px; border-left: 3px solid var(--accent); line-height: 1.5; }
.post .prose p { margin-bottom: 16px; }
.post .prose ul, .post .prose ol { margin-bottom: 16px; }
.post .prose li { margin: 6px 0; }
.post .prose b { color: var(--ink); font-weight: 700; }
.post .prose code { word-break: break-all; }
.post .prose pre code { word-break: normal; }

/* the table of contents at the top of an article */
.toc { margin: 0 0 30px; padding: 16px 20px; border: 1px solid var(--line); border-radius: 6px; background: var(--raise); font-size: 14.5px; line-height: 1.7; }
.toc b { display: block; margin-bottom: 6px; font: 500 11.5px var(--mono); letter-spacing: 0.12em; color: var(--accent); }
.toc ol { margin: 0; padding-left: 0; list-style: none; color: var(--soft); }
.toc li { margin: 3px 0; }
.toc a { text-decoration: none; }
.toc a:hover { color: var(--accent); }

.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; margin-top: 16px; font-size: 12.5px; color: var(--dim); }
.post-meta .cat { padding: 3px 9px; border: 1px solid var(--accent); border-radius: 3px; color: var(--accent); font-size: 11.5px; line-height: 1.4; }

/* a note, and a table that may be wider than the screen */
.callout { margin: 16px 0; padding: 12px 16px; border-left: 3px solid var(--line); background: var(--raise); font-size: 15px; line-height: 1.85; }
.callout p { margin: 0 0 8px; }
.callout p:last-child { margin: 0; }
.vet div p { margin: 0 0 8px; }
.vet div p:last-child { margin: 0; }
.tablewrap { overflow-x: auto; margin: 6px 0 18px; }
.post .prose table { margin-bottom: 0; min-width: 520px; }
.post .prose thead th { width: auto; white-space: normal; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--dim); }
.post .prose td { font-size: 14.5px; line-height: 1.75; }
.post .prose td:first-child { color: var(--ink); }

/* the call to try the connector, after the article and on the index */
.cta { max-width: 780px; margin: 44px 0 0; padding: 22px 24px 20px; border: 1px solid var(--accent); border-radius: 6px; background: var(--raise); }
.cta h2 { font-size: 20px; margin: 0 0 8px; }
.cta p { margin: 0 0 6px; color: var(--soft); font-size: 15px; line-height: 1.85; }
.cta .cmds { max-width: none; margin: 12px 0; }
.ctalinks { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 10px !important; font-size: 14px; }
.ctalinks a { text-underline-offset: 4px; }

/* a list of articles: the index, "あわせて読みたい" */
.catlist, .related { max-width: 1100px; padding-top: 34px; }
.catlist h2, .related h2 { font-size: 22px; margin-bottom: 4px; }
.plist { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 0 36px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.plist li { border-bottom: 1px solid var(--hair); min-width: 0; }
.plist a { display: grid; gap: 4px; padding: 16px 2px; text-decoration: none; color: inherit; }
.plist a:hover b { color: var(--accent); }
.plist a:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.plist b { font: 700 16.5px/1.55 var(--serif); }
.plist span { color: var(--soft); font-size: 13.5px; line-height: 1.75; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.plist small { color: var(--dim); font-size: 12px; }
.related { padding-bottom: 12px; }
.post + .foot, .catlist:last-of-type { margin-bottom: 0; }
.wrap > .cta { margin-bottom: 8px; }
main > .wrap { padding-bottom: 48px; }

@media (max-width: 560px) {
  .post .prose { font-size: 15.5px; }
  .post .prose h2 { font-size: 21px; }
  .cta { padding: 18px 16px 16px; }
}
