/* BraveJIG CLI product page — page-specific rules (shared rules live in /css/site.css) */
:root {
  --bj-ink: #14202b;          /* terminal panel */
  --bj-ink-2: #1c2b3a;
  --bj-cli: #0f4c81;          /* = --primary, BraveJIG CLI */
  --bj-collector: #4a90a4;    /* Kraken Collector (matches existing flow svg) */
  --bj-broker: #2e8b57;       /* Kraken Broker */
  --bj-device: #6b7c93;       /* BraveJIG device (Braveridge product, kept neutral) */
  --bj-line: #9fb3c8;
}

/* ---------- Hero ---------- */
.bj-hero { padding: 64px 0 56px; }
.bj-hero-grid { grid-template-columns: 1.05fr 1fr; gap: 48px; }
.bj-eyebrow { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; font-size: 0.85rem; color: var(--text-muted); letter-spacing: 0.04em; }
.bj-hero .hero-title { font-size: 2.25rem; }
.bj-hero .hero-text { font-size: 0.97rem; }
.bj-hero .notice { font-size: 0.9rem; }
.bj-hero .hero-note { margin-bottom: 0; }
.bj-trust { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border); }
.bj-trust li { display: flex; flex-direction: column; }
.bj-trust-k { font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.bj-trust-v { font-size: 0.9rem; font-weight: 600; color: var(--text-main); }

.bj-term { background: var(--bj-ink); border-radius: 12px; box-shadow: 0 18px 40px rgba(15, 76, 129, 0.18); overflow: hidden; text-align: left; }
.bj-term-bar { display: flex; align-items: center; gap: 7px; padding: 10px 14px; background: var(--bj-ink-2); border-bottom: 1px solid rgba(255,255,255,0.06); }
.bj-term-bar span { width: 11px; height: 11px; border-radius: 50%; background: rgba(255,255,255,0.18); }
.bj-term-bar span:nth-child(1) { background: #ff5f57; }
.bj-term-bar span:nth-child(2) { background: #febc2e; }
.bj-term-bar span:nth-child(3) { background: #28c840; }
.bj-term-bar em { margin-left: auto; font-style: normal; font-family: var(--font-mono); font-size: 0.72rem; color: rgba(255,255,255,0.45); }
.bj-term-body {
  margin: 0; padding: 18px 18px 16px; min-height: 300px;
  font-family: var(--font-mono); font-size: 0.76rem; line-height: 1.7; color: #d7e2ee;
  white-space: pre-wrap; word-break: break-all; overflow: hidden;
}
.bj-term-prompt { color: var(--accent); font-weight: 700; }
.bj-term-cmd { color: #fff; }
.bj-term-cursor { display: inline-block; width: 8px; height: 1.05em; vertical-align: -0.2em; background: #d7e2ee; animation: bj-blink 1s steps(2) infinite; }
@keyframes bj-blink { to { visibility: hidden; } }
.bj-term-line { display: block; color: #b9c7d6; animation: bj-line-in 0.25s ease both; }
.bj-term-line .k { color: #7fb7e6; }
.bj-term-line .s { color: #ffd479; }
.bj-term-line .n { color: #8ff0d6; }
@keyframes bj-line-in { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
.bj-term-caption { margin-top: 12px; font-size: 0.82rem; color: var(--text-muted); text-align: center; }

/* ---------- CLI intro ---------- */
.bj-intro-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 40px; align-items: center; }
.bj-intro-text .section-title { text-align: left; font-size: 1.5rem; margin-bottom: 14px; }
.bj-intro-text p { font-size: 0.95rem; line-height: 1.8; color: var(--text-muted); }
.bj-merits { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.bj-merits li { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; padding: 14px 16px; background: var(--bg-main); border: 1px solid var(--border); border-radius: var(--radius); }
.bj-merit-icon { grid-row: 1 / 3; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 9px; background: var(--primary-light); color: var(--primary); }
.bj-merit-icon svg, .bj-mod-icon svg, .bj-case-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bj-merits li strong { font-size: 0.92rem; color: var(--text-main); }
.bj-merits li span:last-child { font-size: 0.8rem; color: var(--text-muted); line-height: 1.5; }
.bj-merits li:last-child { grid-column: 1 / -1; }

/* ---------- Before / After ---------- */
.bj-compare { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--bg-main); margin-bottom: 44px; }
.bj-compare-head, .bj-compare-row { display: grid; grid-template-columns: 1fr 1fr 1.4fr; }
.bj-compare-head { background: var(--bg-alt); border-bottom: 1px solid var(--border); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; color: var(--text-muted); }
.bj-compare-head span { padding: 12px 18px; }
.bj-compare-head .bj-compare-before { color: #9a3b3b; }
.bj-compare-head .bj-compare-after { color: var(--primary); background: var(--primary-light); }
.bj-compare-row { border-bottom: 1px solid var(--border); }
.bj-compare-row:last-child { border-bottom: none; }
.bj-compare-row > div { padding: 18px; font-size: 0.9rem; line-height: 1.65; }
.bj-compare-task strong { display: block; color: var(--text-main); font-size: 0.95rem; margin-bottom: 4px; }
.bj-compare-task span { font-size: 0.8rem; color: var(--text-muted); }
.bj-compare-row .bj-compare-before { color: var(--text-muted); border-left: 1px solid var(--border); }
.bj-compare-row .bj-compare-after { background: #f4f8fc; border-left: 1px solid var(--border); }
.bj-compare-after code { display: block; margin-bottom: 8px; padding: 8px 10px; background: var(--bj-ink); color: #d7e2ee; border-radius: 6px; font-family: var(--font-mono); font-size: 0.72rem; line-height: 1.55; white-space: pre-wrap; word-break: break-all; }
.bj-compare-after span { display: block; font-size: 0.85rem; color: var(--text-main); }

.bj-benefits { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.bj-benefit { padding: 20px 18px; background: var(--bg-main); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-soft); }
.bj-benefit-num { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; margin-bottom: 12px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 0.78rem; font-weight: 700; }
.bj-benefit h3 { font-size: 0.98rem; color: var(--text-main); margin-bottom: 6px; }
.bj-benefit p { font-size: 0.82rem; color: var(--text-muted); line-height: 1.65; }

/* ---------- Modules ---------- */
.bj-flow { margin: 0 0 48px; gap: 10px; }
.bj-flow .flow-step { padding: 10px 14px; font-size: 0.84rem; }
.bj-flow .bj-flow-collector { border-color: var(--bj-collector); color: var(--bj-collector); }
.bj-flow .bj-flow-broker { border-color: var(--bj-broker); color: var(--bj-broker); }
.bj-modules-head { text-align: center; margin-bottom: 24px; }
.bj-modules-head h3 { font-size: 1.35rem; color: var(--primary); margin-bottom: 8px; }
.bj-modules-head p { font-size: 0.93rem; color: var(--text-muted); max-width: 680px; margin: 0 auto; }
.bj-modules { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 20px; }
.bj-modules li { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 10px 14px; background: var(--bg-main); border: 1px solid var(--border); border-radius: var(--radius); text-align: center; transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition); }
.bj-modules li:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: var(--primary); }
.bj-mod-icon { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%; background: var(--primary-light); color: var(--primary); }
.bj-modules li strong { font-size: 0.82rem; color: var(--text-main); line-height: 1.3; }
.bj-modules li code { font-family: var(--font-mono); font-size: 0.68rem; color: var(--text-muted); }
.bj-table-details { margin-bottom: 40px; }
.bj-table-details > summary { display: inline-block; padding: 8px 16px; border: 1px solid var(--border); border-radius: var(--radius-pill); background: var(--bg-main); font-size: 0.85rem; font-weight: 600; color: var(--primary); cursor: pointer; list-style: none; }
.bj-table-details > summary::-webkit-details-marker { display: none; }
.bj-table-details > summary::before { content: "+ "; }
.bj-table-details[open] > summary::before { content: "\2013  "; }
.bj-table-details .table-wrap { margin: 16px 0 0; }
.bj-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.bj-feature { display: flex; flex-direction: column; padding: 24px; background: var(--bg-main); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-soft); }
.bj-feature h3 { font-size: 1.05rem; color: var(--primary); margin-bottom: 8px; }
.bj-feature .check-list li { padding: 5px 0 5px 22px; font-size: 0.88rem; }
.bj-feature .check-list li::before { top: 5px; }
.bj-snippet { margin: auto 0 0; padding: 12px 14px; background: var(--bj-ink); color: #d7e2ee; border-radius: 6px; font-family: var(--font-mono); font-size: 0.72rem; line-height: 1.6; overflow-x: auto; }
.bj-feature .check-list + .bj-snippet { margin-top: 14px; }

/* ---------- Kraken integration ---------- */
.bj-kraken { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); color: #fff; }
.bj-kraken-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 48px; align-items: center; }
.bj-kraken .section-title { text-align: left; color: #fff; margin-bottom: 18px; }
.bj-badge-accent { background: var(--accent); color: #fff; }
.bj-kraken-text > p { font-size: 0.97rem; line-height: 1.85; opacity: 0.95; margin-bottom: 18px; }
.bj-kraken-benefits { margin-bottom: 26px; }
.bj-kraken-benefits li { position: relative; padding: 6px 0 6px 26px; font-size: 0.92rem; line-height: 1.6; }
.bj-kraken-benefits li::before { content: "\2713"; position: absolute; left: 0; top: 6px; color: var(--accent); font-weight: 700; }
.bj-kraken .btn-secondary { background: transparent; color: #fff; border-color: rgba(255,255,255,0.6); }
.bj-kraken .btn-secondary:hover { background: rgba(255,255,255,0.12); }
.bj-kraken-steps { display: flex; flex-direction: column; }
.bj-kraken-steps li { position: relative; display: flex; gap: 14px; align-items: flex-start; padding: 18px; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.14); border-radius: var(--radius); }
.bj-kraken-steps li + li { margin-top: 10px; }
.bj-kraken-steps li + li::before { content: ""; position: absolute; left: 34px; top: -11px; width: 2px; height: 11px; background: rgba(255,255,255,0.35); }
.bj-kraken-steps li.is-cli { background: rgba(255,255,255,0.16); border-color: rgba(255,255,255,0.4); }
.bj-ks-num { flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: #fff; color: var(--primary); font-weight: 700; font-size: 0.9rem; }
.bj-kraken-steps li.is-cli .bj-ks-num { background: var(--accent); color: #fff; }
.bj-kraken-steps strong { display: block; font-size: 1.05rem; margin-bottom: 2px; }
.bj-kraken-steps span:last-child { font-size: 0.85rem; opacity: 0.9; line-height: 1.6; }

/* ---------- Reasons ---------- */
.bj-reasons { display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; max-width: 900px; margin: 0 auto; }
.bj-reasons li { display: flex; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--border); }
.bj-reasons li > span { flex-shrink: 0; font-family: var(--font-mono); font-size: 1.4rem; font-weight: 700; color: var(--primary); line-height: 1.2; opacity: 0.55; }
.bj-reasons h3 { font-size: 1rem; color: var(--text-main); margin-bottom: 4px; }
.bj-reasons p { font-size: 0.88rem; color: var(--text-muted); line-height: 1.7; }

/* ---------- Use cases ---------- */
.bj-cases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.bj-case { display: flex; flex-direction: column; padding: 24px; background: var(--bg-main); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-soft); }
.bj-case-icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin-bottom: 14px; border-radius: 10px; background: var(--bg-alt); color: var(--primary); }
.bj-case h3 { font-size: 1.02rem; color: var(--text-main); margin-bottom: 8px; }
.bj-case p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.7; }
.bj-case-flow { margin-top: auto; padding-top: 14px; font-family: var(--font-mono); font-size: 0.72rem !important; color: var(--primary) !important; }
.bj-case-kraken { border-color: var(--primary); background: var(--primary-light); }
.bj-case-kraken .bj-case-icon { background: var(--primary); color: #fff; }

/* ---------- Deployment models ---------- */
.bj-models { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.bj-model { display: flex; flex-direction: column; padding: 26px 24px; background: var(--bg-main); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-soft); }
.bj-model.is-highlight { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.bj-model-tag { align-self: flex-start; padding: 3px 12px; border-radius: var(--radius-pill); background: var(--bg-alt); border: 1px solid var(--border); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; color: var(--text-muted); margin-bottom: 12px; }
.bj-model.is-highlight .bj-model-tag { background: var(--primary); border-color: var(--primary); color: #fff; }
.bj-model h3 { font-size: 1.1rem; color: var(--primary); margin-bottom: 8px; }
.bj-model > p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.7; }
.bj-model-stack { display: flex; flex-direction: column; gap: 4px; margin: 16px 0; }
.bj-model-stack span { padding: 8px 12px; border-radius: 6px; font-size: 0.8rem; font-weight: 600; text-align: center; }
.bj-model-stack .is-bj { background: #eef1f5; color: var(--bj-device); }
.bj-model-stack .is-cli { background: var(--primary); color: #fff; }
.bj-model-stack .is-kraken { background: var(--bj-broker); color: #fff; }
.bj-model-stack .is-out { background: var(--accent-light); color: #0a7a5f; }
.bj-model-fit { margin-top: auto; padding: 10px 12px; background: var(--bg-alt); border-radius: 6px; font-size: 0.83rem !important; color: var(--text-muted) !important; }
.bj-model-fit strong { display: block; font-size: 0.7rem; letter-spacing: 0.06em; margin-bottom: 2px; }

/* ---------- Pricing ---------- */
.bj-license { display: grid; grid-template-columns: 1fr 1.4fr; gap: 32px; align-items: center; padding: 32px; margin-bottom: 24px; background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius); }
.bj-license-visual { display: flex; align-items: center; justify-content: center; gap: 18px; }
.bj-license-box { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 120px; height: 96px; border-radius: 10px; font-weight: 700; font-size: 0.85rem; }
.bj-license-box small { font-size: 1.2rem; margin-top: 4px; }
.bj-license-box.is-router { background: #fff; border: 2px solid var(--bj-device); color: var(--bj-device); }
.bj-license-box.is-license { background: var(--primary); color: #fff; }
.bj-license-eq { font-size: 2rem; font-weight: 700; color: var(--text-muted); }
.bj-license-text h3 { font-size: 1.15rem; color: var(--text-main); margin-bottom: 6px; }
.bj-license-text .check-list li { padding: 5px 0 5px 24px; }
.bj-license-text .check-list li::before { top: 5px; }
.bj-license-note { margin: 8px 0 14px; font-size: 0.82rem; color: var(--text-muted); }
.bj-license-text .notice { margin-bottom: 0; font-size: 0.88rem; }
.bj-pricing-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 36px; }
.bj-pricing-grid .check-list li { color: var(--text-main); padding: 6px 0 6px 24px; }
.bj-purchase { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 36px; }
.bj-purchase li { position: relative; padding: 18px 16px 16px; background: var(--bg-main); border: 1px solid var(--border); border-radius: var(--radius); }
.bj-purchase li > span { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; margin-bottom: 10px; border-radius: 50%; background: var(--primary-light); color: var(--primary); font-size: 0.8rem; font-weight: 700; }
.bj-purchase li strong { display: block; font-size: 0.95rem; color: var(--text-main); margin-bottom: 4px; }
.bj-purchase li small { display: block; font-size: 0.8rem; color: var(--text-muted); line-height: 1.55; }

/* ---------- CTA tweaks ---------- */
.section-cta .cta-box { max-width: 680px; }
.bj-cta-list { column-count: 2; column-gap: 24px; }
.bj-cta-list li { break-inside: avoid; }
.bj-cta-notice { text-align: center; font-size: 0.88rem; opacity: 0.85; margin-bottom: 24px; }
.bj-btn-on-dark { background: #fff; color: var(--primary); border-color: #fff; }
.bj-btn-on-dark:hover { background: var(--primary-light); border-color: var(--primary-light); color: var(--primary); }
.section-cta .btn-secondary { background: transparent; color: #fff; border-color: rgba(255,255,255,0.7); }
.section-cta .btn-secondary:hover { background: rgba(255,255,255,0.12); }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .bj-benefits { grid-template-columns: repeat(3, 1fr); }
  .bj-modules { grid-template-columns: repeat(4, 1fr); }
  .bj-purchase { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .bj-hero-grid { grid-template-columns: 1fr; }
  .bj-hero-visual { order: -1; }
  .bj-intro-grid, .bj-kraken-grid, .bj-license, .bj-pricing-grid, .bj-reasons { grid-template-columns: 1fr; }
  .bj-intro-text .section-title { text-align: center; }
  .bj-intro-text p { text-align: center; }
  .bj-cases, .bj-models, .bj-features { grid-template-columns: repeat(2, 1fr); }
  .bj-compare-head { display: none; }
  .bj-compare-row { grid-template-columns: 1fr; }
  .bj-compare-row .bj-compare-before, .bj-compare-row .bj-compare-after { border-left: none; border-top: 1px solid var(--border); }
  .bj-compare-row .bj-compare-before::before, .bj-compare-row .bj-compare-after::before { display: block; margin-bottom: 4px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; }
  .bj-compare-row .bj-compare-before::before { content: "これまで"; color: #9a3b3b; }
  .bj-compare-row .bj-compare-after::before { content: "BraveJIG CLIなら"; color: var(--primary); }
}
@media (max-width: 640px) {
  .bj-hero { padding: 32px 0 40px; }
  .bj-term-body { min-height: 240px; font-size: 0.7rem; }
  .bj-merits, .bj-benefits, .bj-cases, .bj-models, .bj-features, .bj-purchase { grid-template-columns: 1fr; }
  .bj-modules { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .bj-modules li { padding: 14px 6px 12px; }
  .bj-modules li strong { font-size: 0.75rem; }
  .bj-cta-list { column-count: 1; }
  .bj-kraken .section-title { font-size: 1.55rem; }
  .bj-license { padding: 22px 18px; }
  .bj-license-box { width: 104px; height: 84px; }
  .bj-trust { gap: 8px 16px; }
}
