/* ============================================================
   Linktier — /insights listing + article detail styles
   (depends on linktier-v1-core.css tokens + components)
   ============================================================ */

/* ---------- Insights hero ---------- */
.insights-hero {
  padding: calc(var(--header-h) + 96px) 0 72px;
  border-bottom: 1px solid var(--line);
}

.insights-hero .container {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.insights-hero h1 {
  margin: 0;
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: 0.01em;
  text-wrap: pretty;
  max-width: 880px;
}

.insights-hero .insights-sub {
  margin: 0;
  font-size: 15.5px;
  line-height: 2.05;
  color: var(--ink-2);
  max-width: 700px;
  text-wrap: pretty;
}

/* ---------- Category chips ---------- */
.cat-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.cat-chip {
  appearance: none;
  font-family: var(--font-jp);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  background: var(--bg-white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 20px;
  cursor: pointer;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease), background 0.25s var(--ease);
}

.cat-chip:hover { border-color: var(--accent); color: var(--accent); }

.cat-chip.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ---------- Posts list ---------- */
.posts {
  padding: 88px 0 120px;
}

.post-list {
  display: flex;
  flex-direction: column;
}

.post-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  padding: 44px 0;
  border-top: 1px solid var(--line);
}

.post-row:last-child { border-bottom: 1px solid var(--line); }

.post-row.has-thumb { grid-template-columns: 1fr 280px; align-items: center; }

.post-main {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 14px;
}

.post-cat {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 5px 14px;
}

.post-date {
  font-family: var(--font-en);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--mut);
}

.post-row h2 {
  margin: 0;
  font-size: clamp(20px, 2.2vw, 26px);
  font-weight: 700;
  line-height: 1.55;
  letter-spacing: 0.01em;
  text-wrap: pretty;
}

.post-row h2 a { color: inherit; transition: color 0.25s var(--ease); }
.post-row h2 a:hover { color: var(--accent); }

.post-excerpt {
  margin: 0;
  font-size: 14.5px;
  line-height: 2;
  color: var(--ink-2);
  text-wrap: pretty;
  max-width: 720px;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.post-tags .tag { font-size: 11.5px; padding: 5px 12px; }

.post-read {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--accent);
  margin-top: 4px;
  transition: gap 0.25s var(--ease);
}

.post-read::after { content: "→"; font-family: var(--font-en); }
.post-read:hover { gap: 14px; }

.post-thumb {
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: #fff;
  overflow: hidden;
}

.post-thumb img { display: block; width: 100%; height: auto; }

/* ---------- Article detail ---------- */
.article-hero {
  padding: calc(var(--header-h) + 88px) 0 56px;
  border-bottom: 1px solid var(--line);
}

.article-hero .container,
.article-body-wrap {
  max-width: 840px;
}

.article-hero .container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.article-hero h1 {
  margin: 0;
  font-size: clamp(27px, 3.2vw, 40px);
  font-weight: 700;
  line-height: 1.55;
  letter-spacing: 0.01em;
  text-wrap: pretty;
}

.article-lede {
  margin: 0;
  font-size: 15px;
  line-height: 2.05;
  color: var(--ink-2);
  text-wrap: pretty;
}

.article-section {
  padding: 72px 0 110px;
}

.article-body-wrap {
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.article-media {
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: #fff;
  overflow: hidden;
  margin-bottom: 12px;
}

.article-media img { display: block; width: 100%; height: auto; }

.article-body-wrap h2 {
  margin: 28px 0 0;
  scroll-margin-top: calc(var(--header-h, 88px) + 28px);
  font-size: clamp(19px, 2vw, 23px);
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: 0.01em;
  text-wrap: pretty;
  padding-top: 28px;
  border-top: 1px solid var(--line-soft);
}

.article-body-wrap p {
  margin: 0;
  font-size: 15px;
  line-height: 2.15;
  color: var(--ink-2);
  text-wrap: pretty;
}

.article-ext {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  align-self: flex-start;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, white);
  border-radius: 999px;
  padding: 12px 24px;
  margin-top: 16px;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}

.article-ext:hover { border-color: var(--accent); }
.article-ext::after { content: "↗"; font-family: var(--font-en); font-size: 13px; }

/* article table of contents */
.article-toc {
  margin: 12px 0 8px;
  padding: 26px 30px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}

.article-toc-title {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.08em;
  color: var(--mut);
}

.article-toc ol {
  margin: 0;
  padding: 0 0 0 2px;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  counter-reset: toc -1;
}

.article-toc li { counter-increment: toc; }

