/*
 * SHISAKUBA editorial presentation layer.
 * Load after page-local styles. These rules only target the existing blog
 * wrappers, leaving article copy, SVG artwork, filtering and link targets intact.
 */

/* Column index */
.blog-page {
  padding-top: 0;
  background: #f5f8fc;
}

.blog-page .blog-wrap {
  max-width: 1140px;
  padding: clamp(40px, 5vw, 64px) 24px 96px;
}

.blog-page .blog-head {
  max-width: 760px;
  margin: 0 auto 40px;
}

.blog-page .blog-head h1 {
  margin: 18px 0 18px;
  font-size: clamp(28px, 3.6vw, 42px);
  line-height: 1.5;
  letter-spacing: .015em;
  color: #172f50;
}

.blog-page .blog-head p {
  font-size: 16px;
  line-height: 1.9;
  color: #44546b;
}

.blog-page .blog-cats {
  justify-content: center;
  gap: 8px;
  margin-bottom: 36px;
  padding: 24px 0 28px;
  border-top: 1px solid #dfe7f2;
  border-bottom: 1px solid #dfe7f2;
}

.blog-page .blog-cat-btn {
  min-height: 42px;
  padding: 9px 16px;
  border: 1px solid #dce5f1;
  background: #fff;
  color: #44546b;
  font-size: 13px;
  line-height: 1.55;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}

.blog-page .blog-cat-btn:hover {
  color: #1c4aa0;
  background: #edf4ff;
  border-color: #aac7ef;
}

.blog-page .blog-cat-btn.active {
  color: #fff;
  background: #2468db;
  border-color: #2468db;
  box-shadow: 0 3px 8px rgba(36, 104, 219, .12);
}

.blog-page .blog-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px 24px;
}

.blog-page .blog-card {
  min-width: 0;
  border: 1px solid #dfe7f2;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 3px 10px rgba(23, 47, 80, .025);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.blog-page .blog-card:hover {
  border-color: #afc8e9;
  box-shadow: 0 12px 28px rgba(23, 47, 80, .09);
  transform: translateY(-3px);
}

.blog-page .blog-card-thumb {
  overflow: hidden;
  background: #e9f1fc;
  border-bottom: 1px solid #e6ecf4;
}

.blog-page .blog-card-body {
  padding: 22px;
  gap: 14px;
}

.blog-page .blog-card-cat {
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 6px;
  background: #edf4ff;
  color: #205ab0;
  font-size: 11px;
  line-height: 1.6;
}

