/* ===== TechSync Blog — 共通スタイル ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --accent: #00c96a;
    --accent-light: #e8fbf1;
    --accent-dark: #00a857;
    --accent-glow: rgba(0, 201, 106, 0.12);
    --bg: #f0f2f5;
    --bg-white: #ffffff;
    --text: #1a1a2e;
    --text-light: #555;
    --text-muted: #999;
    --border: #dfe3e8;
    --code-bg: #1e1e2e;
    --code-text: #cdd6f4;
    --purple: #a78bfa;
    --blue: #60a5fa;
    --orange: #fb923c;
    --pink: #f472b6;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
}

/* 背景キャンバス */
#bgCanvas {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 0;
}

.bg-gradient {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background:
        radial-gradient(ellipse 80% 60% at 20% 10%, rgba(0, 201, 106, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 80% 80%, rgba(96, 165, 250, 0.05) 0%, transparent 60%),
        radial-gradient(ellipse 50% 40% at 50% 50%, rgba(167, 139, 250, 0.03) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

/* スクロールプログレスバー */
.scroll-progress {
    position: fixed;
    top: 0; left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--blue), var(--purple));
    width: 0%;
    z-index: 1002;
    transition: width 0.1s linear;
}

/* ヘッダー */
header {
    position: fixed;
    top: 3px;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(16px) saturate(1.2);
    padding: 14px 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

nav {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
}

.logo {
    font-family: 'DotGothic16', monospace;
    font-size: 24px;
    color: var(--accent);
    text-decoration: none;
    letter-spacing: 2px;
}

.logo::after {
    content: "_";
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 28px;
}

.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: color 0.2s;
    font-family: 'Fira Code', monospace;
}

.nav-links a:hover { color: var(--accent); }

/* コンテンツ共通 */
main, footer { position: relative; z-index: 1; }

/* 記事コンテナ */
.article-container {
    max-width: 800px;
    margin: 110px auto 60px;
    padding: 0 20px;
}

/* パンくず */
.breadcrumb {
    font-family: 'Fira Code', monospace;
    font-size: 13px;
    margin-bottom: 28px;
    background: var(--code-bg);
    display: inline-block;
    padding: 8px 16px;
    border-radius: 6px;
}

.breadcrumb .prompt { color: var(--accent); }
.breadcrumb .path { color: var(--blue); }
.breadcrumb .file { color: var(--orange); }
.breadcrumb .sep { color: #555; }

.breadcrumb a {
    text-decoration: none;
    transition: opacity 0.2s;
}

.breadcrumb a:hover { opacity: 0.7; }

/* 記事ヘッダー */
.article-header {
    margin-bottom: 32px;
    padding-bottom: 28px;
    border-bottom: 2px solid var(--border);
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.article-tag {
    background: var(--accent-light);
    color: var(--accent-dark);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s;
    cursor: default;
}

.article-tag:hover {
    background: var(--accent);
    color: #fff;
    transform: translateY(-2px);
}

.article-date {
    color: var(--text-muted);
    font-family: 'Fira Code', monospace;
    font-size: 12px;
    margin-left: 4px;
}

.reading-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--code-bg);
    color: var(--accent);
    font-family: 'Fira Code', monospace;
    font-size: 12px;
    padding: 6px 14px;
    border-radius: 20px;
    margin-left: 12px;
}

.reading-badge .xp { color: var(--orange); }

.article-title {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 30px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.5;
}

.article-title .accent {
    background: linear-gradient(135deg, var(--accent), #00e67a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 記事カード */
.article-body {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.04),
        0 8px 32px rgba(0, 0, 0, 0.06);
}

/* ターミナルヘッダー */
.article-terminal-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--code-bg);
}

.terminal-dot {
    width: 12px; height: 12px;
    border-radius: 50%;
    transition: transform 0.2s;
    cursor: pointer;
}

.terminal-dot:hover { transform: scale(1.3); }

.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }

.article-terminal-title {
    font-family: 'Fira Code', monospace;
    font-size: 12px;
    color: #888;
    margin-left: auto;
}

.article-terminal-title .branch { color: var(--purple); }

/* VS Code風ステータスバー */
.status-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 5px 18px;
    background: var(--accent);
    font-family: 'Fira Code', monospace;
    font-size: 11px;
    color: #fff;
}

