/* ========================================
   CSS Reset & Base Styles
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* === カラーパレット（Linear / Vercel / Stripe Docs 風） === */
    --primary-color: #4F46E5;        /* 深いインディゴ */
    --primary-hover: #4338CA;
    --primary-light: #EEF2FF;
    --primary-dark: #3730A3;
    --secondary-color: #06B6D4;      /* シアン */
    --secondary-light: #CFFAFE;
    --accent-color: #7C3AED;         /* バイオレット */
    --accent-green: #059669;
    --accent-orange: #D97706;
    --accent-red: #E11D48;

    --text-primary: #0F172A;         /* 深いスレート */
    --text-secondary: #64748B;
    --text-muted: #94A3B8;
    --text-white: #FFFFFF;

    --background: #FFFFFF;
    --background-gray: #F8FAFC;      /* クールグレー */
    --background-dark: #0D1117;      /* GitHub-like ダーク */
    --background-dark-2: #161B22;
    --border-color: #E2E8F0;
    --border-light: #F1F5F9;

    /* CSS変数エイリアス（ページ互換性） */
    --bg-secondary: #F8FAFC;
    --border: #E2E8F0;

    --shadow-sm: 0 1px 3px rgba(15,23,42,0.06), 0 1px 2px rgba(15,23,42,0.04);
    --shadow-md: 0 4px 16px rgba(15,23,42,0.08), 0 2px 4px rgba(15,23,42,0.04);
    --shadow-lg: 0 10px 40px rgba(15,23,42,0.12);
    --shadow-primary: 0 4px 20px rgba(79,70,229,0.2), 0 1px 4px rgba(79,70,229,0.1);

    --font-primary: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-xxl: 4rem;

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-primary);
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-primary);
    background-color: var(--background-gray);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

/* ========================================
   Skip Link
   ======================================== */
.skip-to-main {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: var(--spacing-sm) var(--spacing-md);
    text-decoration: none;
    z-index: 9999;
}

.skip-to-main:focus { top: 0; }

/* ========================================
   Header — Linear / Vercel 風ダークヘッダー
   ======================================== */
.header {
    background: #ffffff;
    padding: 0.875rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 0 #e2e8f0;
}

.header::after {
    display: none;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-lg);
}

.logo a {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.logo-text-new {
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    color: #45636b;
    font-size: 1.2rem;
    letter-spacing: -0.02em;
}

.footer-logo-text {
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    color: #45636b;
}

.logo-icon-wrap {
    display: none;
}

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

.logo-text {
    font-size: 1.15rem;
    font-weight: 700;
    color: #45636b;
    letter-spacing: -0.025em;
}

.logo-badge {
    font-size: 0.68rem;
    font-weight: 500;
    background: #f1f5f9;
    color: #64748b;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    border: 1px solid #e2e8f0;
    letter-spacing: 0.02em;
}

/* ヘッダーナビゲーション */
.header-nav {
    display: flex;
    align-items: center;
    gap: 2px;
}

.header-nav a {
    color: #475569;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    text-decoration: none;
}

.header-nav a:hover {
    color: var(--primary-color);
    background: rgba(79,70,229,0.06);
}

.header-nav a.active {
    color: var(--primary-color);
    background: rgba(79,70,229,0.08);
    border: 1px solid rgba(79,70,229,0.2);
}

/* ヘッダー検索 */
.header-search {
    position: relative;
    max-width: 280px;
    flex: 1;
}

.header-search i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.8rem;
}

.header-search input {
    width: 100%;
    padding: 7px 12px 7px 34px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-sm);
    color: #1e293b;
    font-size: 0.85rem;
    outline: none;
    transition: all var(--transition-fast);
    font-family: var(--font-primary);
}

