/* ═══════════ Pigeon Workflow Help — Shared Design System ═══════════ */
:root {
  --primary: #0055FF;
  --primary-600: #0044CC;
  --primary-50: #EAF0FF;
  --primary-100: #D6E0FF;
  --bg: #FBF9F4;
  --card: #FFFFFF;
  --ink: #0B0E14;
  --ink-2: #1B2030;
  --muted: #6B7280;
  --muted-2: #9AA0AB;
  --line: #E8E4DA;
  --line-2: #EFECE3;
  --dark: #0F1320;
  --dark-2: #181D2D;
  --green: #16A34A;
  --amber: #F59E0B;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Plus Jakarta Sans", "Noto Sans JP", system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "palt" 1;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; }

/* ───── Nav ───── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 249, 244, 0.85);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 1280px; margin: 0 auto;
  height: 64px;
  padding: 0 32px;
  display: flex; align-items: center; gap: 20px;
  white-space: nowrap;
}
.logo {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 17px; letter-spacing: -0.01em;
  white-space: nowrap;
  flex-shrink: 0;
}
.logo-mark {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--ink); color: #fff;
  display: grid; place-items: center;
  box-shadow: inset 0 0 0 3px var(--bg), 0 0 0 1px var(--ink);
  flex-shrink: 0;
}
.logo-mark svg { width: 14px; height: 14px; }
.help-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px; border-radius: 999px;
  background: var(--primary-50); color: var(--primary);
  font-size: 11px; font-weight: 700; letter-spacing: 0.02em;
  white-space: nowrap; flex-shrink: 0;
}
.help-badge::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--primary);
}
.nav-links {
  display: flex; align-items: center; gap: 2px;
  margin-left: 4px; flex-shrink: 0;
}
.nav-links a {
  padding: 7px 12px; border-radius: 8px;
  font-size: 13px; font-weight: 600; color: #2A3142;
  transition: all .15s ease; white-space: nowrap;
}
.nav-links a:hover { background: var(--line-2); color: var(--ink); }
.nav-links a.active { color: var(--primary); }
.nav-search {
  margin-left: auto;
  display: flex; align-items: center; gap: 8px;
  padding: 7px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  width: 240px; min-width: 0;
  transition: all .15s ease; flex-shrink: 1;
}
.nav-search:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-50);
}
.nav-search svg { width: 16px; height: 16px; color: var(--muted); flex-shrink: 0; }
.nav-search input {
  border: 0; outline: 0; background: transparent;
  font-family: inherit; font-size: 13px;
  width: 100%; color: var(--ink);
}
.nav-search kbd {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px; padding: 2px 6px;
  background: var(--line-2); border-radius: 4px;
  color: var(--muted); border: 1px solid var(--line);
}
.btn-primary {
  background: var(--primary); color: #fff;
  padding: 8px 16px; border-radius: 10px;
  font-weight: 700; font-size: 13px;
  transition: all .15s ease;
  box-shadow: 0 1px 0 rgba(0,0,0,.05);
  white-space: nowrap; flex-shrink: 0;
}
.btn-primary:hover { background: var(--primary-600); transform: translateY(-1px); }

/* ───── Breadcrumb ───── */
.breadcrumb {
  max-width: 1280px; margin: 0 auto;
  padding: 24px 32px 0;
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 8px;
  font-size: 13px; color: var(--muted);
}
.breadcrumb a { color: var(--muted); transition: color .15s ease; font-weight: 500; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { color: var(--muted-2); opacity: .6; }
.breadcrumb .here { color: var(--ink); font-weight: 600; }

/* ───── CTA Banner ───── */
.cta {
  max-width: 1280px; margin: 96px auto 0; padding: 0 32px;
}
.cta-inner {
  background: var(--primary);
  border-radius: 24px;
  padding: 56px;
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: space-between;
  gap: 32px;
}
.cta-inner::before {
  content: ""; position: absolute;
  right: -100px; top: -100px;
  width: 400px; height: 400px; border-radius: 50%;
  background: none;
}
.cta-inner::after {
  content: ""; position: absolute;
  left: -60px; bottom: -120px;
  width: 320px; height: 320px; border-radius: 50%;
  background: none;
}
.cta-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black, transparent);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black, transparent);
}
.cta-text { position: relative; z-index: 1; color: #fff; }
.cta-text .kicker {
  display: inline-block;
  font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  background: rgba(255,255,255,.18);
  padding: 5px 12px; border-radius: 999px;
  margin-bottom: 16px;
}
.cta-text h2 {
  font-size: 38px; font-weight: 800; margin: 0 0 8px;
  letter-spacing: -0.02em; line-height: 1.2;
}
.cta-text p {
  font-size: 16px; opacity: 0.85; margin: 0;
  max-width: 480px;
}
.cta-actions { position: relative; z-index: 1; display: flex; gap: 12px; flex-shrink: 0; }
.cta-btn-1 {
  background: #fff; color: var(--primary);
  padding: 14px 24px; border-radius: 11px;
  font-weight: 700; font-size: 15px;
  transition: all .15s ease;
  display: inline-flex; align-items: center; gap: 8px;
}
.cta-btn-1:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -8px rgba(0,0,0,.25); }
.cta-btn-2 {
  background: rgba(255,255,255,.12); color: #fff;
  border: 1px solid rgba(255,255,255,.25);
  padding: 14px 24px; border-radius: 11px;
  font-weight: 600; font-size: 15px;
  transition: all .15s ease;
  backdrop-filter: blur(8px);
}
.cta-btn-2:hover { background: rgba(255,255,255,.2); }

