/* EMW blog styles — ブログ一覧・記事ページ共通（2026-07-05集約） */
.article-hero {
  padding: 9rem 2rem 3.5rem;
  background: var(--navy-900);
  position: relative; overflow: hidden;
}
.article-hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 70% 40%, rgba(30,77,120,0.4), transparent);
}
.article-hero-inner { max-width: 760px; margin: 0 auto; position: relative; z-index: 2; }
.article-hero .meta { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 1rem; }
.article-hero .date { font-family: var(--font-en); font-size: 0.85rem; color: var(--gray-400); }
.article-hero .tag {
  font-size: 0.72rem; font-weight: 600; color: #9ed0ff;
  background: rgba(13,42,76,0.6); border: 1px solid rgba(130,173,228,0.5);
  border-radius: 999px; padding: 0.2rem 0.7rem;
}
.article-hero h1 {
  font-size: clamp(1.6rem, 3.5vw, 2.3rem); font-weight: 700;
  color: var(--white); line-height: 1.45;
}

.article-body { max-width: 760px; margin: 0 auto; padding: 4rem 2rem 5rem; }
.article-body > p { margin-bottom: 1.5rem; color: var(--gray-600); }
.article-body .lead { font-size: 1.02rem; color: var(--navy-800); }
.article-body h2 {
  font-size: 1.3rem; font-weight: 700; color: var(--navy-900);
  margin: 3rem 0 1rem; padding-left: 0.9rem;
  border-left: 4px solid var(--accent); line-height: 1.5;
}
.article-body h2 .num { font-family: var(--font-en); color: var(--accent); margin-right: 0.4rem; }
.article-body h3 { font-size: 1.05rem; font-weight: 700; color: var(--navy-800); margin: 2rem 0 0.75rem; }
.article-body ul { margin: 0 0 1.5rem 1.4rem; color: var(--gray-600); }
.article-body li { margin-bottom: 0.4rem; }
.article-body a { color: var(--accent); }
/* 記事本文内のボタンは上のリンク色に負けないよう明示（青背景に青文字＝不可視バグの対策） */
.article-body a.btn-primary { color: var(--white); }
.article-body a.btn-outline { color: var(--accent); }
.point-box {
  background: #f5f9ff; border: 1px solid #d4e4f8; border-radius: 12px;
  padding: 1.1rem 1.4rem; margin: 1.25rem 0 1.75rem;
  font-size: 0.92rem; color: #275485; line-height: 1.85;
}
.point-box strong { color: #1f4f84; }

.arch-figure {
  background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: 12px;
  padding: 1.4rem 1.25rem 1rem; margin: 1.5rem 0 2rem;
}
.arch-figure svg { width: 100%; height: auto; display: block; }
.arch-figure figcaption { font-size: 0.75rem; color: var(--gray-500); margin-top: 0.75rem; text-align: center; }

.read-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  z-index: 200;
}
.share-row { margin-top: 2.5rem; display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.share-label { font-size: 0.8rem; color: var(--gray-500); margin-right: 0.2rem; }
.share-btn {
  font-family: var(--font-jp); font-size: 0.8rem; font-weight: 500; color: var(--gray-600);
  background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: 999px;
  padding: 0.45rem 1rem; text-decoration: none; cursor: pointer; transition: all 0.2s;
}
.share-btn:hover { border-color: var(--accent); color: var(--accent); }

.article-cta {
  margin-top: 3.5rem; padding: 2rem;
  background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: 14px;
  text-align: center;
}
.article-cta p { color: var(--gray-600); font-size: 0.95rem; margin-bottom: 1.25rem; }

.back-link {
  display: inline-block; margin-top: 2.5rem;
  font-family: var(--font-en); font-size: 0.85rem; font-weight: 600;
  color: var(--accent); text-decoration: none;
}
.back-link:hover { color: var(--navy-800); }









@media (max-width: 768px) {
  .header-inner { height: 64px; }
  .article-hero { padding: 7.5rem 1.5rem 2.5rem; }
  .article-body { padding: 3rem 1.5rem 4rem; }
}

.year-table-wrap { overflow-x: auto; margin: 1.5rem 0 2rem; position: relative; left: 50%; transform: translateX(-50%); width: min(900px, calc(100vw - 3rem)); }
.year-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; min-width: 560px; }
.year-table th {
  font-family: var(--font-en); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--gray-500); text-align: left;
  padding: 0.6rem 0.9rem; border-bottom: 2px solid var(--gray-200); white-space: nowrap;
}
.year-table td { padding: 0.8rem 0.9rem; border-bottom: 1px solid var(--gray-200); color: var(--gray-600); vertical-align: top; line-height: 1.7; }
.year-table td:first-child { font-family: var(--font-en); font-weight: 700; color: var(--navy-900); white-space: nowrap; }
.year-table tr:last-child td { border-bottom: none; }
.year-table .hl { color: var(--accent); font-weight: 700; }

