/* スマプレトピック — editorial design system (v7)
   Typography: Noto Sans JP のみ（国内オウンドメディア型） */

:root {
  --fn-bg: #f7f9fc;
  --fn-bg-elevated: #ffffff;
  --fn-ink: #0a1628;
  --fn-ink-secondary: #334155;
  --fn-ink-muted: #64748b;
  --fn-ink-faint: #94a3b8;
  --fn-border: #e2e8f0;
  --fn-border-subtle: #eef2f7;
  --fn-primary: #1e3a8a;
  --fn-primary-soft: #eff6ff;
  --fn-accent: #635bff;
  --fn-accent-soft: #f5f3ff;
  --fn-hero-start: #0f172a;
  --fn-hero-end: #1e3a8a;
  --fn-sans: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic UI", "Meiryo", sans-serif;
  --fn-serif: var(--fn-sans);
  --fn-mono: ui-monospace, "Cascadia Code", monospace;
  --fn-shadow-xs: 0 1px 2px rgb(10 22 40 / 5%);
  --fn-shadow-sm: 0 2px 8px rgb(10 22 40 / 6%);
  --fn-shadow-md: 0 8px 24px rgb(10 22 40 / 8%);
  --fn-shadow-lg: 0 20px 48px rgb(10 22 40 / 10%);
  --fn-radius: 14px;
  --fn-radius-sm: 10px;
  --fn-radius-pill: 999px;
  --fn-content: 42rem;
  --fn-wide: 72rem;
  --fn-aside: 16.5rem;
  /* 本文イラスト — カラム全幅より一段小さく（中央） */
  --fn-figure-max: min(36rem, 92%);
  --fn-cover-max: min(56rem, 96%);
  --fn-cta-visual-max: min(40rem, 100%);
  --fn-header: 64px;
  --fn-article-dock-w: 3.5rem;
  --fn-ease: cubic-bezier(0.22, 1, 0.36, 1);

  /* legacy aliases */
  --color-bg: var(--fn-bg);
  --color-surface: var(--fn-bg-elevated);
  --color-text: var(--fn-ink);
  --color-muted: var(--fn-ink-muted);
  --color-border: var(--fn-border);
  --color-primary: var(--fn-primary);
  --color-primary-dark: #0f172a;
  --color-primary-soft: var(--fn-primary-soft);
  --font-sans: var(--fn-sans);
  --wrap: var(--fn-content);
  --wrap-wide: var(--fn-wide);
  --header-h: var(--fn-header);
  --radius: var(--fn-radius-sm);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* display:flex/grid 等が [hidden] を上書きしない（ピックアップ表示切替・検索・フィルタ） */
[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--fn-sans);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--fn-ink-secondary);
  background: var(--fn-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "palt" 1;
}

.hub-page {
  font-size: 0.9375rem;
  line-height: 1.8;
  letter-spacing: 0.01em;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--fn-primary);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color 0.15s var(--fn-ease);
}

a:hover {
  color: var(--fn-accent);
}

.wrap {
  width: min(var(--fn-content), calc(100% - 2.5rem));
  margin-inline: auto;
}

.wrap-wide {
  width: min(var(--fn-wide), calc(100% - 2.5rem));
  margin-inline: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 300;
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #fff;
  background: var(--fn-primary);
  border-radius: var(--fn-radius-sm);
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.2s var(--fn-ease);
}

.skip-link:focus {
  transform: translateY(0);
}

