/* ==========================================================================
   Hiroba blog — article prose on top of the landing-site design system.
   Loaded after style.css; only adds what articles need.

   Idiom: the article is a clean sheet laid on the coordinate floor. The dot
   grid stays visible in the page margins; prose always sits on --surface.
   ========================================================================== */

/* ------------------------------------------------------------------ sheet */

.article-sheet {
  max-width: 860px;
  margin: 44px auto 80px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 30px 70px -55px rgba(22, 32, 27, 0.55);
}

.article-hero {
  padding: 60px 0 8px;
}

.article-hero .eyebrow {
  margin-bottom: 20px;
}

.article-wrap {
  max-width: 692px; /* ≈38 full-width chars at 17px — comfortable JA measure */
  margin: 0 auto;
  padding: 0 26px;
}

.article-hero h1 {
  font-size: clamp(26px, 4.2vw, 36px);
  line-height: 1.42;
  letter-spacing: 0;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-top: 20px;
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 13px;
}

/* ------------------------------------------------------------------ prose */

.article {
  padding: 26px 0 68px;
  font-size: 17px;
  line-height: 1.95;
}

.article > .article-wrap > * + * {
  margin-top: 1.5em;
}

.article p,
.article li {
  color: var(--ink-soft);
}

.article strong {
  color: var(--ink);
  font-weight: 600;
}

.article h2 {
  margin-top: 2.7em;
  padding-top: 1.5em;
  border-top: 1px solid var(--line);
  font-size: clamp(21px, 2.8vw, 25px);
  line-height: 1.5;
  letter-spacing: 0;
  scroll-margin-top: 90px;
}

/* Each section opens with a presence dot, same material as the LP's .sec-no.
   Colors cycle through the five avatar colors in roster order. */
.article h2::before {
  content: "";
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 14px;
  border-radius: 50%;
  vertical-align: 0.14em;
  background: var(--dot, var(--accent));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--dot, var(--accent)) 18%, transparent);
}

.article h2:nth-of-type(5n + 1) { --dot: var(--p-indigo); }
.article h2:nth-of-type(5n + 2) { --dot: var(--p-moss); }
.article h2:nth-of-type(5n + 3) { --dot: var(--p-gold); }
.article h2:nth-of-type(5n + 4) { --dot: var(--p-plum); }
.article h2:nth-of-type(5n)     { --dot: var(--p-clay); }

.article h3 {
  margin-top: 2.1em;
  font-size: 18.5px;
  line-height: 1.55;
  letter-spacing: 0;
  color: var(--ink);
}

.article ul,
.article ol {
  padding-left: 1.4em;
  margin-bottom: 0;
}

.article li + li {
  margin-top: 0.6em;
}

.article li::marker {
  color: var(--ink-faint);
}

.article a {
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent);
}

/* The "who wrote this" disclosure and similar asides. */
.article-note {
  background: color-mix(in srgb, var(--accent-soft) 38%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line));
  border-radius: var(--radius);
  padding: 18px 22px;
  font-size: 15px;
  line-height: 1.85;
}

.article-note .note-label {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent-deep);
  margin-bottom: 8px;
}

/* Table of contents — quiet, coordinate-style numbering. */
.article-toc {
  background: color-mix(in srgb, var(--floor) 45%, var(--surface));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 26px;
}

.article-toc > p {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
  margin-bottom: 12px;
}

.article-toc ol {
  counter-reset: toc;
  list-style: none;
  margin: 0;
  padding: 0;
}

.article-toc li {
  counter-increment: toc;
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.article-toc li + li {
  margin-top: 0.55em;
}

.article-toc li::before {
  content: counter(toc, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-faint);
}

.article-toc a {
  text-decoration: none;
}

.article-toc a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* FAQ — <details> cards instead of bare browser disclosure. */
.faq {
  display: grid;
  gap: 10px;
}

.faq details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.15s ease;
}

.faq details[open],
.faq details:hover {
  border-color: var(--line-strong);
}

.faq summary {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 15px 20px;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  font-size: 16px;
  color: var(--ink);
  line-height: 1.7;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::before {
  content: "Q";
  flex: none;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 13px;
  color: var(--accent-deep);
}

.faq summary::after {
  content: "+";
  margin-left: auto;
  flex: none;
  font-family: var(--mono);
  font-size: 15px;
  color: var(--ink-faint);
  transition: transform 0.15s ease;
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq .a {
  margin: 0;
  padding: 0 20px 17px 45px;
  font-size: 15.5px;
  line-height: 1.85;
}

/* In-article CTA card (kept quieter than the closing .cta-band). */
.article-cta {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 28px;
  text-align: center;
}

.article-cta .btn {
  margin-top: 14px;
}

@media (max-width: 720px) {
  .article-sheet {
    margin: 18px 12px 56px;
    border-radius: 14px;
  }

  .article-hero {
    padding: 40px 0 6px;
  }

  .article-wrap {
    padding: 0 22px;
  }

  .article {
    font-size: 16px;
  }

  .faq .a {
    padding-left: 20px;
  }
}

/* ------------------------------------------------------------- blog index */

.post-list {
  display: grid;
  gap: 18px;
  padding: 32px 0 72px;
}

.post-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 28px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.post-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.post-card h2 {
  font-size: 20px;
  line-height: 1.45;
  color: var(--ink);
}

.post-card p {
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: 15px;
}

.post-card .article-meta {
  margin-top: 12px;
}