.status-bar .item { opacity: 0.9; }
.status-bar .spacer { margin-left: auto; }

/* エディタ領域 */
.editor-wrap { display: flex; }

.line-numbers {
    padding: 40px 0;
    min-width: 48px;
    background: rgba(250, 251, 252, 0.6);
    border-right: 1px solid var(--border);
    text-align: right;
    user-select: none;
    display: flex;
    flex-direction: column;
}

.line-numbers span {
    font-family: 'Fira Code', monospace;
    font-size: 12px;
    color: #ccc;
    line-height: 2.8;
    padding-right: 12px;
    transition: color 0.2s;
}

.line-numbers span.active {
    color: var(--accent);
    font-weight: 500;
}

.article-content {
    flex: 1;
    padding: 40px 36px;
    font-size: 15.5px;
    line-height: 2;
    min-width: 0;
}

/* h2: ターミナルコマンド実行風 */
.article-content h2 {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    margin: 56px 0 20px;
    padding: 0;
    display: flex;
    align-items: stretch;
    background: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.3s, box-shadow 0.3s;
}

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

.article-content h2:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 20px var(--accent-glow);
}

.article-content h2::before {
    content: attr(data-cmd);
    font-family: 'Fira Code', monospace;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.5px;
    color: #fff;
    background: var(--code-bg);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    white-space: nowrap;
    flex-shrink: 0;
    border-right: 3px solid var(--accent);
}

.article-content h2 span.h2-text {
    padding: 14px 18px;
    flex: 1;
    display: flex;
    align-items: center;
    background: rgba(250, 251, 252, 0.8);
}

.article-content h2::after {
    content: attr(data-status);
    font-family: 'Fira Code', monospace;
    font-size: 10px;
    font-weight: 500;
    color: var(--accent);
    background: var(--accent-light);
    padding: 14px 14px;
    display: flex;
    align-items: center;
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: 0.5px;
}

/* h3: 統一装飾 — 左アクセントバー + 番号バッジ自動抽出 + 下線 */
.article-content h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    margin: 38px 0 16px;
    padding: 10px 0 12px 18px;
    position: relative;
    border-left: 4px solid var(--accent);
    background: linear-gradient(90deg, rgba(0,201,106,0.06) 0%, transparent 60%);
    border-radius: 0 4px 4px 0;
    line-height: 1.55;
}
.article-content h3::before {
    content: '';
    position: absolute;
    left: -2px;
    top: 50%;
    width: 2px;
    height: 50%;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
    transform: translateY(-50%);
    opacity: 0.45;
}
.article-content h3::after {
    content: '';
    position: absolute;
    left: 18px;
    bottom: 0;
    width: 36px;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), transparent);
    border-radius: 1px;
}

.article-content h3 .fn {
    font-family: 'Fira Code', monospace;
    font-size: 12px;
    background: var(--code-bg);
    color: var(--purple);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 400;
    margin-right: 8px;
    vertical-align: middle;
}

.article-content p {
    margin-bottom: 18px;
    color: var(--text);
}

.article-content ul, .article-content ol {
    margin: 14px 0 22px 22px;
    color: var(--text);
}

.article-content li {
    margin-bottom: 10px;
    padding-left: 4px;
}

.article-content ul li::marker {
    content: ">";
    color: var(--accent);
    font-family: 'Fira Code', monospace;
    font-weight: 700;
}

.article-content ol li::marker {
    color: var(--accent);
    font-family: 'Fira Code', monospace;
    font-weight: 700;
}

.article-content strong {
    color: var(--accent-dark);
    font-weight: 700;
}

/* ハイライトブロック */
.highlight-block {
    background: var(--code-bg);
    padding: 20px 24px;
    margin: 28px 0;
    border-radius: 8px;
    font-size: 14px;
}

.highlight-block::before {
    content: "$ stdout";
    font-family: 'Fira Code', monospace;
    font-size: 11px;
    color: var(--text-muted);
    display: block;
    margin-bottom: 10px;
}

.highlight-block p {
    margin-bottom: 0;
    color: var(--code-text);
}

.highlight-block strong { color: var(--accent); }

.highlight-block a {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-color: rgba(0, 201, 106, 0.4);
    text-underline-offset: 2px;
    transition: text-decoration-color 0.2s;
}

.highlight-block a:visited {
    color: var(--accent);
}

