* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background: #ffffff;
  color: #222;
  line-height: 1.75;
}

.site-nav {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-nav a { color: #222; text-decoration: none; }

.logo { display: flex; align-items: center; height: 42px; }
.logo img { display: block; width: 42px; height: 42px; object-fit: contain; }

.nav-link,
.nav-status { font-size: 14px; color: #666; }

.nav-link:hover { color: #222; }

.category {
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #777;
}

h1 {
  margin: 0 0 18px;
  font-size: 48px;
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.intro {
  max-width: 650px;
  margin: 0 0 20px;
  font-size: 20px;
  line-height: 1.55;
  color: #666;
}

/* Homepage */
.home main {
  max-width: 720px;
  min-height: calc(100vh - 183px);
  margin: 65px auto 100px;
  padding: 0 20px;
}

.home .intro { margin-bottom: 48px; }
.post-list { border-top: 1px solid #eee; }

.post {
  display: block;
  padding: 28px 0;
  border-bottom: 1px solid #eee;
  color: inherit;
  text-decoration: none;
}

.post:hover h2 {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.post-meta { margin-bottom: 7px; font-size: 14px; color: #999; }

.post h2 {
  margin: 0 0 8px;
  font-size: 28px;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.post p { margin: 0; color: #666; }

/* Article */
article { max-width: 720px; margin: 65px auto 100px; padding: 0 20px; }
.meta { margin-bottom: 42px; font-size: 14px; color: #999; }
.meta a { color: #666; text-decoration: none; }
.meta a:hover { text-decoration: underline; }

.tldr { margin-bottom: 36px; padding: 24px 26px; background: #f5f5f5; border-radius: 12px; }
.tldr h2 { margin: 0 0 8px; font-size: 14px; letter-spacing: 0.04em; text-transform: uppercase; color: #666; }
.tldr p { margin: 0; font-size: 18px; line-height: 1.55; font-weight: 650; color: #222; }

.toc { display: block; max-width: none; margin: 0 0 48px; padding: 0; }
.toc-title { margin-bottom: 10px; font-size: 14px; font-weight: 600; color: #777; }
.toc ul { margin: 0; padding-left: 20px; }
.toc li { margin: 4px 0; }
.toc a { color: #555; text-decoration: none; }
.toc a:hover { color: #111; text-decoration: underline; }

.content { font-size: 18px; }
.content p { margin: 0 0 25px; }
.content h2 { scroll-margin-top: 30px; margin: 58px 0 18px; font-size: 28px; line-height: 1.3; letter-spacing: -0.02em; }
.content strong { font-weight: 650; }
.content em { color: #666; }
.content ul, .content ol { margin: 0 0 30px; padding-left: 28px; }
.content li { margin-bottom: 8px; padding-left: 4px; }

.definition { margin: 0 0 28px; font-size: 19px; line-height: 1.65; }
.example { margin: 32px 0 40px; padding: 25px 28px; background: #f7f7f7; border-radius: 12px; }
.example p { margin: 0 0 16px; }
.example p:last-child { margin-bottom: 0; }
.example .question, .example .ending { font-weight: 650; color: #222; }
.example .ending { margin-top: 22px; }

.flow { margin: 30px 0 40px; padding: 24px 28px; border: 1px solid #e8e8e8; border-radius: 12px; }
.flow-title { display: block; margin-bottom: 12px; font-weight: 650; }
.flow ol { margin: 0; }
.flow li:last-child { margin-bottom: 0; }

.takeaway { margin-top: 60px; padding-top: 30px; border-top: 1px solid #eee; }
.takeaway h2 { margin-top: 0; }

footer {
  max-width: 720px;
  margin: 0 auto;
  padding: 30px 20px 60px;
  border-top: 1px solid #eee;
  font-size: 14px;
  color: #999;
}

@media (max-width: 650px) {
  .site-nav { padding-top: 20px; }
  article { margin-top: 35px; }
  h1 { font-size: 36px; }
  .intro { font-size: 18px; }
  .content { font-size: 17px; }
  .content h2 { margin-top: 48px; font-size: 25px; }
  .tldr { padding: 21px; }
  .tldr p { font-size: 17px; }
  .example, .flow { padding: 22px; }
}