/* —— Header —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgb(255 255 255 / 88%);
  border-bottom: 1px solid var(--fn-border-subtle);
  backdrop-filter: blur(16px) saturate(160%);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--fn-header);
  gap: 1rem;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
  color: inherit;
}

.site-brand-mark {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.site-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.site-brand-parent {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--fn-ink-faint);
}

.site-brand-sub {
  font-family: var(--fn-sans);
  font-size: 1rem;
  font-weight: 700;
  color: var(--fn-ink);
}

.site-brand:hover .site-brand-sub {
  color: var(--fn-primary);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.site-nav a {
  color: var(--fn-ink-muted);
  text-decoration: none;
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--fn-ink);
  border-bottom-color: var(--fn-primary);
}

/* —— Buttons —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.625rem 1.25rem;
  border-radius: var(--fn-radius-pill);
  font-family: var(--fn-sans);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s var(--fn-ease), border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--fn-ink);
  color: #fff;
  box-shadow: var(--fn-shadow-xs);
}

.btn-primary:hover {
  background: var(--fn-primary);
  color: #fff;
  box-shadow: var(--fn-shadow-sm);
}

.btn-outline {
  background: var(--fn-bg-elevated);
  color: var(--fn-ink);
  border-color: var(--fn-border);
}

.btn-outline:hover {
  border-color: var(--fn-ink-faint);
  color: var(--fn-primary);
}

.btn-ghost {
  background: transparent;
  color: var(--fn-ink-muted);
  padding-inline: 0.75rem;
}

.btn-ghost:hover {
  color: var(--fn-ink);
}

.btn-block {
  display: flex;
  width: 100%;
  justify-content: center;
}

/* —— Pills —— */
.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--fn-primary);
  background: var(--fn-primary-soft);
  border-radius: var(--fn-radius-pill);
}

.pill--light {
  color: rgb(255 255 255 / 90%);
  background: rgb(255 255 255 / 12%);
}

/* —— Reading progress —— */
.read-progress {
  position: fixed;
  top: var(--fn-header);
  left: 0;
  right: 0;
  z-index: 90;
  height: 2px;
  background: var(--fn-border-subtle);
}

.read-progress span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--fn-primary), var(--fn-accent));
  transition: width 0.08s linear;
}

/* —— Article masthead —— */
.article-shell {
  padding-bottom: 4rem;
}

.article-masthead {
  padding: 0 0 2.5rem;
  border-bottom: none;
  background: var(--fn-bg);
}

.article-masthead-hero {
  padding: 2.75rem 0 2.25rem;
  background: linear-gradient(145deg, var(--fn-hero-start) 0%, var(--fn-hero-end) 55%, #1e40af 100%);
  color: rgb(255 255 255 / 92%);
}

.article-masthead-hero .breadcrumb a {
  color: rgb(255 255 255 / 65%);
}

.article-masthead-hero .breadcrumb a:hover {
  color: #fff;
}

.article-masthead-hero .breadcrumb li:not(:last-child)::after {
  color: rgb(255 255 255 / 35%);
}

.article-masthead-hero .breadcrumb li[aria-current="page"] {
  color: rgb(255 255 255 / 88%);
}

.article-masthead-hero .pill {
  color: #fff;
  background: rgb(255 255 255 / 14%);
  border: 1px solid rgb(255 255 255 / 22%);
}

.article-masthead-hero .article-meta-row {
  color: rgb(255 255 255 / 72%);
}

.article-masthead-hero .meta-dot {
  background: rgb(255 255 255 / 45%);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin: 0 0 1.25rem;
  padding: 0;
  list-style: none;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--fn-ink-faint);
}

.breadcrumb a {
  color: var(--fn-ink-muted);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--fn-primary);
}

.breadcrumb li:not(:last-child)::after {
  content: "/";
  margin-left: 0.35rem;
  color: var(--fn-border);
}

.article-eyebrow {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1rem;
}

.article-title {
  margin: 0 0 1.25rem;
  font-family: var(--fn-sans);
  font-size: clamp(1.875rem, 4.5vw, 2.625rem);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.01em;
  color: var(--fn-ink);
  max-width: 52rem;
}

.article-masthead-hero .article-title {
  color: #fff;
  font-size: clamp(2rem, 5vw, 2.875rem);
  line-height: 1.32;
  text-wrap: balance;
}

.article-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
  font-size: 0.8125rem;
  color: var(--fn-ink-muted);
}

.article-meta-row time {
  font-variant-numeric: tabular-nums;
}

.article-meta-dates {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}

.article-meta-date {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
}

.article-meta-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--fn-ink-faint);
}

.meta-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--fn-ink-faint);
}

.article-cover {
  margin-top: -1.25rem;
  margin-inline: auto;
  max-width: var(--fn-cover-max);
  position: relative;
  z-index: 1;
  border-radius: var(--fn-radius);
  overflow: hidden;
  box-shadow: var(--fn-shadow-lg);
  border: 3px solid var(--fn-bg-elevated);
}