.highlight-block a:hover {
    text-decoration-color: var(--accent);
}

/* 機能カード */
.feature-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin: 20px 0 28px;
}

.feature-card {
    background: rgba(250, 251, 252, 0.8);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 22px;
    transition: all 0.25s;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: attr(data-num);
    position: absolute;
    top: 12px; right: 14px;
    font-family: 'Fira Code', monospace;
    font-size: 11px;
    color: var(--text-muted);
    opacity: 0.4;
}

.feature-card:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px var(--accent-glow);
    background: #fff;
}

.feature-card::after {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--blue));
    opacity: 0;
    transition: opacity 0.25s;
}

.feature-card:hover::after { opacity: 1; }

.feature-card h4 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text);
    font-family: 'Noto Sans JP', sans-serif;
}

.feature-card h4 .tag {
    font-family: 'Fira Code', monospace;
    font-size: 11px;
    background: var(--code-bg);
    color: var(--accent);
    padding: 1px 6px;
    border-radius: 3px;
    font-weight: 400;
    margin-left: 6px;
    vertical-align: middle;
}

.feature-card p {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 0;
    line-height: 1.7;
}

/* チェックリスト */
.checklist {
    list-style: none;
    margin: 14px 0 22px 0;
}

.checklist li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: rgba(250, 251, 252, 0.8);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 8px;
    transition: all 0.2s;
}

.checklist li:hover {
    border-color: var(--accent);
    background: var(--accent-light);
    transform: translateX(6px);
}

.checklist .check {
    flex-shrink: 0;
    width: 22px; height: 22px;
    background: var(--accent-light);
    border: 2px solid var(--accent);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Fira Code', monospace;
    font-size: 13px;
    color: var(--accent);
    font-weight: 700;
    margin-top: 2px;
}

.checklist li:hover .check {
    background: var(--accent);
    color: #fff;
}

/* 対象業種リスト */
.role-list {
    list-style: none;
    margin: 14px 0 22px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.role-list li {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(250, 251, 252, 0.8);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px 18px;
    transition: all 0.2s;
    margin-bottom: 0;
    padding-left: 18px;
}

.role-list li:hover {
    border-color: var(--accent);
    background: var(--accent-light);
    transform: translateX(6px);
}

.role-marker {
    flex-shrink: 0;
    /* 「01」だけでなく「Step1」「Strength1」等のラベルも入る。
       固定幅だと文字があふれるため、36px を下限に内容へ合わせて伸ばす */
    min-width: 36px; width: auto; padding: 0 8px;
    height: 36px;
    background: linear-gradient(135deg, var(--accent-light), rgba(96, 165, 250, 0.1));
    border: 1px solid var(--border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Fira Code', monospace;
    font-size: 13px;
    color: var(--accent);
    font-weight: 500;
}

.role-list li:hover .role-marker {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.role-info > strong { display: block; font-size: 14px; }
.role-info > span { font-size: 13px; color: var(--text-light); }

/* メリットリスト */
.merit-list {
    list-style: none;
    margin: 14px 0 22px 0;
    counter-reset: merit;
}

.merit-list li {
    counter-increment: merit;
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    align-items: flex-start;
    padding-left: 0;
}

.merit-list li::before {
    content: "0" counter(merit);
    flex-shrink: 0;
    width: 36px; height: 36px;
    background: var(--code-bg);
    color: var(--accent);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Fira Code', monospace;
    font-size: 13px;
    font-weight: 500;
    margin-top: 2px;
}

/* テーブル */
.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0 28px;
    font-size: 14px;
}

.article-content table th {
    background: var(--code-bg);
    color: var(--accent);
    font-family: 'Fira Code', monospace;
    font-size: 12px;
    font-weight: 500;
    padding: 12px 16px;
    text-align: left;
    border: 1px solid rgba(255,255,255,0.1);
}

.article-content table td {
    padding: 12px 16px;
    border: 1px solid var(--border);
    background: rgba(250, 251, 252, 0.8);
}

.article-content table tr:hover td {
    background: var(--accent-light);
}

/* 料金カード */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin: 24px 0;
}

.pricing-card {
    background: rgba(250, 251, 252, 0.8);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 24px 20px;
    text-align: center;
    transition: all 0.25s;
    position: relative;
}

.pricing-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px var(--accent-glow);
}