/* ───── Footer ───── */
footer {
  margin-top: 96px;
  background: var(--dark);
  color: #C4CAD8;
}
.footer-inner {
  max-width: 1280px; margin: 0 auto;
  padding: 64px 32px 32px;
}
.footer-top {
  display: grid; grid-template-columns: 1.4fr repeat(4, 1fr);
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.footer-brand .logo-mark {
  background: #fff; color: var(--dark);
  box-shadow: inset 0 0 0 3px var(--dark), 0 0 0 1px #fff;
}
.footer-brand .brand-name { color: #fff; }
.footer-brand p {
  margin: 16px 0 0; font-size: 13px;
  color: #8A92A5; line-height: 1.7;
  max-width: 280px;
}
.footer-col h4 {
  color: #fff; font-size: 13px;
  font-weight: 700; margin: 0 0 16px;
  letter-spacing: 0.02em;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col a {
  font-size: 13px; color: #8A92A5;
  transition: color .15s ease;
}
.footer-col a:hover { color: #fff; }
.footer-bottom {
  padding-top: 28px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; color: #6B7388;
}
.footer-bottom .social { display: flex; gap: 16px; }
.footer-bottom .social a {
  width: 32px; height: 32px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,.1);
  display: grid; place-items: center;
  color: #8A92A5;
  transition: all .15s ease;
}
.footer-bottom .social a:hover { background: rgba(255,255,255,.06); color: #fff; }
.footer-bottom .social svg { width: 14px; height: 14px; }

/* ───── Inline SVG icon sizing (replaces former emoji spans) ───── */
.ico, .bc-ico, .em, .h-emoji, .s-emoji, .tag-emoji, .big-emoji,
.dm-em, .toc-em, .emoji-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: currentColor;
}
.ico svg, .bc-ico svg, .em svg, .h-emoji svg, .s-emoji svg,
.tag-emoji svg, .big-emoji svg, .dm-em svg, .toc-em svg,
.emoji-icon svg {
  display: block;
}

.ico { width: 14px; height: 14px; }
.ico svg { width: 14px; height: 14px; }

.bc-ico { width: 14px; height: 14px; opacity: 0.7; }
.bc-ico svg { width: 14px; height: 14px; }

.tag-emoji { width: 13px; height: 13px; }
.tag-emoji svg { width: 13px; height: 13px; }

.h-emoji { width: 14px; height: 14px; color: var(--primary); opacity: 0.85; }
.h-emoji svg { width: 14px; height: 14px; }

.s-emoji { width: 16px; height: 16px; color: var(--muted-2); }
.s-emoji svg { width: 14px; height: 14px; }
.side-section a.active .s-emoji { color: var(--primary); }
.side-section a:hover .s-emoji { color: var(--muted); }

.dm-em { width: 12px; height: 12px; }
.dm-em svg { width: 12px; height: 12px; }

.meta-pill .em { width: 14px; height: 14px; color: var(--muted-2); }
.meta-pill .em svg { width: 14px; height: 14px; }

.step-body h3 .em { width: 16px; height: 16px; color: var(--primary); }
.step-body h3 .em svg { width: 16px; height: 16px; }

.learn-box h4 .em { width: 16px; height: 16px; }
.learn-box h4 .em svg { width: 16px; height: 16px; }

.toc-box h4 .em { width: 15px; height: 15px; }
.toc-box h4 .em svg { width: 15px; height: 15px; }

.toc-rail h4 .em { width: 14px; height: 14px; }
.toc-rail h4 .em svg { width: 14px; height: 14px; }

.feedback h3 .em, .feedback-btn .em { width: 16px; height: 16px; color: var(--primary); }
.feedback h3 .em svg, .feedback-btn .em svg { width: 16px; height: 16px; }
.helpful-btn .em { width: 14px; height: 14px; color: var(--muted); }
.helpful-btn .em svg { width: 14px; height: 14px; }
.helpful-btn:hover .em { color: var(--primary); }
.helpful-text .em { width: 18px; height: 18px; }
.helpful-text .em svg { width: 18px; height: 18px; }

.code-copy .em { width: 12px; height: 12px; }
.code-copy .em svg { width: 12px; height: 12px; }

/* ───── Reusable Visual Components ───── */

/* Node canvas — mock workflow illustration */
.node-canvas {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 24px -16px rgba(11,14,20,.12);
}
.node-canvas-bar {
  position: relative; z-index: 2;
  height: 36px;
  padding: 0 14px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; color: var(--muted); font-weight: 600;
  font-family: "JetBrains Mono", monospace;
}
.node-canvas-bar .dots { display: flex; gap: 5px; margin-right: 4px; }
.node-canvas-bar .dot { width: 9px; height: 9px; border-radius: 50%; }
.node-canvas-bar .dot.r { background: #FF5F57; }
.node-canvas-bar .dot.y { background: #FEBC2E; }
.node-canvas-bar .dot.g { background: #28C840; }
.node-canvas-bar .file-name { color: var(--ink); }
.node-canvas-bar .status {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 8px; border-radius: 5px;
  background: var(--line-2);
  color: var(--muted); font-size: 10px;
}
.node-canvas-bar .status::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--green);
}
.node-canvas-area {
  position: relative;
  background: var(--bg);
  background-image: radial-gradient(circle, rgba(11,14,20,.10) 1px, transparent 1px);
  background-size: 14px 14px;
  min-height: 240px;
  padding: 24px;
}
.canvas-node {
  position: absolute;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 13px 9px 9px;
  display: flex; align-items: center; gap: 10px;
  box-shadow: 0 6px 16px -8px rgba(0,0,0,.12), 0 1px 2px rgba(0,0,0,.04);
  z-index: 2;
  min-width: 140px;
}
.canvas-node.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-50), 0 6px 16px -8px rgba(0,85,255,.25);
}
.canvas-node .n-icon {
  width: 26px; height: 26px; border-radius: 7px;
  background: var(--primary-50); color: var(--primary);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.canvas-node.is-trigger .n-icon { background: #FFF1E6; color: #E07B30; }
.canvas-node.is-ai .n-icon { background: var(--primary-50); color: var(--primary); }
.canvas-node.is-output .n-icon { background: #E8F5EE; color: #16A34A; }
.canvas-node.is-cond .n-icon { background: #FFF9E0; color: #B07F00; }
.canvas-node .n-icon svg { width: 14px; height: 14px; }
.canvas-node .n-text { display: flex; flex-direction: column; gap: 1px; line-height: 1.1; }
.canvas-node .n-name { font-size: 12px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.canvas-node .n-sub { font-size: 10px; color: var(--muted); font-weight: 500; white-space: nowrap; }
.canvas-node::before, .canvas-node::after {
  content: ""; position: absolute; top: 50%; transform: translateY(-50%);
  width: 6px; height: 6px; border-radius: 50%;
  background: #fff; border: 1.5px solid var(--muted-2);
}
.canvas-node::before { left: -4px; }
.canvas-node::after { right: -4px; }
.canvas-node.no-in::before { display: none; }
.canvas-node.no-out::after { display: none; }
.canvas-line {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 1;
}
.canvas-line path {
  stroke: var(--muted-2);
  stroke-width: 1.5;
  fill: none;
  stroke-dasharray: 4 4;
}
.canvas-line path.live {
  stroke: var(--primary);
  stroke-dasharray: none;
  stroke-width: 2;
}

/* Mini node thumb (for cards) */
.node-thumb {
  position: relative;
  width: 72px; height: 72px;
  background: var(--bg);
  background-image: radial-gradient(circle, rgba(11,14,20,.12) 1px, transparent 1px);
  background-size: 10px 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  flex-shrink: 0;
  overflow: hidden;
}
.node-thumb .mini-node {
  position: absolute;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 3px 5px;
  font-size: 8px;
  font-weight: 700;
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
  display: flex; align-items: center; gap: 3px;
  white-space: nowrap;
  line-height: 1;
}
.node-thumb .mini-node .mdot {
  width: 6px; height: 6px; border-radius: 2px;
  background: var(--primary);
}
.node-thumb .mini-node.is-trigger .mdot { background: #E07B30; }
.node-thumb .mini-node.is-output .mdot { background: #16A34A; }
.node-thumb .mini-node.is-cond .mdot { background: #B07F00; }
.node-thumb svg.mini-line {
  position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none;
}
.node-thumb svg.mini-line path {
  stroke: var(--muted-2); stroke-width: 1; fill: none; stroke-dasharray: 2 2;
}

/* Keyboard cap */
.kbd-cap {
  display: inline-flex; align-items: center;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px; font-weight: 600;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 2px 7px;
  line-height: 1.4;
  vertical-align: 1px;
}
.kbd-row { display: inline-flex; align-items: center; gap: 4px; vertical-align: -2px; }
.kbd-row .plus { color: var(--muted-2); font-size: 11px; font-weight: 700; }

/* Difficulty pips */
.diff-pips { display: inline-flex; align-items: center; gap: 3px; }
.diff-pips .pip {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--line);
}
.diff-pips .pip.on { background: var(--primary); }

/* Difficulty badges (colored) */
.diff-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.diff-badge::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
}
.diff-badge.lv-beg { background: #E8F5EE; color: #15803D; }
.diff-badge.lv-beg::before { background: #16A34A; }
.diff-badge.lv-mid { background: #FFF7E5; color: #B45309; }
.diff-badge.lv-mid::before { background: #F59E0B; }
.diff-badge.lv-adv { background: #FEE7E7; color: #B91C1C; }
.diff-badge.lv-adv::before { background: #EF4444; }

/* Emoji icon wrapper — circular tinted background */
.emoji-icon {
  display: inline-grid; place-items: center;
  border-radius: 50%;
  background: rgba(0, 85, 255, 0.10);
  flex-shrink: 0;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  line-height: 1;
}
.emoji-icon.sz-sm { width: 28px; height: 28px; font-size: 14px; }
.emoji-icon.sz-md { width: 40px; height: 40px; font-size: 20px; }
.emoji-icon.sz-lg { width: 56px; height: 56px; font-size: 28px; }
.emoji-icon.sz-xl { width: 80px; height: 80px; font-size: 40px; }

/* Doc icon (small page glyph) */
.doc-glyph {
  width: 24px; height: 24px; border-radius: 5px;
  background: #fff;
  border: 1px solid var(--line);
  position: relative;
  flex-shrink: 0;
}
.doc-glyph::before {
  content: ""; position: absolute;
  top: -1px; right: -1px;
  width: 8px; height: 8px;
  background: var(--bg);
  border-left: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-bottom-left-radius: 3px;
}
.doc-glyph::after {
  content: ""; position: absolute;
  left: 4px; right: 4px; top: 8px; bottom: 4px;
  background:
    linear-gradient(to bottom, var(--line) 0 1px, transparent 1px 4px) repeat-y;
  background-size: 100% 4px;
}

/* Reading progress bar (fixed top) */
.read-progress {
  position: fixed; top: 0; left: 0; right: 0;
  height: 3px;
  background: transparent;
  z-index: 100;
  pointer-events: none;
}
.read-progress > div {
  height: 100%; width: 0%;
  background: var(--primary);
  transition: width .1s linear;
  box-shadow: 0 0 8px rgba(0,85,255,.5);
}

@media (max-width: 980px) {
  .nav-links { display: none; }
  .nav-search { width: auto; flex: 1; }
  .cta-inner { flex-direction: column; align-items: flex-start; padding: 40px; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}

/* ── prefers-reduced-motion: ユーザーが動きを抑えたい指定 ── */
@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .hero-mock, .pw-home .hero-mock { transform: none !important; }
}

/* ── skip-to-main: キーボード操作時のみ表示するスキップリンク ── */
.skip-to-main { position: absolute; left: -9999px; top: 0; z-index: 9999; padding: 8px 16px; background: var(--primary); color: #fff; text-decoration: none; font-weight: 700; border-radius: 0 0 8px 0; }
.skip-to-main:focus { left: 0; outline: 2px solid var(--ink); }