.article-cover img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.cover-placeholder {
  aspect-ratio: 16 / 9;
  background:
    linear-gradient(135deg, rgb(30 58 138 / 8%) 0%, rgb(99 91 255 / 6%) 100%),
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 12px,
      rgb(255 255 255 / 35%) 12px,
      rgb(255 255 255 / 35%) 24px
    );
}

/* —— Two-column article layout —— */
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--fn-aside);
  gap: 3rem;
  align-items: start;
  padding-top: 2.5rem;
}

.article-main {
  min-width: 0;
}

.article-lead {
  margin: 0 0 2rem;
  font-size: 1.0625rem;
  line-height: 1.9;
  color: var(--fn-ink);
  font-weight: 400;
}

.article-body {
  font-size: 1rem;
  line-height: 1.9;
}

.article-body h2 {
  margin: 3.25rem 0 1.125rem;
  padding: 0 0 0.65rem;
  font-family: var(--fn-sans);
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.015em;
  color: var(--fn-ink);
  border-bottom: 1px solid var(--fn-border);
  scroll-margin-top: calc(var(--fn-header) + 1.5rem);
}

.article-body h2:first-child {
  margin-top: 0;
}

.article-body h3 {
  margin: 2.5rem 0 0.875rem;
  padding: 0.625rem 0 0.625rem 0.875rem;
  font-family: var(--fn-sans);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.01em;
  color: var(--fn-ink);
  background: var(--fn-bg);
  border-left: 3px solid var(--fn-primary);
  border-radius: 0 var(--fn-radius-sm) var(--fn-radius-sm) 0;
  scroll-margin-top: calc(var(--fn-header) + 1.5rem);
}

.article-body h3:first-of-type {
  margin-top: 2rem;
}

.article-body p {
  margin: 0 0 1.25rem;
}

.article-body ul,
.article-body ol {
  margin: 0 0 1.25rem;
  padding-left: 1.375rem;
}

.article-body li {
  margin-bottom: 0.5rem;
}

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

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

.article-body a {
  font-weight: 500;
}

/* —— Table (comparison / data) —— */
.table-wrap {
  margin: 1.5rem 0 2rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--fn-border);
  border-radius: var(--fn-radius-sm);
  box-shadow: var(--fn-shadow-xs);
  background: var(--fn-bg-elevated);
}

.table-wrap--comparison {
  background:
    linear-gradient(to right, var(--fn-bg-elevated) 30%, rgb(255 255 255 / 0%)),
    linear-gradient(to right, rgb(255 255 255 / 0%), var(--fn-bg-elevated) 70%) 100% 0 / 12% 100% no-repeat;
  background-color: var(--fn-bg-elevated);
}

.table-scroll-hint {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  color: var(--fn-ink-faint);
  text-align: right;
}

@media (min-width: 960px) {
  .table-scroll-hint {
    display: none;
  }
}

.article-body table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.table-wrap--comparison table {
  min-width: 44rem;
  table-layout: fixed;
}

.table-wrap--comparison table[data-cols="4"] {
  min-width: 48rem;
}

.table-wrap--comparison table[data-cols="5"] {
  min-width: 52rem;
}

.table-wrap--comparison table[data-cols="4"] thead th,
.table-wrap--comparison table[data-cols="5"] thead th {
  white-space: normal;
  line-height: 1.35;
  word-break: break-word;
}

.article-body th,
.article-body td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--fn-border);
  text-align: left;
  vertical-align: top;
}

.article-body th:not(:last-child),
.article-body td:not(:last-child) {
  border-right: 1px solid var(--fn-border-subtle);
}

.article-body tr:last-child th,
.article-body tr:last-child td {
  border-bottom: none;
}

.article-body thead th {
  background: var(--fn-primary-soft);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--fn-ink);
  border-bottom: 2px solid rgb(30 58 138 / 18%);
  white-space: nowrap;
}

.table-wrap--comparison thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  box-shadow: 0 1px 0 var(--fn-border);
  white-space: normal;
  line-height: 1.35;
  word-break: break-word;
  hyphens: auto;
}

.article-body tbody tr:nth-child(even) td {
  background: rgb(247 249 252 / 85%);
}

.article-body tbody tr:hover td {
  background: rgb(239 246 255 / 75%);
}

.article-body tbody td {
  line-height: 1.65;
  color: var(--fn-ink-secondary);
  font-size: 0.875rem;
}