.pricing-card.featured {
    border-color: var(--accent);
    background: linear-gradient(180deg, var(--accent-light), rgba(255,255,255,0.9));
}

.pricing-card.featured::before {
    content: "POPULAR";
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: #fff;
    font-family: 'Fira Code', monospace;
    font-size: 10px;
    padding: 2px 12px;
    border-radius: 0 0 6px 6px;
    letter-spacing: 1px;
}

.pricing-name {
    font-family: 'Fira Code', monospace;
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 8px;
}

.pricing-price {
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.pricing-price .yen {
    font-size: 16px;
    color: var(--text-light);
}

.pricing-limit {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 16px;
    font-family: 'Fira Code', monospace;
}

.pricing-features {
    list-style: none;
    font-size: 13px;
    color: var(--text-light);
    text-align: left;
}

.pricing-features li {
    padding: 4px 0;
    margin-bottom: 0;
    padding-left: 0;
}

.pricing-features li::before {
    content: "~";
    color: var(--accent);
    font-family: 'Fira Code', monospace;
    margin-right: 6px;
}

/* CTA */
.article-cta {
    text-align: center;
    padding: 48px 30px;
    margin: 44px 0 0;
    background: var(--code-bg);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.article-cta::before {
    content: "";
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background:
        radial-gradient(circle at 30% 50%, rgba(0, 201, 106, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 70% 50%, rgba(96, 165, 250, 0.07) 0%, transparent 50%);
    animation: ctaGlow 6s ease-in-out infinite alternate;
}

@keyframes ctaGlow {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-5%, 5%); }
}

.article-cta h3 {
    font-family: 'DotGothic16', monospace;
    font-size: 22px;
    color: var(--accent);
    margin-bottom: 12px;
    position: relative;
}

.article-cta p {
    color: #aaa;
    margin-bottom: 28px;
    font-size: 14px;
    position: relative;
}

.cta-button {
    display: inline-block;
    padding: 16px 44px;
    background: var(--accent);
    border: none;
    border-radius: 8px;
    color: #fff;
    text-decoration: none;
    font-family: 'DotGothic16', monospace;
    font-size: 16px;
    transition: all 0.25s;
    letter-spacing: 1px;
    position: relative;
}

.cta-button:hover {
    background: var(--accent-dark);
    box-shadow: 0 0 30px rgba(0, 201, 106, 0.4);
    transform: translateY(-2px);
}

/* Related articles — mini terminal cards */
.related-articles {
    margin-top: 56px;
    color: var(--code-text);
}
.related-articles, .related-articles * {
    color: inherit;
}
.ra-heading {
    font-family: 'DotGothic16', monospace;
    font-size: 18px;
    color: var(--accent);
    margin-bottom: 20px;
    letter-spacing: 1px;
}
.ra-heading::before {
    content: "$ ";
    opacity: 0.5;
}
.ra-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}
/* Card */
.ra-card {
    display: block;
    text-decoration: none;
    background: var(--code-bg);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s;
    position: relative;
}
.ra-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 10px;
    box-shadow: 0 0 0 0 rgba(0,201,106,0);
    transition: box-shadow 0.3s;
    pointer-events: none;
}
.ra-card:hover {
    border-color: rgba(0,201,106,0.4);
    transform: translateY(-3px);
}
.ra-card:hover::after {
    box-shadow: 0 8px 32px rgba(0,201,106,0.12);
}
/* Card title bar */
.ra-card-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(255,255,255,0.03);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.ra-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
}
.ra-dot-r { background: #f38ba8; }
.ra-dot-y { background: #f9e2af; }
.ra-dot-g { background: #a6e3a1; }
.ra-card-file {
    margin-left: 8px;
    font-family: 'Fira Code', monospace;
    font-size: 12px;
    color: rgba(205,214,244,0.5);
}
/* Card body */
.ra-card-body {
    padding: 16px 18px 14px;
}
.ra-card-tag {
    display: inline-block;
    font-family: 'Fira Code', monospace;
    font-size: 11px;
    color: var(--accent);
    background: rgba(0,201,106,0.1);
    border: 1px solid rgba(0,201,106,0.2);
    border-radius: 4px;
    padding: 2px 8px;
    margin-bottom: 8px;
}
.ra-card-title {
    font-size: 15px;
    font-weight: 700;
    color: #cdd6f4 !important;
    line-height: 1.5;
    margin: 0 0 10px;
    transition: color 0.2s;
}
.ra-card:hover .ra-card-title {
    color: #fff !important;
}
.ra-card-meta {
    font-family: 'Fira Code', monospace;
    font-size: 12px;
    color: rgba(205,214,244,0.4) !important;
}
/* Override article-content styles inside related-articles */
.article-content .related-articles,
.article-content .related-articles * {
    color: var(--code-text);
}
.article-content .related-articles .ra-heading {
    color: var(--accent);
}
.article-content .related-articles .ra-card-tag {
    color: var(--accent);
}
.article-content .related-articles .ra-card-title {
    color: #cdd6f4 !important;
}
.article-content .related-articles .ra-card:hover .ra-card-title {
    color: #fff !important;
}
.article-content .related-articles .ra-card-meta {
    color: rgba(205,214,244,0.4) !important;
}
.article-content .related-articles .ra-card-file {
    color: rgba(205,214,244,0.5);
}
.related-articles p {
    margin: 0 0 10px;
    line-height: 1.5;
}
.related-articles a,
.related-articles a:visited {
    color: inherit;
    text-decoration: none;
}

/* Responsive: 2 columns on wider screens */
@media (min-width: 700px) {
    .ra-grid {
        grid-template-columns: 1fr 1fr;
    }
    .ra-grid .ra-card:first-child {
        grid-column: 1 / -1;
    }
}

/* Scroll to top */
.scroll-top {
    position: fixed;
    bottom: 24px; right: 24px;
    background: var(--code-bg);
    color: var(--accent);
    border: 1px solid rgba(0, 201, 106, 0.3);
    font-family: 'Fira Code', monospace;
    font-size: 11px;
    padding: 10px 14px;
    border-radius: 8px;
    cursor: pointer;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s;
    z-index: 999;
}

.scroll-top.visible {
    opacity: 1;
    transform: translateY(0);
}

.scroll-top:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* フッター */
footer {
    background: var(--code-bg);
    padding: 24px 20px;
    text-align: center;
    margin-top: 60px;
}

footer p {
    font-family: 'Fira Code', monospace;
    font-size: 12px;
    color: #666;
}

footer a {
    color: var(--accent);
    text-decoration: none;
    transition: opacity 0.2s;
}

footer a:hover { opacity: 0.7; }

/* フェードイン */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease-out;
}

@media (prefers-reduced-motion: reduce) {
    .fade-in { opacity: 1; transform: none; transition: none; }
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== FAQ セクション ===== */
.faq-section {
    margin: 24px 0 32px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
    position: relative;
}

.faq-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, var(--accent), var(--blue));
    opacity: 0;
    transition: opacity 0.25s ease;
}

.faq-item:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 16px var(--accent-glow);
    transform: translateY(-1px);
}

