/* トップと記事ページで共有する土台。管理画面の見た目は style.css */
:root {
  --ground: #ebe7df;      /* 机の上の紙束のような、少し沈んだ生成り */
  --sheet: #faf8f4;       /* その上に置いた一枚 */
  --ink: #1e1b18;
  --ink-2: #57514a;
  --ink-3: #8c847a;
  --line: rgba(30, 27, 24, .09);
  --sun: #d8a11f;         /* アイコンのシャツの黄色 */
}
* { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: -apple-system, "Hiragino Sans", "Noto Sans JP", "Yu Gothic", sans-serif;
  font-size: 14px;
  line-height: 1.8;
  text-wrap: pretty;
}
a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .22em; text-decoration-color: rgba(30,27,24,.3); }
a:hover { text-decoration-color: var(--sun); text-decoration-thickness: 2px; }
a:focus-visible { outline: 2px solid var(--sun); outline-offset: 3px; border-radius: 2px; }
.sheet { background: var(--sheet); border: 1px solid var(--line); border-radius: 12px; padding: 22px 24px 24px; }

/* ---- 記事ページ（/<slug>）。紙を1枚置く ---- */
.doc { max-width: 760px; margin: 0 auto; padding: 40px 24px 96px; }
.doc > nav { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; font-size: 14px; font-weight: 600; }
.doc > nav a { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink-2); }
.doc > nav a:hover { color: var(--ink); }
.doc > nav img { width: 28px; height: 28px; border-radius: 50%; outline: 1px solid rgba(0,0,0,.1); outline-offset: -1px; }
.article { padding: 36px 40px 44px; font-size: 15px; line-height: 1.9; }
.article > :first-child { margin-top: 0; }
.article h1 { font-size: 26px; line-height: 1.3; font-weight: 700; letter-spacing: -.02em; margin: 0 0 24px; }
.article h2 { font-size: 17px; font-weight: 600; margin: 40px 0 10px; }
.article h3 { font-size: 15px; font-weight: 600; margin: 28px 0 6px; }
.article p { margin: 0 0 1em; }
.article ul, .article ol { margin: 0 0 1em; padding-left: 1.4em; }
.article li + li { margin-top: 2px; }
.article li::marker { color: var(--ink-3); }
.article hr { border: 0; border-top: 1px solid var(--line); margin: 32px 0; }
.article blockquote { margin: 0 0 1em; padding: 2px 0 2px 16px; border-left: 2px solid var(--sun); color: var(--ink-2); }
.article code { font-family: ui-monospace, Menlo, monospace; font-size: .92em; background: rgba(30,27,24,.06); padding: .1em .35em; border-radius: 4px; }
.article pre { margin: 0 0 1em; padding: 14px 16px; background: rgba(30,27,24,.05); border-radius: 8px; overflow-x: auto; line-height: 1.6; }
.article pre code { background: transparent; padding: 0; font-size: 13px; }
.article table { border-collapse: collapse; width: 100%; margin: 0 0 1em; display: block; overflow-x: auto; }
.article th, .article td { border-bottom: 1px solid var(--line); padding: 6px 10px; text-align: left; vertical-align: top; }
.article th { font-weight: 600; color: var(--ink-2); font-size: 13px; }
.article img { max-width: 100%; height: auto; }
.article dl { margin: 0 0 1em; }
.article dt { font-weight: 600; }
.article dd { margin: 0 0 8px; color: var(--ink-2); }
.article sup { line-height: 0; font-size: .75em; }
.article .footnote-ref { text-decoration: none; padding: 0 .15em; }
.article .footnote { margin-top: 32px; font-size: 13px; color: var(--ink-2); }
.article .footnote hr { margin: 0 0 12px; }
.article .footnote ol { padding-left: 1.4em; }
.article .footnote-backref { text-decoration: none; }

@media (max-width: 640px) {
  .doc { padding: 24px 16px 64px; }
  .article { padding: 24px 20px 28px; }
  .article h1 { font-size: 22px; }
}