.article-toc a {
  display: flex;
  gap: 12px;
  align-items: baseline;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-2);
  transition: color 0.25s var(--ease);
}

.article-toc a::before {
  content: counter(toc, decimal-leading-zero);
  font-family: var(--font-en);
  font-size: 12px;
  font-weight: 600;
  color: var(--mut-2);
  flex: none;
}

.article-toc a:hover { color: var(--accent); }

.article-body-wrap h3 {
  margin: 8px 0 -8px;
  font-size: 16px;
  font-weight: 650;
  color: var(--ink);
  line-height: 1.6;
}

.article-note {
  font-size: 13.5px;
  color: var(--mut);
  border-left: 2px solid var(--line);
  padding-left: 16px;
}

.article-back {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--mut);
  transition: color 0.25s var(--ease);
}

.article-back::before { content: "←"; font-family: var(--font-en); }
.article-back:hover { color: var(--accent); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .insights-hero { padding: calc(var(--header-h) + 56px) 0 56px; }
  .posts { padding: 64px 0 96px; }
  .post-row.has-thumb { grid-template-columns: 1fr; }
  .post-thumb { max-width: 420px; order: -1; }
  .article-hero { padding: calc(var(--header-h) + 48px) 0 48px; }
  .article-section { padding: 56px 0 88px; }
}

@media (max-width: 600px) {
  .post-row { padding: 36px 0; gap: 24px; }
  .article-body-wrap { padding: 0 24px; }
}


/* Japanese subpage copy finalization */
.post-row h2 .title-line,
.article-hero h1 .title-line {
  display: block;
}

.post-excerpt .excerpt-line {
  display: block;
}

.posts {
  padding: 72px 0 104px;
}

.post-row {
  padding: 38px 0;
}

.post-row.has-thumb {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 36vw);
  gap: clamp(32px, 5vw, 72px);
}

.post-row.has-thumb .post-main {
  max-width: 860px;
}

.post-row h2 .title-line,
.post-excerpt .excerpt-line {
  display: inline;
}

.post-thumb {
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: #fff;
}

.post-thumb.is-dark {
  background: #050505;
}

.post-thumb.is-logo {
  padding: 28px;
}

.post-thumb.is-banner {
  padding: 0;
  background: transparent;
  border-color: transparent;
}

.post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@media (max-width: 960px) {
  .post-row.has-thumb {
    grid-template-columns: 1fr;
  }

  .post-thumb {
    width: 100%;
    max-width: 420px;
    order: -1;
  }
}

@media (max-width: 600px) {
  .post-thumb {
    max-width: none;
  }
}

.article-figure {
  margin: 6px 0 18px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: #050505;
  overflow: hidden;
}

.article-figure img {
  display: block;
  width: 100%;
  height: auto;
}

.insight-article-media {
  width: min(100%, 620px);
  margin: 4px auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
}

.insight-article-media--logo {
  width: min(100%, 580px);
  min-height: 220px;
  padding: 24px 30px;
}

.insight-article-media--banner {
  width: min(100%, 700px);
  padding: 0;
  background: transparent;
  border-color: transparent;
}

.insight-article-media img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 210px;
  object-fit: contain;
}

.insight-article-media--logo img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 190px;
}

.insight-article-media--banner img {
  height: auto;
  max-height: 280px;
}

@media (max-width: 600px) {
  .post-row h2 .title-line,
  .article-hero h1 .title-line,
  .post-excerpt .excerpt-line {
    display: inline;
  }

  .article-figure {
    margin: 0 0 10px;
    border-radius: 10px;
  }

  .insight-article-media {
    width: 100%;
    border-radius: 16px;
    margin-top: 0;
    margin-bottom: 8px;
  }

  .insight-article-media--logo {
    min-height: 170px;
    padding: 16px;
  }

.insight-article-media--banner {
    padding: 0;
  }

  .insight-article-media img {
    max-height: 190px;
  }

  .insight-article-media--logo img {
    max-height: 150px;
  }

  .insight-article-media--banner img {
    max-height: 250px;
  }
}

@media (max-width: 600px) {
  .posts {
    padding: 56px 0 84px;
  }

  .post-row {
    padding: 32px 0;
  }

}


/* Japanese subpage footer readability */
@media (max-width: 600px) {
  .site-footer {
    padding: 40px 0 44px;
  }

  .footer-row {
    align-items: flex-start;
    gap: 22px;
  }

  .footer-brand,
  .footer-row > span:last-child {
    width: 100%;
  }

  .footer-links {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 20px;
  }

  .footer-links a {
    line-height: 1.5;
    word-break: keep-all;
    overflow-wrap: normal;
  }
}
