/* The blog's own styles (blog.mjs), linked only from /ja/blog and the posts.
   Not in css/style.css on purpose: in production /css/* is answered by the
   LP Pages project (whatcha-lp, via the whatcha-lp-path-proxy Worker), which
   ships on its own schedule, while /ja/* and /assets/blog/* come from
   whatcha-main with the app. Kept beside the posts' images, it ships with
   the posts. */

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  margin: 0 0 1.25rem;
  font-size: 0.8rem;
  color: var(--muted);
}
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--green); text-decoration: underline; }

.legal h1 { line-height: 1.45; }

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 1rem;
  margin: -1.5rem 0 1.5rem;
  font-size: 0.8rem;
  color: var(--muted);
}
.post-meta__cat {
  padding: 0.15rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--green);
  text-decoration: none;
}

.post-hero,
.post-figure,
.blog-index__hero {
  margin: 0 0 2rem;
}
.post-hero img,
.post-figure img,
.blog-index__hero img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--card);
}
.post-figure { margin: 1.75rem 0 2rem; }
.post-figure figcaption {
  margin-top: 0.6rem;
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--muted);
}

.toc {
  margin: 0 0 2.5rem;
  padding: 1.1rem 1.4rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
}
.toc__title {
  margin: 0 0 0.5rem;
  font-weight: 700;
  font-size: 0.9rem;
}
.legal .toc ol { margin: 0; padding-left: 1.4rem; }
.legal .toc li { font-size: 0.88rem; }
.legal .toc li + li { margin-top: 0.25rem; }
.toc a { color: var(--foreground); text-decoration: none; }
.toc a:hover { color: var(--green); text-decoration: underline; }

.legal h2[id] { scroll-margin-top: 5rem; }

/* Key points, opened at the top of a post. */
.legal .post-points {
  margin: 0 0 2rem;
  padding: 1rem 1.3rem;
  border-left: 3px solid var(--green);
  background: var(--card);
  border-radius: 0 10px 10px 0;
}
.legal .post-points p:first-child { margin-top: 0; font-weight: 700; }
.legal .post-points ul { margin-bottom: 0; }

.legal table {
  width: 100%;
  margin: 1rem 0 1.5rem;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.legal th,
.legal td {
  padding: 0.6rem 0.7rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
  color: var(--foreground);
}
.legal th { font-weight: 700; background: var(--card); }
.legal .table-wrap { overflow-x: auto; }

.legal .faq h3 { margin-top: 1.5rem; }

.legal .post-quote {
  margin: 1.5rem 0;
  padding: 0.2rem 0 0.2rem 1.2rem;
  border-left: 3px solid var(--border);
}
.legal .post-quote p { font-size: 1rem; line-height: 1.9; }

/* Cards: the index, the latest three and "related". */
.post-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 1.25rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}
.post-card { margin: 0 !important; }
.post-card a {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
  color: var(--foreground);
  text-decoration: none;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.post-card a:hover { border-color: var(--green-dim); transform: translateY(-2px); }
.post-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.post-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.9rem 1rem 1.1rem;
}
.post-card__cat { font-size: 0.75rem; color: var(--green); }
.post-card__title {
  margin: 0 !important;
  font-size: 1rem !important;
  line-height: 1.5;
  color: var(--foreground);
}
.post-card__desc {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.82rem;
  line-height: 1.65;
  color: var(--muted);
}
.post-card__date { margin-top: auto; font-size: 0.75rem; color: var(--muted); }

.related {
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.related h2 { font-size: 1.15rem; margin: 0; }
.related__all { margin-top: 1.5rem; font-size: 0.9rem; }
.related__all a { color: var(--green); }

.blog-index { padding: 2.5rem 0 4rem; }
.blog-index__head { max-width: var(--legal-max); }
.blog-index h1 {
  margin: 0 0 0.75rem;
  font-family: var(--font-mono);
  font-size: 1.9rem;
  color: var(--green);
}
.blog-index__intro { margin: 0 0 1.25rem; line-height: 1.9; color: var(--foreground); }
.blog-index__cats { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1.75rem; }
.blog-index__cats a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--foreground);
  text-decoration: none;
}
.blog-index__cats a:hover { border-color: var(--green); color: var(--green); }
.blog-index__cats span { font-size: 0.75rem; color: var(--muted); }
.blog-cat { margin-top: 3rem; scroll-margin-top: 5rem; }
.blog-cat h2 { margin: 0; font-size: 1.3rem; }
.blog-cat__desc { margin: 0.35rem 0 0; font-size: 0.9rem; color: var(--muted); }
.blog-index__app { margin-top: 4rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.blog-index__app h2 { font-size: 1.15rem; margin: 0 0 0.75rem; }
.blog-index__app p { line-height: 1.9; color: var(--foreground); }

@media (max-width: 600px) {
  .blog-index h1 { font-size: 1.5rem; }
  .post-meta { margin-top: -1.75rem; }
}