.flow-figure {
  background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: 12px;
  padding: 1.4rem 1.25rem 1rem; margin: 1.5rem 0 2rem;
}
.flow-figure svg { width: 100%; height: auto; display: block; }
.flow-figure figcaption { font-size: 0.75rem; color: var(--gray-500); margin-top: 0.75rem; text-align: center; }

.sources { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--gray-200); }
.sources h4 { font-size: 0.85rem; font-weight: 700; color: var(--gray-500); margin-bottom: 0.6rem; }
.sources ul { margin-left: 1.2rem; }
.sources li { font-size: 0.8rem; color: var(--gray-500); margin-bottom: 0.3rem; }
.sources a { color: var(--accent); text-decoration: none; }
.sources a:hover { text-decoration: underline; }

.reveal.visible { opacity: 1; transform: translateY(0); }





/* Blog list */
.post-list { max-width: 800px; display: grid; gap: 1.25rem; }
.post-card {
  display: block; text-decoration: none; color: inherit;
  background: var(--gray-50); border: 1px solid var(--gray-100); border-radius: 12px;
  padding: 1.75rem 2rem; transition: all 0.3s ease;
}
.post-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(10,22,40,0.08);
  border-color: var(--gray-200);
}
.post-meta { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 0.6rem; }
.post-date { font-family: var(--font-en); font-size: 0.8rem; color: var(--gray-400); }
.post-tag {
  font-size: 0.7rem; font-weight: 600; color: #1f4f84;
  background: #eaf3ff; border: 1px solid #c9dcf5; border-radius: 999px;
  padding: 0.15rem 0.6rem;
}
.post-card h2 { font-size: 1.15rem; font-weight: 700; color: var(--navy-900); margin-bottom: 0.5rem; line-height: 1.5; }
.post-card p { font-size: 0.9rem; color: var(--gray-500); line-height: 1.8; }
.post-more { font-family: var(--font-en); font-size: 0.8rem; font-weight: 600; color: var(--accent); margin-top: 0.75rem; display: inline-block; }
.coming-soon {
  max-width: 800px; margin-top: 2rem; padding: 1.25rem 1.5rem;
  border: 1px dashed var(--gray-300); border-radius: 12px;
  color: var(--gray-500); font-size: 0.88rem;
}



@media (max-width: 768px) {
  .header-inner { height: 64px; }
  nav {
    position: fixed; inset: 0;
    background: rgba(255,255,255,0.98); backdrop-filter: blur(20px);
    flex-direction: column; justify-content: center; gap: 2rem;
    transform: translateX(100%); transition: transform 0.4s ease;
  }
  nav.open { transform: translateX(0); }
  nav a { font-size: 1.1rem; }
  .menu-toggle { display: block; }
  section { padding: 4rem 1.5rem; }
  .page-hero { padding: 8rem 1.5rem 3rem; }
  .post-card { padding: 1.4rem 1.5rem; }
}