.article-body tbody td:first-child {
  font-weight: 600;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--fn-ink);
  background: rgb(248 250 252 / 90%);
}

.article-body tbody tr:nth-child(even) td:first-child {
  background: rgb(241 245 249 / 95%);
}

.article-body tbody tr:hover td:first-child {
  background: rgb(226 232 240 / 55%);
}

.table-wrap--comparison td:nth-child(4) {
  background: rgb(255 251 235 / 35%);
}

.table-wrap--comparison tbody tr:nth-child(even) td:nth-child(4) {
  background: rgb(254 243 199 / 22%);
}

.table-wrap--comparison tbody tr:hover td:nth-child(4) {
  background: rgb(254 243 199 / 45%);
}

.article-body .table-note {
  margin: 0.75rem 0 0;
  font-size: 0.8125rem;
  color: var(--fn-ink-muted);
}

/* —— FAQ cards —— */
.article-faq {
  margin: 3rem 0;
  padding: 0;
}

.article-faq > h2 {
  margin-top: 0 !important;
}

.faq-item {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--fn-border-subtle);
}

.faq-item:first-of-type {
  padding-top: 0;
}

.faq-item h3 {
  margin: 0 0 0.75rem;
  padding: 0.65rem 0.875rem;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.55;
  color: var(--fn-ink);
  background: var(--fn-bg);
  border: 1px solid var(--fn-border-subtle);
  border-radius: var(--fn-radius-sm);
}

.faq-item h3::before {
  content: "Q. ";
  color: var(--fn-primary);
}

.faq-item p {
  margin: 0;
  padding: 0 0 0 0.125rem;
  font-size: 0.9875rem;
  line-height: 1.75;
  color: var(--fn-ink-secondary);
}

.faq-item p::before {
  content: "A. ";
  font-weight: 700;
  color: var(--fn-ink-muted);
}

.article-related {
  margin: 2.5rem 0 0;
  padding: 1.25rem 1.375rem;
  border: 1px solid var(--fn-border-subtle);
  border-radius: var(--fn-radius-sm);
  background: var(--fn-bg);
}

.article-related h2 {
  margin: 0 0 0.875rem !important;
  padding: 0 !important;
  border: none !important;
  font-size: 1.0625rem !important;
}

.article-related ul {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.9375rem;
  line-height: 1.7;
}

.article-related li + li {
  margin-top: 0.5rem;
}

/* —— Aside (sticky TOC + CTA) —— */
.article-aside {
  position: sticky;
  top: calc(var(--fn-header) + 1.5rem);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.aside-panel {
  padding: 1.25rem;
  background: var(--fn-bg-elevated);
  border: 1px solid var(--fn-border-subtle);
  border-radius: var(--fn-radius-sm);
  box-shadow: var(--fn-shadow-xs);
}

.aside-panel-title {
  margin: 0 0 0.875rem;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--fn-ink-faint);
}

.article-toc-list {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.8125rem;
  line-height: 1.5;
}

.article-toc-list li + li {
  margin-top: 0.5rem;
}

.article-toc-list a {
  display: block;
  padding: 0.35rem 0.75rem;
  color: var(--fn-ink-muted);
  text-decoration: none;
  border-radius: var(--fn-radius-sm);
  transition: color 0.15s, background 0.15s;
}

.article-toc-list a:hover {
  color: var(--fn-primary);
  background: rgb(30 58 138 / 6%);
}

.article-toc-list a.is-active {
  color: var(--fn-primary);
  font-weight: 600;
  background: var(--fn-accent-soft);
}

.aside-cta-text {
  margin: 0 0 1rem;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--fn-ink-muted);
}

.aside-cta-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.aside-cta-actions .btn {
  width: 100%;
}

/* —— Sidebar service CTA（目次の下・aside 内） —— */
.article-sidebar-cta {
  position: relative;
  background: #f8fafc;
  border-color: rgb(30 58 138 / 28%);
}

.article-sidebar-cta.is-dismissed {
  display: none !important;
}

.article-sidebar-cta__close {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: none;
  border-radius: var(--fn-radius-sm);
  background: transparent;
  color: var(--fn-ink-faint);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.article-sidebar-cta__close:hover {
  color: var(--fn-ink);
  background: rgb(15 23 42 / 6%);
}

.article-sidebar-cta__label {
  margin: 0 0 0.35rem;
  padding-right: 1.75rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fn-primary);
}