.header-search input::placeholder { color: #94a3b8; }

.header-search input:focus {
    background: #ffffff;
    border-color: rgba(79,70,229,0.4);
    box-shadow: 0 0 0 3px rgba(79,70,229,0.08);
}

/* ========================================
   Hero Section — mesh-gradient
   ======================================== */
.hero {
    background:
        radial-gradient(ellipse 80% 60% at 20% 40%, rgba(79,70,229,0.18) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 80% 20%, rgba(124,58,237,0.14) 0%, transparent 60%),
        radial-gradient(ellipse 70% 80% at 60% 80%, rgba(6,182,212,0.08) 0%, transparent 50%),
        linear-gradient(180deg, #0D1117 0%, #0F0E1F 60%, #111827 100%);
    padding: var(--spacing-xxl) 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 1px 1px, rgba(255,255,255,0.03) 1px, transparent 0);
    background-size: 32px 32px;
    pointer-events: none;
}

.hero-bg-illustration {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.hero-bg-illustration img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.12;
    mix-blend-mode: screen;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(79,70,229,0.12);
    border: 1px solid rgba(79,70,229,0.3);
    color: #A5B4FC;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: var(--radius-full);
    margin-bottom: 1.5rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    backdrop-filter: blur(8px);
}

.hero-title {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 800;
    color: white;
    line-height: 1.15;
    margin-bottom: 1.5rem;
    letter-spacing: -0.04em;
}

.hero-title .highlight {
    background: linear-gradient(135deg, #818CF8 0%, #C084FC 50%, #38BDF8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.05rem;
    color: #94A3B8;
    max-width: 560px;
    margin: 0 auto 2rem;
    line-height: 1.8;
}

.hero-search {
    max-width: 520px;
    margin: 0 auto;
    position: relative;
}

.hero-search i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 1rem;
}

.hero-search input {
    width: 100%;
    padding: 16px 20px 16px 48px;
    border-radius: var(--radius-full);
    border: 1.5px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.97);
    font-size: 0.95rem;
    color: var(--text-primary);
    outline: none;
    box-shadow: 0 8px 40px rgba(0,0,0,0.4), 0 0 0 0 rgba(79,70,229,0);
    transition: all var(--transition-base);
    font-family: var(--font-primary);
}

.hero-search input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 8px 40px rgba(0,0,0,0.3), 0 0 0 4px rgba(79,70,229,0.12);
}

/* ========================================
   Quick Links
   ======================================== */
.quick-links {
    padding: var(--spacing-xl) 0 0;
    background: var(--background-gray);
}

.quick-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--spacing-sm);
}

.quick-link-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    text-decoration: none;
    color: var(--text-primary);
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.quick-link-card:hover {
    border-color: transparent;
    box-shadow: 0 0 0 2px var(--primary-color), var(--shadow-md);
    transform: translateY(-4px);
    color: var(--primary-color);
}

.quick-link-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
    overflow: hidden;
    padding: 6px;
}