.faq-item:hover::before {
    opacity: 1;
}

.faq-item[open] {
    border-color: var(--accent);
    box-shadow: 0 4px 18px var(--accent-glow);
    background: #ffffff;
}

.faq-item[open]::before {
    opacity: 1;
}

.faq-item summary {
    list-style: none;
    cursor: pointer;
    padding: 18px 56px 18px 60px;
    font-weight: 700;
    font-size: 15px;
    color: var(--text);
    position: relative;
    user-select: none;
    transition: color 0.2s;
    line-height: 1.6;
}

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

.faq-item summary::before {
    content: "Q";
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    background: var(--code-bg);
    color: var(--accent);
    font-family: 'Fira Code', monospace;
    font-size: 13px;
    font-weight: 700;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.25s ease, color 0.25s ease;
}

.faq-item summary::after {
    content: "+";
    position: absolute;
    right: 22px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent);
    font-size: 22px;
    font-weight: 400;
    transition: transform 0.3s ease;
    line-height: 1;
}

.faq-item[open] summary::after {
    transform: translateY(-50%) rotate(45deg);
}

.faq-item[open] summary::before {
    background: var(--accent);
    color: #ffffff;
}

.faq-item summary:hover {
    color: var(--accent);
}

.faq-answer {
    padding: 0 24px 20px 60px;
    position: relative;
    animation: faqSlideIn 0.3s ease;
}