.article-sidebar-cta__title {
  margin: 0 0 0.5rem;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.45;
  color: var(--fn-ink);
}

.article-sidebar-cta__text {
  margin: 0 0 1rem;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--fn-ink);
}

/* —— 右端固定: PonTap 型 縦ドック（3秒後に表示） —— */
.article-cta-dock {
  position: fixed;
  top: 50%;
  right: env(safe-area-inset-right, 0);
  z-index: 35;
  display: flex;
  flex-direction: column;
  width: var(--fn-article-dock-w);
  border-radius: var(--fn-radius-sm) 0 0 var(--fn-radius-sm);
  overflow: hidden;
  border: 1px solid rgb(30 58 138 / 35%);
  border-right: none;
  box-shadow: -4px 10px 28px rgb(15 23 42 / 16%);
  transform: translate(100%, -50%);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.article-cta-dock[hidden],
.article-cta-dock.is-dismissed {
  display: none !important;
}

.article-cta-dock.is-visible {
  pointer-events: auto;
  transform: translate(0, -50%);
}

.article-cta-dock__close {
  margin: 0;
  padding: 0.35rem 0;
  border: none;
  background: #f1f5f9;
  color: var(--fn-ink-faint);
  font-size: 1.125rem;
  line-height: 1;
  cursor: pointer;
}

.article-cta-dock__close:hover {
  background: #e2e8f0;
  color: var(--fn-ink);
}

.article-cta-dock__close:focus-visible {
  outline: 2px solid var(--fn-primary);
  outline-offset: -2px;
}

.article-cta-dock__link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.625rem;
  padding: 0.875rem 0.375rem 1.25rem;
  text-decoration: none;
  color: #fff;
  font-weight: 800;
  font-size: 0.6875rem;
  letter-spacing: 0.05em;
  line-height: 1.35;
  background: linear-gradient(180deg, #1e3a8a 0%, #0078c8 52%, #0d9488 100%);
}

.article-cta-dock__link:hover,
.article-cta-dock__link:focus,
.article-cta-dock__link:visited,
.article-cta-dock__link:active {
  color: #fff;
  text-decoration: none;
}

.article-cta-dock__link:hover {
  filter: brightness(1.08);
}

.article-cta-dock__link:focus-visible {
  outline: 3px solid #fff;
  outline-offset: -3px;
}

.article-cta-dock__badge {
  flex-shrink: 0;
  padding: 0.15rem 0.45rem;
  border-radius: var(--fn-radius-pill);
  background: rgb(255 255 255 / 24%);
  border: 1px solid rgb(255 255 255 / 45%);
  font-size: 0.5625rem;
  font-weight: 900;
  writing-mode: horizontal-tb;
}

.article-cta-dock__label {
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

/* ドック表示時もレイアウトは動かさない（fixed で目次等に重ねてよい） */

@media (max-width: 960px) {
  .article-cta-dock__close {
    min-height: 44px;
    padding: 0.5rem 0;
  }

  .article-cta-dock__link {
    min-height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .article-cta-dock {
    transition: none;
  }
}

/* —— Mobile TOC —— */
.toc-mobile {
  display: none;
  margin-bottom: 2rem;
}

/* —— Callout (Stripe / Intercom pattern) —— */
.callout {
  margin: 0 0 2rem;
  padding: 1.25rem 1.375rem;
  border-radius: var(--fn-radius-sm);
  border: 1px solid var(--fn-border);
  background: var(--fn-bg-elevated);
  box-shadow: var(--fn-shadow-xs);
}

.callout--key {
  border-color: rgb(99 102 241 / 22%);
  background: var(--fn-accent-soft);
}

.callout-label {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--fn-accent);
}

.callout p:last-child {
  margin: 0;
  font-size: 0.9875rem;
  line-height: 1.7;
  color: var(--fn-ink-secondary);
}

/* —— Step list (decision flow) —— */
.step-list {
  margin: 0 0 2rem;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.step-list li {
  position: relative;
  margin: 0 0 0.875rem;
  padding: 1rem 1.125rem 1rem 3.25rem;
  background: var(--fn-bg-elevated);
  border: 1px solid var(--fn-border-subtle);
  border-radius: var(--fn-radius-sm);
  counter-increment: step;
}

.step-list li::before {
  content: counter(step);
  position: absolute;
  left: 1rem;
  top: 1rem;
  display: grid;
  place-items: center;
  width: 1.625rem;
  height: 1.625rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  background: var(--fn-primary);
  border-radius: 50%;
}

/* —— Checklist —— */
.checklist {
  margin: 0 0 2rem;
  padding: 0;
  list-style: none;
}

.checklist li {
  position: relative;
  margin: 0 0 0.625rem;
  padding-left: 1.75rem;
  line-height: 1.65;
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.75rem;
  height: 0.75rem;
  border: 2px solid var(--fn-primary);
  border-radius: 3px;
  background: var(--fn-primary-soft);
}

/* —— Figure —— */
.article-figure {
  margin: 2rem auto;
  max-width: var(--fn-figure-max);
}

.article-figure img {
  width: 100%;
  border-radius: var(--fn-radius-sm);
  border: 1px solid var(--fn-border-subtle);
  box-shadow: var(--fn-shadow-sm);
}

.article-figure figcaption {
  margin-top: 0.625rem;
  font-size: 0.8125rem;
  color: var(--fn-ink-muted);
  text-align: center;
}

.cta-band .article-figure--cta {
  margin: 1.5rem auto 0;
  max-width: var(--fn-cta-visual-max);
}

.cta-band .article-figure--cta img {
  border: none;
}

/* CTA banner — 画像全体リンク */
.cta-visual-link {
  display: block;
  max-width: var(--fn-cta-visual-max);
  margin-inline: auto;
  line-height: 0;
  border-radius: var(--fn-radius-sm);
  transition: box-shadow 0.15s var(--fn-ease), transform 0.15s var(--fn-ease);
}

.cta-visual-link img {
  width: 100%;
  border-radius: var(--fn-radius-sm);
}

.cta-visual-link:hover,
.cta-visual-link:focus-visible {
  box-shadow: var(--fn-shadow-md);
  transform: translateY(-1px);
}

/* —— Link preview card (OGP 型 · 事例・外部参照) —— */
.link-preview {
  display: grid;
  grid-template-columns: minmax(0, 11rem) minmax(0, 1fr);
  gap: 0;
  margin: 1.5rem 0 2rem;
  border: 1px solid var(--fn-border);
  border-radius: var(--fn-radius-sm);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  background: var(--fn-bg-elevated);
  box-shadow: var(--fn-shadow-xs);
  transition: border-color 0.15s var(--fn-ease), box-shadow 0.15s var(--fn-ease);
}

.link-preview:hover {
  border-color: rgb(30 58 138 / 25%);
  box-shadow: var(--fn-shadow-sm);
}

.link-preview-media {
  display: block;
  background: var(--fn-border-subtle);
  min-height: 100%;
}

.link-preview-media img {
  width: 100%;
  height: 100%;
  min-height: 6.5rem;
  object-fit: cover;
  border: none;
  box-shadow: none;
}

.link-preview-body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.875rem 1rem;
  justify-content: center;
}

.link-preview-site {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fn-ink-faint);
}

.link-preview-title {
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.45;
  color: var(--fn-ink);
}

.link-preview-desc {
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--fn-ink-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 520px) {
  .link-preview {
    grid-template-columns: 1fr;
  }

  .link-preview-media img {
    min-height: 9rem;
    aspect-ratio: 16 / 9;
  }
}

/* —— CTA bands —— */
.cta-band {
  margin: 3rem 0 0;
  padding: 2rem;
  background: var(--fn-bg-elevated);
  border: 1px solid var(--fn-border);
  border-radius: var(--fn-radius);
  box-shadow: var(--fn-shadow-sm);
}

.cta-band-label {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--fn-ink-faint);
}