.quick-link-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.quick-link-icon.blue   { background: #EFF6FF; color: #3B82F6; }
.quick-link-icon.purple { background: #F5F3FF; color: var(--accent-color); }
.quick-link-icon.green  { background: #ECFDF5; color: var(--accent-green); }
.quick-link-icon.orange { background: #FFFBEB; color: var(--accent-orange); }
.quick-link-icon.indigo { background: var(--primary-light); color: var(--primary-color); }
.quick-link-icon.cyan   { background: #CFFAFE; color: var(--secondary-color); }

.quick-link-text { flex: 1; }
.quick-link-text h3 { font-size: 0.9rem; font-weight: 600; margin-bottom: 2px; }
.quick-link-text p { font-size: 0.78rem; color: var(--text-secondary); }

/* ========================================
   Categories
   ======================================== */
.categories {
    padding: var(--spacing-xl) 0;
    background: var(--background-gray);
}

.section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: var(--spacing-md);
}

.section-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.section-link {
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 500;
}

.section-link:hover {
    color: var(--primary-hover);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--spacing-sm);
}

.category-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    text-decoration: none;
    color: var(--text-primary);
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
    display: block;
}

.category-card:hover {
    border-color: transparent;
    box-shadow: 0 0 0 2px var(--primary-color), var(--shadow-md);
    transform: translateY(-4px);
    color: var(--text-primary);
}

.category-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
    overflow: hidden;
    padding: 8px;
}

.category-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.category-card:nth-child(1) .category-icon { background: var(--primary-light); color: var(--primary-color); }
.category-card:nth-child(2) .category-icon { background: #F5F3FF; color: var(--accent-color); }
.category-card:nth-child(3) .category-icon { background: #EFF6FF; color: #3B82F6; }
.category-card:nth-child(4) .category-icon { background: #ECFDF5; color: var(--accent-green); }
.category-card:nth-child(5) .category-icon { background: #FFFBEB; color: var(--accent-orange); }
.category-card:nth-child(6) .category-icon { background: #FFF1F2; color: var(--accent-red); }

.category-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: -0.01em;
}

.category-description {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: var(--spacing-xs);
}

.category-count {
    font-size: 0.78rem;
    color: var(--primary-color);
    font-weight: 600;
}

/* ========================================
   Feature Cards（できることセクション）
   ======================================== */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-sm);
}

.feature-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    border: 1px solid var(--border-color);
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.feature-card:hover {
    border-color: transparent;
    box-shadow: 0 0 0 2px var(--primary-color), var(--shadow-md);
    transform: translateY(-3px);
}

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    padding: 8px;
    overflow: hidden;
}

.feature-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.feature-card h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.feature-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ========================================
   Sidebar Layout
   ======================================== */
.page-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: var(--spacing-lg);
    padding: var(--spacing-xl) 0;
    align-items: start;
}

.sidebar {
    position: sticky;
    top: 80px;
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--spacing-sm);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.sidebar-section {
    margin-bottom: var(--spacing-sm);
}

.sidebar-section:last-child { margin-bottom: 0; }

.sidebar-section-title {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 6px 10px 4px;
    margin-bottom: 4px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition-fast);
    position: relative;
}

.sidebar-link:hover {
    background: var(--background-gray);
    color: var(--primary-color);
}

/* active リンク: 左カラーバー */
.sidebar-link.active {
    background: var(--primary-light);
    color: var(--primary-color);
    font-weight: 600;
    border-left: 3px solid var(--primary-color);
    padding-left: 7px;
}

.sidebar-link i { width: 16px; text-align: center; font-size: 0.8rem; }

/* ========================================
   Content Area
   ======================================== */
.content-area {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-sm);
}

.content-header {
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-lg);
    border-bottom: 1px solid var(--border-light);
}

.content-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 12px;
    background: var(--primary-light);
    padding: 4px 12px;
    border-radius: var(--radius-full);
}

.content-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.25;
    margin-bottom: 12px;
    letter-spacing: -0.03em;
}

.content-lead {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ========================================
   Section Heading (.section-heading)
   ======================================== */
.section-heading {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.015em;
}

.section-heading i { color: var(--primary-color); }

/* ========================================
   Node Cards
   ======================================== */
.node-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-sm);
    margin: var(--spacing-md) 0;
}

.node-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    transition: all var(--transition-base);
    background: white;
    box-shadow: var(--shadow-sm);
}

.node-card:hover {
    border-color: transparent;
    box-shadow: 0 0 0 2px var(--primary-color), var(--shadow-md);
    transform: translateY(-4px);
}

.node-card-link {
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.node-card-footer {
    margin-top: auto;
    padding-top: var(--spacing-xs);
    border-top: 1px solid var(--border-light);
}

.node-card-more {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--primary-color);
}

/* ========================================
   ノード詳細ページ
   ======================================== */
.node-detail-hero {
    background: linear-gradient(135deg, #1E1B4B 0%, #2D2A6E 100%);
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg) var(--spacing-xl);
    margin-bottom: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-sm);
    position: relative;
    overflow: hidden;
    border-left: 4px solid rgba(255,255,255,0.2);
}

.node-detail-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
    pointer-events: none;
}