.faq-answer::before {
    content: "A";
    position: absolute;
    left: 18px;
    top: 0;
    width: 28px;
    height: 28px;
    background: var(--accent-light);
    color: var(--accent-dark);
    font-family: 'Fira Code', monospace;
    font-size: 13px;
    font-weight: 700;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0, 201, 106, 0.25);
}

.faq-answer p {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.85;
    margin: 0;
}

.faq-answer p + p {
    margin-top: 10px;
}

@keyframes faqSlideIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== 免責文 ===== */
.disclaimer {
    margin: 36px 0 20px;
    padding: 16px 20px 16px 22px;
    background: rgba(30, 30, 46, 0.035);
    border-left: 3px solid var(--text-muted);
    border-radius: 0 6px 6px 0;
    font-size: 12px;
    line-height: 1.85;
    color: var(--text-light);
    font-family: 'Noto Sans JP', sans-serif;
    position: relative;
}

.disclaimer::before {
    content: "// disclaimer";
    display: block;
    font-family: 'Fira Code', monospace;
    font-size: 10px;
    color: var(--text-muted);
    margin-bottom: 8px;
    letter-spacing: 0.5px;
    opacity: 0.75;
}

/* レスポンシブ */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .article-container { margin-top: 80px; }
    .article-title { font-size: 22px; }
    .article-content { padding: 24px 18px; }
    .article-content h2 { font-size: 16px; flex-wrap: wrap; }
    .article-content h2::before { padding: 10px 12px; font-size: 10px; }
    .article-content h2 span.h2-text { padding: 10px 14px; }
    .article-content h2::after { padding: 8px 10px; font-size: 9px; }
    .line-numbers { display: none; }
    .feature-cards { grid-template-columns: 1fr; }
    .pricing-grid { grid-template-columns: 1fr; }
    .reading-badge { display: none; }
    .status-bar { flex-wrap: wrap; gap: 8px; }
    .article-cta { padding: 32px 20px; }
    .role-list li { padding: 12px 14px; }
    .faq-item summary {
        padding: 16px 48px 16px 50px;
        font-size: 14px;
    }
    .faq-item summary::before {
        left: 14px;
        width: 24px;
        height: 24px;
        font-size: 11px;
    }
    .faq-item summary::after {
        right: 18px;
        font-size: 20px;
    }
    .faq-answer {
        padding: 0 18px 18px 50px;
    }
    .faq-answer::before {
        left: 14px;
        width: 24px;
        height: 24px;
        font-size: 11px;
    }
    .faq-answer p { font-size: 13px; }
    .disclaimer {
        font-size: 11px;
        padding: 14px 16px;
    }
}

/* ===== hojokin/blog 補完スタイル ===== */

/* リード段落 */
.article-lead-white {
    font-size: 16px;
    line-height: 1.9;
    color: rgba(205,214,244,0.75);
    padding: 20px 24px;
    border-left: 3px solid var(--accent);
    background: rgba(0,201,106,0.04);
    border-radius: 0 6px 6px 0;
    margin-bottom: 36px;
}

/* 前後ナビ */
.article-prev-next {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    max-width: 760px;
    margin: 48px auto 0;
    padding: 0 40px;
}
.article-prev-next a {
    display: block;
    padding: 16px 18px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s;
    background: rgba(255,255,255,0.02);
}
.article-prev-next a:hover { border-color: rgba(0,201,106,0.35); }
.article-prev-next .pn-label {
    font-family: 'Fira Code', monospace;
    font-size: 10px;
    letter-spacing: 0.12em;
    color: rgba(255,255,255,0.28);
    margin-bottom: 6px;
}
.article-prev-next .pn-title {
    font-size: 13px;
    color: rgba(205,214,244,0.70);
    line-height: 1.5;
}
.article-prev-next .pn-next { text-align: right; }
.article-prev-next .pn-placeholder { visibility: hidden; }

@media (max-width: 640px) {
    .article-prev-next { grid-template-columns: 1fr; padding: 0 16px; }
}

/* ===== コードブロック（コピーボタン付き）===== */
.code-block {
    position: relative;
    margin: 28px 0;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.08);
    background: #1e1e2e;
}

.code-block-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 16px;
    background: rgba(255,255,255,0.04);
    border-bottom: 1px solid rgba(255,255,255,0.07);
    gap: 12px;
}