.cta-band h2 {
  margin: 0 0 0.75rem;
  font-family: var(--fn-sans);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.55;
  letter-spacing: 0.02em;
  color: var(--fn-ink);
}

.cta-band p {
  margin: 0 0 1.25rem;
  font-size: 0.9375rem;
  color: var(--fn-ink-muted);
}

.cta-band-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.cta-band--service {
  background: linear-gradient(135deg, var(--fn-primary-soft) 0%, var(--fn-bg-elevated) 100%);
  border-color: rgb(30 58 138 / 15%);
}

.cta-band--compact {
  margin: 2.5rem 0 0;
  padding: 1.25rem 1.375rem;
}

.cta-band--inline {
  border-style: dashed;
  border-color: rgb(30 58 138 / 22%);
  background: rgb(30 58 138 / 4%);
  box-shadow: none;
}

.cta-band--inline.cta-band--convert {
  border-style: solid;
  border-color: rgb(30 58 138 / 22%);
  background: linear-gradient(
    105deg,
    rgb(30 58 138 / 10%) 0%,
    var(--fn-bg-elevated) 42%,
    rgb(13 148 136 / 8%) 100%
  );
  box-shadow: 0 2px 10px rgb(15 23 42 / 8%);
}

.cta-band--convert {
  position: relative;
  margin: 2.25rem 0 0;
  padding: 1.375rem 1.25rem 1.25rem 1.375rem;
  border: 1px solid rgb(30 58 138 / 22%);
  border-radius: var(--fn-radius);
  text-align: center;
}