/* ヒーロー内のテキスト色 */
.node-detail-hero .content-title,
.node-detail-hero .content-lead,
.node-detail-hero h1,
.node-detail-hero h2,
.node-detail-hero h3 {
    color: #FFFFFF;
}
.node-detail-hero p,
.node-detail-hero .content-lead {
    color: rgba(255,255,255,0.75);
}

.node-detail-badge-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}

/* ========================================
   Code Block — GitHub Dark
   ======================================== */
.code-block {
    background: #0D1117;
    color: #E2E8F0;
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    font-family: var(--font-mono);
    font-size: 0.88rem;
    line-height: 1.75;
    overflow-x: auto;
    margin: var(--spacing-sm) 0;
    border: 1px solid rgba(255,255,255,0.06);
    position: relative;
}

.code-block::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-md);
    padding: 1px;
    background: linear-gradient(135deg, rgba(79,70,229,0.3), rgba(124,58,237,0.2));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.code-block .key { color: #93C5FD; }
.code-block .str { color: #86EFAC; }
.code-block .num { color: #FCA5A5; }
.code-block .comment { color: #4A5568; }

/* ========================================
   Config Table
   ======================================== */
.config-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.875rem;
    margin: var(--spacing-sm) 0;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.config-table th {
    background: #F1F5F9;
    padding: 11px 16px;
    text-align: left;
    font-weight: 700;
    font-size: 0.75rem;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--border-color);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.config-table td {
    padding: 11px 16px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
    vertical-align: top;
    line-height: 1.6;
    transition: background var(--transition-fast);
}

.config-table tr:last-child td { border-bottom: none; }

.config-table tr:hover td {
    background: #FAFBFF;
}

.config-table code {
    background: var(--primary-light);
    padding: 2px 7px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--primary-color);
    font-weight: 500;
}

/* ========================================
   Settings Example Panel（設定例セクション）
   ======================================== */
.settings-example-panel {
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-top: var(--spacing-xs);
}

.settings-example-row {
    display: grid;
    grid-template-columns: 180px 1fr;
    border-bottom: 1px solid var(--border-color);
    transition: background var(--transition-fast);
}

.settings-example-row:last-child {
    border-bottom: none;
}

.settings-example-row:hover {
    background: #FAFBFF;
}

.settings-example-label {
    padding: 11px 16px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
    background: #F8FAFC;
    border-right: 1px solid var(--border-color);
    letter-spacing: 0.01em;
    display: flex;
    align-items: center;
}

.settings-example-value {
    padding: 11px 16px;
    font-size: 0.875rem;
    color: var(--text-primary);
    line-height: 1.6;
    display: flex;
    align-items: center;
}

/* ========================================
   Usecase Cards
   ======================================== */
.usecase-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--spacing-sm);
    margin: var(--spacing-sm) 0;
}

.usecase-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary-color);
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.usecase-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

/* h4 と h3 の両方に対応 */
.usecase-card h4,
.usecase-card h3 {
    font-size: 0.875rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.usecase-card p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ========================================
   IO Grid
   ======================================== */
.io-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
    margin: var(--spacing-sm) 0;
}

.io-box {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.io-box-label {
    background: #F1F5F9;
    padding: 7px 14px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-bottom: 1px solid var(--border-color);
}

.io-box .code-block {
    margin: 0;
    border-radius: 0;
    border: none;
}

.io-box .code-block::before {
    display: none;
}

@media (max-width: 640px) {
    .io-grid { grid-template-columns: 1fr; }
}

/* ========================================
   Node Card Header & Badges
   ======================================== */
.node-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: var(--spacing-xs);
    flex-wrap: wrap;
}