.article-body code { font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace; font-size: 0.86em; background: #eef2f7; color: #1f4f84; padding: 0.12em 0.42em; border-radius: 4px; border: 1px solid #e2e8f0; }
.article-body pre { overflow-x: auto; background: #0f2038; color: #e6edf3; padding: 1rem 1.15rem; border-radius: 8px; font-size: 0.82rem; line-height: 1.7; margin: 1.3rem 0; -webkit-overflow-scrolling: touch; }
.article-body pre code { background: none; border: none; color: inherit; padding: 0; font-size: inherit; }
.article-body .hl { color: var(--accent); font-weight: 700; }

/* ===== マルチクラウド対応表（AWS/Azure/GCP/オンプレ 比較） ===== */
.cmp-wrap { overflow-x: auto; margin: 1.4rem 0 0.4rem; -webkit-overflow-scrolling: touch; border: 1px solid var(--gray-200); border-radius: 10px; position: relative; left: 50%; transform: translateX(-50%); width: min(900px, calc(100vw - 3rem)); }
.cmp-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; min-width: 640px; }
.cmp-table thead th { font-size: 0.8rem; font-weight: 700; color: #fff; padding: 0.6rem 0.85rem; text-align: left; letter-spacing: .01em; }
.cmp-table th.c-cat { background: var(--navy-700); }
.cmp-table th.c-aws { background: #ec7211; }
.cmp-table th.c-azure { background: #0078d4; }
.cmp-table th.c-gcp { background: #1a73e8; }
.cmp-table th.c-onprem { background: #5b6b7d; }
.cmp-table tbody td { padding: 0.62rem 0.85rem; border-top: 1px solid var(--gray-200); color: var(--gray-600); vertical-align: top; line-height: 1.6; }
.cmp-table tbody td:first-child { font-weight: 700; color: var(--navy-900); }
.cmp-table tbody tr:nth-child(even) { background: var(--gray-50); }
.cmp-table .dash { color: var(--gray-300); }
.cmp-table .em { color: var(--accent); font-weight: 600; }
.cmp-note { background: #f5f9ff; border: 1px solid #d4e4f8; border-left: 3px solid var(--accent); border-radius: 0 8px 8px 0; padding: 0.7rem 1rem; margin: 0.55rem 0 2rem; font-size: 0.84rem; color: #275485; line-height: 1.85; }
.cmp-note strong { color: var(--navy-900); }
.cmp-legend { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; margin: 0.4rem 0 0; font-size: 0.76rem; color: var(--gray-500); }
.cmp-legend span { display: inline-flex; align-items: center; gap: 0.35rem; }
.cmp-legend i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
@media (max-width: 640px) { .cmp-table { font-size: 0.8rem; } }

/* ===== 記事末尾のFAQ ===== */
.faq-item { margin: 0 0 1.15rem; padding-bottom: 1.15rem; border-bottom: 1px solid var(--gray-100); }
.faq-item:last-child { border-bottom: none; }
.faq-item .q { font-weight: 700; color: var(--navy-900); margin-bottom: 0.4rem; line-height: 1.7; }
.faq-item .q::before { content: "Q. "; color: var(--accent); font-weight: 700; }
.faq-item .a { color: var(--gray-600); line-height: 1.9; }
.faq-item .a::before { content: "A. "; color: var(--gray-400); font-weight: 700; margin-right: 0.15rem; }

/* ============================================================
   SAFE PASTE — コード窓（blog.js が pre を figure.code-window に昇格）
   ------------------------------------------------------------
   CLS 対策: ラップは blog.js の1回の同期パスで完結する。
   .code-window の margin を素の pre と同値(1.3rem)に保って前後の
   間隔を変えず、ヘッダ高(2.25rem)は pre の上下 padding を
   1rem→0.5rem/0.85rem に削って相殺し、位置ずれを最小化する。
   no-JS 時は以下のセレクタは一切マッチしない（素の pre のまま）。
   ============================================================ */
.code-window {
  --cw-head-h: 2.25rem; /* ヘッダ行の高さ */
  --cw-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  position: relative; margin: 1.3rem 0; border-radius: 8px;
}
.code-window pre,
.article-body .code-window pre {
  margin: 0; padding: 0.5rem 1.15rem 0.85rem; border-radius: 0 0 8px 8px;
  overflow-x: auto; background: var(--navy-800); color: #e6edf3;
  font-size: 0.82rem; line-height: 1.7; -webkit-overflow-scrolling: touch;
}
/* ヘッダ行（言語ラベル＋状態表示＋コピーボタン） */
.code-window figcaption {
  display: flex; align-items: center; gap: 0.55rem;
  height: var(--cw-head-h); padding: 0 0.35rem 0 0.9rem;
  background: linear-gradient(180deg, #16304f, var(--navy-800));
  border-bottom: 1px solid rgba(91, 166, 245, 0.22);
  border-radius: 8px 8px 0 0;
}
/* 窓の左端3点（ターミナル風の控えめな意匠） */
.cw-dots { display: inline-flex; gap: 5px; flex-shrink: 0; }
.cw-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(139, 163, 190, 0.35); }
/* ラベルが余白を担い、状態表示・バッジ・ボタンを右端に寄せる
   （.cw-status は480px以下で display:none になるため余白役にしない） */
.cw-label {
  flex: 1 1 auto; min-width: 0;
  font-family: var(--cw-mono); font-size: 0.68rem; letter-spacing: 0.06em;
  color: #9fc1e8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* コピー結果メッセージ（aria-live） */
.cw-status {
  flex-shrink: 1; font-family: var(--font-jp); font-size: 0.68rem;
  color: var(--accent-light); white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; opacity: 0; transition: opacity 0.25s ease;
}
.cw-status.show { opacity: 1; }
/* BLAST RADIUS バッジ（著者明示タグ data-impact="destructive" のみ） */
.cw-badge {
  flex-shrink: 0; font-family: var(--font-en); font-size: 0.62rem; font-weight: 700;
  letter-spacing: 0.1em; color: var(--gold); white-space: nowrap;
  border: 1px solid rgba(201, 168, 76, 0.55); background: rgba(201, 168, 76, 0.08);
  padding: 0.16rem 0.5rem; border-radius: 3px;
}
.cw-badge::before { content: "▲ "; font-size: 0.58rem; }
/* コピーボタン: hover依存にせず常時表示。::afterで縦のタップ領域を拡張 */
.cw-copy {
  flex-shrink: 0; align-self: stretch; position: relative; min-width: 2.75rem;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem;
  background: none; border: none; cursor: pointer; padding: 0 0.65rem;
  font-family: var(--font-en); font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.1em; color: #bcd3ec; border-radius: 6px;
}
.cw-copy::after { content: ""; position: absolute; inset: -5px 0; }
.cw-copy:hover { color: #fff; background: rgba(91, 166, 245, 0.14); }
.cw-copy:focus-visible { outline: 2px solid var(--accent-light); outline-offset: -2px; }
.cw-copy svg { width: 13px; height: 13px; }
.cw-copy.done { color: #7fd4ae; }
.code-window.is-destructive .cw-copy.done { color: var(--gold); }
/* destructive 窓はヘッダ下端に赤金の帯を常時1本 */
.code-window.is-destructive figcaption {
  border-bottom: 1px solid rgba(201, 168, 76, 0.6);
  background: linear-gradient(180deg, #1c2c42, #241f2e);
}
/* コピー成功の一瞬のフラッシュ（通常=青 / destructive=赤金） */
@keyframes cwFlash {
  0% { box-shadow: 0 0 0 1px rgba(45, 140, 240, 0); }
  25% { box-shadow: 0 0 0 2px rgba(45, 140, 240, 0.75), 0 0 22px rgba(45, 140, 240, 0.35); }
  100% { box-shadow: 0 0 0 1px rgba(45, 140, 240, 0); }
}
@keyframes cwFlashDanger {
  0% { box-shadow: 0 0 0 1px rgba(201, 168, 76, 0); }
  25% { box-shadow: 0 0 0 2px rgba(190, 70, 60, 0.8), 0 0 24px rgba(201, 168, 76, 0.45); }
  100% { box-shadow: 0 0 0 1px rgba(201, 168, 76, 0); }
}
.code-window.flash { animation: cwFlash 0.7s ease-out; }
.code-window.is-destructive.flash { animation: cwFlashDanger 0.9s ease-out; }
/* 横スクロール可能な窓のエッジフェード（モバイル配慮、blog.jsが切替） */
.cw-fade-l, .cw-fade-r {
  position: absolute; top: var(--cw-head-h); bottom: 0; width: 26px;
  pointer-events: none; opacity: 0; transition: opacity 0.2s ease;
}
.cw-fade-l { left: 0; border-radius: 0 0 0 8px; background: linear-gradient(90deg, var(--navy-800), rgba(15, 32, 56, 0)); }
.cw-fade-r { right: 0; border-radius: 0 0 8px 0; background: linear-gradient(270deg, var(--navy-800), rgba(15, 32, 56, 0)); }
.code-window.can-scroll-l .cw-fade-l, .code-window.can-scroll-r .cw-fade-r { opacity: 1; }
/* モバイル（375px想定）: 結果はボタンのCOPIED変化で伝え、バッジは短縮表記 */
@media (max-width: 480px) {
  .cw-label { font-size: 0.62rem; }
  .cw-status { display: none; }
  .cw-badge { font-size: 0.56rem; padding: 0.12rem 0.4rem; }
  .cw-badge-note { display: none; }
}
/* reduced-motion: フラッシュ・フェードの遷移なし（色変化のみ） */
@media (prefers-reduced-motion: reduce) {
  .code-window.flash { animation: none; box-shadow: 0 0 0 2px rgba(45, 140, 240, 0.55); }
  .code-window.is-destructive.flash { animation: none; box-shadow: 0 0 0 2px rgba(190, 70, 60, 0.7); }
  .cw-status, .cw-fade-l, .cw-fade-r { transition: none; }
}