.cta-band--convert::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.875rem;
  bottom: 0.875rem;
  width: 4px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, var(--fn-primary) 0%, var(--fn-accent) 100%);
}

.cta-band-convert-lead {
  margin: 0 0 1rem;
  font-family: var(--fn-sans);
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.65;
  color: var(--fn-ink);
}

.cta-band-convert-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.625rem;
}

.cta-band-convert-actions .btn-sm {
  padding: 0.5625rem 1.125rem;
  font-size: 0.8125rem;
  border-radius: var(--fn-radius-pill);
}

.cta-band--compact .cta-band__compact-title {
  margin: 0 0 0.5rem;
  font-family: var(--fn-sans);
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.45;
  color: var(--fn-ink);
}

.cta-band--compact p:last-of-type {
  margin-bottom: 1rem;
}

/* —— Related —— */
.related-articles {
  margin: 3rem 0 0;
  padding-top: 2rem;
  border-top: 1px solid var(--fn-border-subtle);
}

.related-articles h2 {
  margin: 0 0 1rem;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--fn-ink-faint);
}

.related-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.75rem;
}

.related-list a {
  display: block;
  padding: 1rem 1.125rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--fn-ink);
  text-decoration: none;
  background: var(--fn-bg-elevated);
  border: 1px solid var(--fn-border-subtle);
  border-radius: var(--fn-radius-sm);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.related-list a:hover {
  border-color: var(--fn-border);
  box-shadow: var(--fn-shadow-xs);
  color: var(--fn-primary);
}

/* —— Footer —— */
.site-footer {
  margin-top: 0;
  padding: 3rem 0 2.5rem;
  background: var(--fn-ink);
  color: rgb(255 255 255 / 72%);
  font-size: 0.8125rem;
}

.site-footer a {
  color: rgb(255 255 255 / 72%);
  text-decoration: none;
}

.site-footer a:hover {
  color: #fff;
}

.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgb(255 255 255 / 10%);
}

.site-footer small {
  color: rgb(255 255 255 / 45%);
}

@media (max-width: 960px) {
  html {
    overflow-x: clip;
  }

  main.article-shell {
    overflow-x: clip;
    max-width: 100%;
  }

  .wrap-wide,
  .wrap {
    width: 100%;
    max-width: 100%;
    padding-inline: max(1rem, env(safe-area-inset-left, 0px))
      max(1rem, env(safe-area-inset-right, 0px));
  }

  .table-wrap {
    max-width: 100%;
    overflow-x: auto;
  }

  .article-body {
    overflow-wrap: break-word;
  }

  .article-layout {
    grid-template-columns: 1fr;
    gap: 0;
    min-width: 0;
  }

  .article-aside {
    display: none;
  }

  .toc-mobile {
    display: block;
    max-width: 100%;
  }

  .article-masthead {
    padding-top: 1.75rem;
  }
}

@media (max-width: 480px) {
  .article-cta-dock__label {
    font-size: 0.625rem;
  }
}

@media (max-width: 640px) {
  .site-nav .nav-hide-mobile {
    display: none;
  }

  .article-title {
    font-size: 1.625rem;
  }

  .cta-band-actions {
    flex-direction: column;
  }

  .cta-band-actions .btn {
    width: 100%;
  }
}