/* Node badges — グラデーション背景 */
.node-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.node-badge.input {
    background: linear-gradient(135deg, #4F46E5 0%, #6366F1 100%);
    color: white;
}

.node-badge.agent {
    background: linear-gradient(135deg, #7C3AED 0%, #9333EA 100%);
    color: white;
}

.node-badge.process {
    background: linear-gradient(135deg, #2563EB 0%, #3B82F6 100%);
    color: white;
}

.node-badge.condition {
    background: linear-gradient(135deg, #D97706 0%, #F59E0B 100%);
    color: white;
}

.node-badge.output {
    background: linear-gradient(135deg, #E11D48 0%, #F43F5E 100%);
    color: white;
}

.node-status {
    font-size: 0.7rem;
    padding: 3px 9px;
    border-radius: var(--radius-full);
    font-weight: 600;
    letter-spacing: 0.02em;
}

.node-status.implemented {
    background: #DCFCE7;
    color: #14532D;
    border: 1px solid #BBF7D0;
}

.node-status.planned {
    background: var(--background-gray);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.node-name {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: -0.01em;
}

.node-description {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: var(--spacing-sm);
}

.node-outputs {
    border-top: 1px solid var(--border-light);
    padding-top: var(--spacing-xs);
    margin-top: var(--spacing-xs);
}

.node-outputs-title {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 6px;
}

.output-field {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 4px;
}

.output-key {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    background: var(--primary-light);
    color: var(--primary-color);
    padding: 2px 6px;
    border-radius: 4px;
    flex-shrink: 0;
    font-weight: 500;
}

.output-desc {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

/* ========================================
   Step Cards（はじめに用）
   ======================================== */
.steps-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    margin: var(--spacing-md) 0;
}

.step-card,
.step-item {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.step-card:hover,
.step-item:hover {
    border-color: rgba(79,70,229,0.3);
    box-shadow: 0 0 0 2px rgba(79,70,229,0.1), var(--shadow-md);
}

.step-number {
    width: 36px;
    height: 36px;
    min-width: 36px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.95rem;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(79,70,229,0.3);
    margin-top: 2px;
}

.step-content {
    flex: 1;
}

.step-content h3,
.step-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.step-content p,
.step-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
}

/* ========================================
   Callout / Info Box
   ======================================== */
.callout {
    border-radius: 12px;
    padding: var(--spacing-sm) var(--spacing-md);
    margin: var(--spacing-md) 0;
    display: flex;
    gap: var(--spacing-sm);
}

.callout i { font-size: 1rem; flex-shrink: 0; margin-top: 2px; }

.callout.info {
    background: #EEF2FF;
    border-left: 4px solid var(--primary-color);
    color: #312E81;
}

.callout.tip {
    background: #ECFDF5;
    border-left: 4px solid var(--accent-green);
    color: #064E3B;
}

.callout.warning {
    background: #FFFBEB;
    border-left: 4px solid var(--accent-orange);
    color: #78350F;
}

.callout-body { flex: 1; }
.callout-body strong { display: block; margin-bottom: 4px; font-weight: 700; }
.callout-body p { font-size: 0.875rem; margin: 0; line-height: 1.6; }

/* ========================================
   Screenshot / Image
   ======================================== */
.screenshot-wrap {
    margin: var(--spacing-md) 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

.screenshot-wrap img {
    width: 100%;
    display: block;
}

.screenshot-caption {
    background: var(--background-gray);
    border-top: 1px solid var(--border-color);
    padding: 10px var(--spacing-sm);
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: center;
}

/* ========================================
   Code Block (pre/code)
   ======================================== */
pre {
    background: #0D1117;
    border-radius: var(--radius-md);
    padding: var(--spacing-sm) var(--spacing-md);
    overflow-x: auto;
    margin: var(--spacing-sm) 0;
    border: 1px solid rgba(255,255,255,0.06);
}

code {
    font-family: var(--font-mono);
    font-size: 0.88rem;
    color: #E2E8F0;
}

p code, li code, td code, .callout code, .callout-body code, strong code, .callout div > code {
    background: var(--primary-light);
    color: var(--primary-color);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 500;
}

/* ========================================
   Integration Cards
   ======================================== */
.integration-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: var(--spacing-sm);
    margin: var(--spacing-md) 0;
}

.integration-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    text-decoration: none;
    color: var(--text-primary);
    display: block;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.integration-card:hover {
    border-color: transparent;
    box-shadow: 0 0 0 2px var(--primary-color), var(--shadow-md);
    transform: translateY(-4px);
    color: var(--text-primary);
}

.integration-logo {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    background: var(--background-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: var(--spacing-xs);
    overflow: hidden;
    padding: 8px;
}

.integration-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.integration-name {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 4px;
    letter-spacing: -0.01em;
}

.integration-desc {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ========================================
   Breadcrumb
   ======================================== */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: var(--text-muted);
    padding: var(--spacing-sm) 0;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

.breadcrumb .separator { color: var(--text-muted); }

.breadcrumb .current { color: var(--text-primary); font-weight: 500; }

/* ========================================
   Section headers in content
   ======================================== */
.content-area h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin: var(--spacing-xl) 0 var(--spacing-sm);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--border-light);
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.content-area h2:first-of-type { border-top: none; margin-top: var(--spacing-sm); }

.content-area h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin: var(--spacing-md) 0 var(--spacing-xs);
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.content-area p { margin-bottom: var(--spacing-sm); line-height: 1.8; }

.content-area ul, .content-area ol {
    margin: 0 0 var(--spacing-sm) var(--spacing-lg);
}

.content-area li {
    margin-bottom: 6px;
    font-size: 0.9rem;
    line-height: 1.7;
}

/* ========================================
   Table of Contents
   ======================================== */
.toc {
    background: var(--background-gray);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--spacing-sm);
    margin: var(--spacing-md) 0;
}

.toc-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 10px;
}

.toc-list { list-style: none; margin: 0; padding: 0; }

.toc-list li {
    margin-bottom: 4px;
}

.toc-list a {
    font-size: 0.875rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 8px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.toc-list a:hover {
    background: white;
    color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.toc-list a::before {
    content: '';
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--text-muted);
    flex-shrink: 0;
}

/* ========================================
   Footer — ドットパターン背景
   ======================================== */
.footer {
    background: #0D1117;
    color: #94A3B8;
    padding: var(--spacing-xl) 0 var(--spacing-lg);
    margin-top: var(--spacing-xxl);
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.03) 1px, transparent 0);
    background-size: 24px 24px;
    pointer-events: none;
}

.footer-content {
    position: relative;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--spacing-xl);
    padding-bottom: var(--spacing-xl);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.footer-brand .footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: var(--spacing-sm);
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
}

.footer-logo-img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.footer-brand p {
    font-size: 0.85rem;
    color: #475569;
    line-height: 1.7;
}

.footer-heading {
    font-size: 0.78rem;
    font-weight: 700;
    color: #E2E8F0;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: var(--spacing-sm);
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li { margin-bottom: 8px; }

.footer-links a {
    font-size: 0.85rem;
    color: #475569;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-links a:hover { color: #E2E8F0; }

.footer-bottom {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--spacing-md);
    flex-wrap: wrap;
    gap: var(--spacing-xs);
}

.copyright {
    font-size: 0.82rem;
    color: #334155;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 1024px) {
    .page-layout { grid-template-columns: 1fr; }
    .sidebar { position: static; }
    /* grid の 1fr トラックは min-width:auto を持つため、子の min-content 幅
       （横長テーブル等）でトラックごと viewport を超えて膨らむ。min-width:0 で
       トラックを viewport 幅に収め、はみ出しは各要素内のスクロールで吸収する。 */
    .page-layout > .sidebar,
    .page-layout > .content-area { min-width: 0; }
    /* 横幅のあるテーブルはコンテンツエリア内で横スクロールさせる */
    .content-area table {
        display: block;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .footer-content { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .header-search { display: none; }
    .header-nav { display: none; }
    .hero { padding: var(--spacing-xl) 0; }
    .hero-title { font-size: 1.8rem; }
    .footer-content { grid-template-columns: 1fr; gap: var(--spacing-lg); }
    .quick-links-grid { grid-template-columns: 1fr 1fr; }
    .node-grid { grid-template-columns: 1fr; }
    .integration-grid { grid-template-columns: 1fr 1fr; }
}

/* ========================================
   Utilities
   ======================================== */
.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }
.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }

/* Search results highlight */
.search-highlight {
    background: #FEF08A;
    border-radius: 2px;
    padding: 0 2px;
}

/* Tag chips */
.tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 500;
    background: var(--background-gray);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

/* Article / Content page TOC nav */
.on-this-page {
    position: sticky;
    top: 80px;
    font-size: 0.82rem;
}

.on-this-page-title {
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 10px;
    font-size: 0.7rem;
}

.on-this-page a {
    display: block;
    color: var(--text-secondary);
    padding: 4px 0;
    border-left: 2px solid var(--border-color);
    padding-left: 10px;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.on-this-page a:hover, .on-this-page a.active {
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

/* ========================================
   Hero — 分割レイアウト
   ======================================== */
.hero-content-split {
    display: flex;
    align-items: center;
    gap: 48px;
    justify-content: center;
    flex-wrap: wrap;
    text-align: left;
}

.hero-text {
    flex: 1;
    min-width: 280px;
}

.hero-text .hero-description {
    margin-left: 0;
    text-align: left;
}

.hero-text .hero-search {
    margin-left: 0;
    text-align: left;
}

.hero-mascot {
    width: 220px;
    height: 220px;
    flex-shrink: 0;
    animation: float 3s ease-in-out infinite;
    filter: drop-shadow(0 20px 40px rgba(79,70,229,0.3));
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-12px); }
}

/* ========================================
   キャラクターCTAブロック
   ======================================== */
.character-cta {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    background: linear-gradient(135deg, #EEF2FF 0%, #F5F3FF 100%);
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg) var(--spacing-xl);
    margin-top: var(--spacing-xl);
    flex-wrap: wrap;
    border: 1px solid #DDD6FE;
}

.character-cta-img {
    width: 160px;
    height: 160px;
    object-fit: contain;
    flex-shrink: 0;
    animation: float 4s ease-in-out infinite;
    filter: drop-shadow(0 8px 20px rgba(124,58,237,0.2));
}

.character-cta-text {
    flex: 1;
    min-width: 220px;
}

.character-cta-text h3 {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.character-cta-text p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 16px;
}

/* ========================================
   CTAブロック（キャラなし）
   ======================================== */
.cta-block {
    background: linear-gradient(135deg, #EEF2FF 0%, #F5F3FF 100%);
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg) var(--spacing-xl);
    margin-top: var(--spacing-xl);
    border: 1px solid #DDD6FE;
}

.cta-block h3 {
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.cta-block p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 16px;
}

/* ========================================
   ボタン
   ======================================== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
    padding: 10px 24px;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(79,70,229,0.45);
    color: white;
}

/* ========================================
   ページ内キャラクターバナー
   ======================================== */
.page-character-banner {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    background: linear-gradient(135deg, #EEF2FF 0%, #F0F9FF 100%);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    border: 1px solid #BFDBFE;
}

.page-character-banner img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    flex-shrink: 0;
}

.page-character-banner-text {
    flex: 1;
}

.page-character-banner-text h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 4px;
    letter-spacing: -0.01em;
}

.page-character-banner-text p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ========================================
   レスポンシブ調整（モバイル）
   ======================================== */
@media (max-width: 640px) {
    .hero-content-split {
        flex-direction: column-reverse;
        text-align: center;
    }
    .hero-mascot {
        width: 160px;
        height: 160px;
    }
    .hero-text .hero-description,
    .hero-text .hero-search {
        text-align: center;
    }
    .character-cta {
        flex-direction: column;
        text-align: center;
    }
    .character-cta-img {
        width: 120px;
        height: 120px;
    }
    .node-detail-hero {
        padding: var(--spacing-md);
    }
}