.code-block-dots {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}
.code-block-dots span {
    width: 10px; height: 10px;
    border-radius: 50%;
    display: block;
}
.code-dot-r { background: #f38ba8; }
.code-dot-y { background: #f9e2af; }
.code-dot-g { background: #a6e3a1; }

.code-block-lang {
    font-family: 'Fira Code', monospace;
    font-size: 11px;
    color: rgba(205,214,244,0.45);
    flex: 1;
}

.code-copy-btn {
    font-family: 'Fira Code', monospace;
    font-size: 11px;
    padding: 4px 12px;
    border-radius: 4px;
    border: 1px solid rgba(0,201,106,0.35);
    background: transparent;
    color: var(--accent);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}
.code-copy-btn:hover {
    background: rgba(0,201,106,0.12);
    border-color: var(--accent);
}
.code-copy-btn.copied {
    border-color: rgba(167,139,250,0.5);
    color: #a78bfa;
}

.code-block pre {
    margin: 0;
    padding: 20px 22px;
    overflow-x: auto;
    background: transparent;
    border: none;
}

.code-block pre code {
    font-family: 'Fira Code', monospace;
    font-size: 13px;
    line-height: 1.7;
    color: #cdd6f4;
    background: none;
    padding: 0;
    white-space: pre;
    tab-size: 2;
}

/* スクロールバー */
.code-block pre::-webkit-scrollbar { height: 5px; }
.code-block pre::-webkit-scrollbar-track { background: rgba(255,255,255,0.03); }
.code-block pre::-webkit-scrollbar-thumb { background: rgba(0,201,106,0.3); border-radius: 3px; }

/* シンタックスカラー（手動クラス付与）*/
.tok-key   { color: #cba6f7; }   /* YAML key / Dockerfile instruction */
.tok-val   { color: #a6e3a1; }   /* 値・文字列 */
.tok-str   { color: #f9e2af; }   /* クォート文字列 */
.tok-cmt   { color: #585b70; font-style: italic; }  /* コメント */
.tok-cmd   { color: #89b4fa; }   /* $ コマンド */
.tok-num   { color: #fab387; }   /* 数値・ポート */
.tok-kw    { color: #f38ba8; }   /* FROM / RUN / COPY / ENV */


/* CTA見出しは本文h3の装飾を受けない
   .article-content h3 の左アクセントバー・下線・左パディングは本文見出し用。
   CTAボックスは中央揃えなので、これらが入ると見出しが左にずれ、
   箱の左端に緑の縦棒が残る。 */
.article-cta h3 {
    padding: 0;
    border-left: 0;
    background: none;
    border-radius: 0;
}

.article-cta h3::before,
.article-cta h3::after {
    content: none;
}


/* 表の横スクロールとカード見出しの是正
   1) .article-body が overflow:hidden のため、幅の広い表は切れて読めなくなる。
      表自体をスクロールコンテナにして、はみ出す列に到達できるようにする。
   2) .feature-card の見出しは実際には h3 で書かれている（h4 は1件も無い）。
      h4 限定のセレクタでは当たらず、.article-content h3 の装飾が流れ込む。 */
.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 20px 0 26px;
}

.table-scroll > table {
    min-width: 100%;
    width: auto;
    margin: 0;
}

.feature-card h3 {
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 8px;
    color: var(--text);
    font-family: 'Noto Sans JP', sans-serif;
    padding: 0;
    border-left: 0;
    background: none;
    border-radius: 0;
    line-height: 1.55;
}

.feature-card h3::before,
.feature-card h3::after {
    content: none;
}

.feature-card h3 .tag {
    font-family: 'Fira Code', monospace;
    font-size: 11px;
    background: var(--code-bg);
    color: var(--accent);
    padding: 1px 6px;
    border-radius: 3px;
    font-weight: 400;
    margin-left: 6px;
}


/* 狭い画面で列が潰れて縦積みになるのを防ぐ
   日本語は文字単位で折り返せるため、auto table layout は列を1文字幅まで縮めて
   コンテナに収めようとする。セルに下限幅を与えて、潰れる前に .table-scroll の
   横スクロールへ回す。 */
@media (max-width: 768px) {
    .table-scroll th,
    .table-scroll td {
        min-width: 6.5em;
    }

    .table-scroll th:first-child,
    .table-scroll td:first-child {
        min-width: 8em;
    }
}