.blog-page .blog-card-title {
  color: #172f50;
  font-size: 16px;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.blog-page .blog-card-date {
  padding-top: 10px;
  border-top: 1px solid #edf1f7;
  color: #68788e;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.blog-page .blog-empty {
  padding: 56px 24px;
  border: 1px dashed #c9d7ea;
  border-radius: 18px;
  background: #fff;
  color: #68788e;
}

/* Article shell and reading rhythm */
.article-page {
  padding-top: 0;
  background: linear-gradient(180deg, #f0f5fd 0, #f5f8fc 440px, #fff 920px);
}

.article-page .article-wrap {
  max-width: 824px;
  padding: 36px 24px 88px;
}

.article-page .breadcrumb {
  gap: 5px 9px;
  margin-bottom: 30px;
  font-size: 12px;
  line-height: 1.75;
  color: #68788e;
  overflow-wrap: anywhere;
}

.article-page .breadcrumb a {
  color: #315e9b;
  text-underline-offset: 3px;
}

.article-page .breadcrumb-sep {
  color: #8fa0b5;
}

.article-page .article-header {
  margin-bottom: 30px;
}

.article-page .article-cat {
  margin-bottom: 16px;
  padding: 5px 12px;
  border: 1px solid #d5e4fa;
  border-radius: 8px;
  color: #205ab0;
  background: #e9f1fe;
  font-size: 12px;
  line-height: 1.65;
}

.article-page .article-title {
  margin-bottom: 20px;
  font-size: clamp(26px, 3.2vw, 37px);
  line-height: 1.55;
  letter-spacing: .015em;
  color: #172f50;
  overflow-wrap: anywhere;
}

.article-page .article-meta {
  font-size: 13px;
  color: #68788e;
  font-variant-numeric: tabular-nums;
}

.article-page .article-thumb {
  margin-bottom: 40px;
  border-radius: 20px;
  box-shadow: 0 10px 28px rgba(23, 47, 80, .08);
}

.article-page .article-thumb img {
  border-radius: inherit;
}

.article-page .article-body {
  font-size: 16px;
  line-height: 1.95;
  color: #44546b;
  overflow-wrap: anywhere;
}

.article-page .article-section {
  margin-bottom: 56px;
  scroll-margin-top: 104px;
}

.article-page .section-label {
  margin-bottom: 14px;
  padding: 5px 11px;
  border-radius: 7px;
  background: #edf4ff;
  color: #205ab0;
  font-size: 12px;
  line-height: 1.65;
}

.article-page .article-body h2 {
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 2px solid #dce8f8;
  font-size: clamp(21px, 2.5vw, 26px);
  line-height: 1.65;
  letter-spacing: .01em;
  color: #172f50;
}

.article-page .article-body h3 {
  margin: 30px 0 12px;
  font-size: 18px;
  line-height: 1.7;
  color: #172f50;
}

.article-page .article-body p {
  margin-bottom: 20px;
}

.article-page .article-body strong {
  color: #243f63;
}

.article-page .article-body :is(p, li) > a:not(.btn) {
  color: #205ab0;
  text-decoration: underline;
  text-decoration-color: #a9c5ed;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}

.article-page .article-body :is(p, li) > a:not(.btn):hover {
  text-decoration-color: currentColor;
}

.article-page .article-body :is(ul, ol) {
  margin-top: 16px;
  margin-bottom: 22px;
}

.article-page .article-body li {
  margin-bottom: 10px;
}

/* Callouts keep their original meaning and contents. */
.article-page .article-box {
  margin: 28px 0;
  padding: 24px 26px;
  border-left: 3px solid #2468db;
  border-radius: 0 16px 16px 0;
  background: #edf4ff;
  color: #3c526f;
  font-size: 15px;
  line-height: 1.9;
}

.article-page .article-body .article-box-title {
  margin-bottom: 12px;
  color: #205ab0;
  font-size: 15px;
}

.article-page .article-box > :last-child,
.article-page .article-box li:last-child {
  margin-bottom: 0;
}

/* Original SVGs remain intact. Mobile scroll preserves diagram legibility. */
.article-page .svg-wrap {
  margin: 32px 0;
  padding: 28px 24px 22px;
  border: 1px solid #dfe7f2;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(23, 47, 80, .025);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  scrollbar-color: #a8bedb #edf2f9;
}

.article-page .svg-wrap svg {
  height: auto;
}

.article-page .svg-caption {
  margin-top: 18px;
  color: #68788e;
  font-size: 13px;
  line-height: 1.7;
}

.article-page .table-scroll {
  max-width: 100%;
  margin: 28px 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  scrollbar-color: #a8bedb #edf2f9;
}

.article-page .compare-table {
  border: 1px solid #dce5f1;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  line-height: 1.75;
  font-size: 14px;
}

.article-page .table-scroll .compare-table {
  margin: 0;
}

.article-page .compare-table th {
  padding: 15px 16px;
  font-size: 13px;
  vertical-align: middle;
}

.article-page .compare-table th:not([class]) {
  background: #edf3fb;
  color: #243f63;
}

.article-page .compare-table td {
  padding: 16px;
  border-bottom-color: #e6edf6;
  color: #44546b;
}

.article-page .compare-table tbody tr:nth-child(even) td {
  background: #f6f9fd;
}

.article-page .compare-table td:first-child {
  color: #243f63;
  font-weight: 500;
}

.article-page .badge-ng { color: #b34438; }
.article-page .badge-ok { color: #24754a; }
.article-page .badge-mid { color: #a86014; }

/* Shared article visual explanations and page-specific editorial cards. */
.article-page .step-flow {
  margin: 32px 0;
}

.article-page .step-flow-item {
  min-width: 0;
  padding: 22px 14px;
  border: 1px solid #dce5f1;
  border-radius: 16px;
}

.article-page .step-flow-num {
  width: 34px;
  height: 34px;
  margin-bottom: 12px;
}

.article-page .step-flow-title {
  font-size: 14px;
  line-height: 1.65;
}

.article-page .step-flow-desc {
  font-size: 13px;
  line-height: 1.75;
  color: #44546b;
}

.article-page .before-after {
  gap: 20px;
  margin: 32px 0;
}

.article-page .ba-col {
  min-width: 0;
  padding: 24px;
  border-width: 1px;
  border-radius: 16px;
}

.article-page .ba-col.before { border-color: #edcbc8; }
.article-page .ba-col.after { border-color: #bcdccf; }

.article-page .ba-label {
  font-size: 14px;
  line-height: 1.7;
}

.article-page .article-body .ba-list {
  padding: 0;
  margin: 0;
  gap: 12px;
}

.article-page .ba-list li {
  margin: 0;
  padding-left: 22px;
  font-size: 14px;
  line-height: 1.8;
}

.article-page :is(.point-card, .opt-card, .q-group, .method-card, .miss-card, .ai-case, .check-item) {
  border-color: #dce5f1;
  border-width: 1px;
  border-radius: 16px;
  padding: 24px;
}

/* .check-card is a layout wrapper in one article and a card in others. */
.article-page .check-card:not(:has(> .check-item)) {
  padding: 24px;
  border: 1px solid #dce5f1;
  border-radius: 16px;
}

.article-page .point-card {
  margin: 26px 0;
  padding-top: 26px;
}

.article-page .point-card .pc-num {
  padding: 3px 12px;
  line-height: 1.65;
}

.article-page .feat-card {
  padding: 22px 24px;
  border-radius: 0 16px 16px 0;
  border-top-color: #dce5f1;
  border-right-color: #dce5f1;
  border-bottom-color: #dce5f1;
}

.article-page :is(.point-card, .opt-card, .check-card, .q-group, .feat-card) p {
  line-height: 1.85;
}

.article-page :is(.point-card, .opt-card, .check-card, .q-group, .feat-card) p:last-child {
  margin-bottom: 0;
}

.article-page :is(.method-card-desc, .miss-card-desc, .ai-case-desc, .check-card-desc, .tl-desc, .score-desc, .check-content p, .check-text span) {
  color: #44546b;
  font-size: 14px;
  line-height: 1.85;
}

.article-page :is(.method-card-title, .miss-card-title, .ai-case-title, .check-card-title, .check-content h4, .check-text strong, .tl-title) {
  color: #172f50;
  font-size: 16px;
  line-height: 1.75;
}

.article-page :is(.method-card-cost, .q-why) {
  color: #68788e;
  font-size: 13px;
  line-height: 1.75;
}

.article-page .article-body :is(.q-list, .check-list) {
  padding-left: 0;
}

.article-page .article-body .q-list {
  margin: 0;
}

.article-page .q-list li {
  margin: 0;
  padding-top: 14px;
  padding-bottom: 14px;
  font-size: 15px;
  line-height: 1.8;
}

.article-page .q-list li::before {
  top: 14px;
}

.article-page .check-list li {
  margin-bottom: 0;
  padding: 20px;
  border: 1px solid #dce5f1;
  border-radius: 16px;
}

.article-page .tl-item {
  gap: 18px;
  padding-bottom: 30px;
}

.article-page .tl-content { min-width: 0; }
.article-page .tl-period { font-size: 12px; }
.article-page .score-box { border-radius: 16px; }

/* Conversion and onward reading use the same restrained surface treatment. */
.article-page .article-cta {
  margin: 48px 0;
  padding: 36px;
  border: 1px solid #d3e2f7;
  border-radius: 22px;
  background: linear-gradient(135deg, #fff, #f0f6ff);
  box-shadow: 0 7px 24px rgba(23, 47, 80, .045);
}

.article-page .article-cta-icon {
  margin-bottom: 14px;
  font-size: 34px;
  line-height: 1.4;
}

.article-page .article-cta h3 {
  margin: 0 0 14px;
  font-size: clamp(20px, 2.5vw, 24px);
  line-height: 1.65;
}

.article-page .article-cta p {
  margin-bottom: 24px;
  font-size: 15px;
  line-height: 1.85;
}

.article-page .article-cta .btn {
  max-width: 100%;
  min-width: min(240px, 100%);
  white-space: normal;
  line-height: 1.6;
  padding: 16px 26px;
}

.article-page .related-articles,
.article-page .article-nav {
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid #dce5f1;
}

.article-page .related-articles h4 {
  margin-bottom: 20px;
  color: #172f50;
  font-size: 18px;
  line-height: 1.6;
}

.article-page .related-list { gap: 12px; }

.article-page .related-list a,
.article-page .article-nav a {
  padding: 18px 22px;
  border: 1px solid #dce5f1;
  border-radius: 14px;
  background: #fff;
  color: #315e9b;
  font-size: 14px;
  line-height: 1.75;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.article-page .related-list a:hover,
.article-page .article-nav a:hover {
  border-color: #a9c5ed;
  background: #f6f9ff;
  box-shadow: 0 4px 12px rgba(23, 47, 80, .035);
}

.article-page .article-nav-label {
  margin-bottom: 6px;
  color: #68788e;
  font-size: 12px;
}

.blog-page :is(a, button):focus-visible,
.article-page a:focus-visible {
  outline: 3px solid #2468db;
  outline-offset: 4px;
}

@media (max-width: 860px) {
  .blog-page .blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .blog-page .blog-wrap { padding: 32px 20px 64px; }
  .blog-page .blog-head { margin-bottom: 28px; }
  .blog-page .blog-head h1 { font-size: 27px; line-height: 1.55; }
  .blog-page .blog-head p { font-size: 14px; }
  .blog-page .blog-cats { justify-content: flex-start; padding: 20px 0; gap: 7px; }
  .blog-page .blog-cat-btn { min-height: 44px; font-size: 12px; padding: 8px 13px; }
  .blog-page .blog-grid { gap: 20px; }
  .blog-page .blog-card-body { padding: 18px; }
  .blog-page .blog-card-title { font-size: 15px; }

  .article-page .article-wrap { padding: 24px 20px 64px; }
  .article-page .breadcrumb { margin-bottom: 24px; font-size: 11px; }
  .article-page .article-header { margin-bottom: 26px; }
  .article-page .article-title { font-size: 26px; line-height: 1.6; }
  .article-page .article-thumb { margin-bottom: 32px; border-radius: 16px; }
  .article-page .article-body { font-size: 15px; line-height: 1.95; }
  .article-page .article-section { margin-bottom: 44px; }
  .article-page .article-body h2 { font-size: 22px; line-height: 1.65; }
  .article-page .article-body h3 { font-size: 17px; }
  .article-page .article-box { padding: 20px; font-size: 14px; }
  .article-page .svg-wrap { padding: 20px 16px; border-radius: 14px; }
  .article-page .svg-wrap svg { min-width: 480px; }
  .article-page .svg-caption { font-size: 12px; }

  /* Existing newer articles have a wrapper; older articles scroll the table itself. */
  .article-page .table-scroll .compare-table { min-width: 560px; }
  .article-page .article-section > .compare-table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    scrollbar-color: #a8bedb #edf2f9;
  }
  .article-page .article-section > .compare-table :is(th, td) { min-width: 150px; }
  .article-page .compare-table :is(th, td) { padding: 13px 14px; }

  .article-page .step-flow { flex-direction: column; }
  .article-page .step-flow-item { padding: 20px; }
  .article-page .step-flow-arrow { transform: rotate(90deg); justify-content: center; padding: 4px 0; }
  .article-page :is(.before-after, .method-grid, .miss-cards, .ai-cases) { grid-template-columns: 1fr; gap: 16px; }
  .article-page :is(.ba-col, .point-card, .opt-card, .q-group, .method-card, .miss-card, .ai-case, .check-item) { padding: 20px; }
  .article-page .point-card { padding-top: 24px; }
  .article-page .check-card:not(:has(> .check-item)) { padding: 20px; gap: 12px; }
  .article-page .feat-card { padding: 20px; }
  .article-page .article-cta { padding: 28px 20px; border-radius: 18px; }
  .article-page .article-cta p { font-size: 14px; }
  .article-page .article-cta .btn { font-size: 15px; }
  .article-page .article-nav { grid-template-columns: 1fr; }
  .article-page .related-list a,
  .article-page .article-nav a { padding: 16px 18px; }
}

@media (max-width: 520px) {
  .blog-page .blog-grid { grid-template-columns: minmax(0, 1fr); }
  .blog-page .blog-card-body { padding: 22px; }
  .blog-page .blog-card-title { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .blog-page :is(.blog-card, .blog-cat-btn),
  .article-page :is(.related-list a, .article-nav a) { transition: none; }
  .blog-page .blog-card:hover { transform: none; }
}
