:root {
  --bg: #ffffff;
  --ink: #111827;
  --muted: #5f6b7a;
  --line: #d9e2ec;
  --soft: #f4f7fb;
  --panel: #ffffff;
  --navy: #002060;
  --blue: #0070c0;
  --blue-soft: #e8f3ff;
  --orange: #ed7d31;
  --green: #70ad47;
  --red: #c00000;
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
  font-family: "Meiryo UI", Meiryo, "Yu Gothic", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  overflow-x: hidden;
}

body.dark {
  --bg: #070b14;
  --ink: #f8fafc;
  --muted: #a8b4c6;
  --line: #223049;
  --soft: #0d1524;
  --panel: #111b2d;
  --navy: #dcecff;
  --blue: #4da3ff;
  --blue-soft: #102a46;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(20px, 4vw, 64px);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--navy);
  font-weight: 700;
  letter-spacing: 0;
}

body.dark .brand {
  color: #dcecff;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, #4da3ff, #70ad47);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(77, 163, 255, 0.22);
}

.nav-links {
  display: flex;
  gap: 24px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

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

.section-band {
  padding: clamp(56px, 8vw, 96px) clamp(20px, 5vw, 72px);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 520px);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  min-height: 620px;
  background:
    radial-gradient(circle at 72% 28%, rgba(77, 163, 255, 0.2), transparent 28%),
    linear-gradient(135deg, rgba(112, 173, 71, 0.08), transparent 38%),
    linear-gradient(180deg, var(--bg), var(--soft));
}

.hero h1 {
  margin: 0;
  max-width: 760px;
  color: var(--navy);
  font-size: clamp(38px, 5vw, 68px);
  line-height: 1.12;
  letter-spacing: 0;
}

body.dark .hero h1 {
  color: #eef6ff;
}

.hero p {
  max-width: 650px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.9;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 8px;
  border: 1px solid var(--line);
  font-size: 14px;
  font-weight: 700;
}

.button.primary {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.button.secondary {
  background: var(--panel);
}

.hero-visual {
  min-width: 0;
}

.flow-panel {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

body.dark .flow-panel,
body.dark .result-panel,
body.dark .tool-card,
body.dark .prompt-card,
body.dark .agent-panel,
body.dark .agent-template-card,
body.dark .purpose-button {
  background: linear-gradient(180deg, rgba(17, 27, 45, 0.98), rgba(12, 20, 34, 0.98));
}

.flow-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.live-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 6px rgba(112, 173, 71, 0.14);
}

.flow-step {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.flow-step + .flow-step {
  margin-top: 12px;
}

.flow-step.active {
  border-color: rgba(77, 163, 255, 0.55);
  background:
    linear-gradient(135deg, rgba(77, 163, 255, 0.16), rgba(112, 173, 71, 0.08)),
    var(--blue-soft);
}

.flow-step:hover,
.flow-step:focus-visible {
  border-color: rgba(77, 163, 255, 0.68);
  background: color-mix(in srgb, var(--blue-soft) 72%, var(--panel));
  transform: translateY(-2px);
  outline: none;
}

.step-index {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: var(--navy);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.flow-step:nth-of-type(2) .step-index {
  background: var(--orange);
}

.flow-step:nth-of-type(3) .step-index {
  background: var(--green);
  color: #07130b;
}

.flow-step:nth-of-type(4) .step-index {
  background: linear-gradient(135deg, #4da3ff, #ed7d31);
}

.flow-step strong {
  display: block;
  margin-bottom: 5px;
}

.flow-step p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  max-width: 1120px;
  margin: -42px auto 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--line);
  box-shadow: var(--shadow);
}

.summary-strip div {
  display: grid;
  gap: 4px;
  padding: 22px;
  background: var(--panel);
  text-align: center;
}

.summary-strip strong {
  color: var(--blue);
  font-size: 28px;
}

.summary-strip span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.section {
  padding: clamp(64px, 8vw, 96px) clamp(20px, 5vw, 72px);
}

.muted-section {
  background: var(--soft);
}

.agent-section {
  background:
    radial-gradient(circle at 12% 20%, rgba(237, 125, 49, 0.12), transparent 30%),
    radial-gradient(circle at 86% 8%, rgba(77, 163, 255, 0.16), transparent 28%),
    linear-gradient(180deg, #0a101c, #0d1524 54%, #070b14);
}

.agent-heading {
  align-items: center;
}

.agent-hero,
.agent-layout,
.agent-templates {
  max-width: 1180px;
  margin: 0 auto;
}

.agent-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
  gap: 22px;
  margin-bottom: 22px;
}

.agent-principle,
.agent-map,
.agent-panel,
.agent-template-card {
  border: 1px solid rgba(77, 163, 255, 0.2);
  border-radius: 8px;
  background: rgba(17, 27, 45, 0.76);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

.agent-principle {
  position: relative;
  min-height: 280px;
  padding: clamp(24px, 4vw, 42px);
  overflow: hidden;
}

.agent-principle::after {
  content: "";
  position: absolute;
  right: -80px;
  bottom: -120px;
  width: 280px;
  height: 280px;
  border: 1px solid rgba(77, 163, 255, 0.18);
  border-radius: 50%;
}

.agent-index {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  margin-bottom: 24px;
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.agent-principle h3 {
  position: relative;
  z-index: 1;
  max-width: 650px;
  margin: 0;
  color: #eef6ff;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.35;
}

.agent-principle p {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.9;
}

.agent-map {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  background: rgba(77, 163, 255, 0.2);
}

.agent-map div {
  display: grid;
  align-content: center;
  min-height: 138px;
  padding: 22px;
  background: rgba(9, 17, 30, 0.94);
}

.agent-map strong {
  color: #eef6ff;
  font-size: 22px;
}

.agent-map span {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.agent-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
  gap: 22px;
}

.agent-panel {
  padding: 22px;
}

.agent-panel h3,
.compact-heading h3 {
  margin: 0 0 18px;
  color: #eef6ff;
  font-size: 24px;
}

.agent-usecase-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.agent-usecase {
  min-height: 156px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.agent-usecase span {
  color: #91c8ff;
  font-size: 12px;
  font-weight: 800;
}

.agent-usecase h4,
.agent-template-card h4 {
  margin: 9px 0 8px;
  color: #eef6ff;
  font-size: 17px;
}

.agent-usecase p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
}

.agent-steps ol {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.agent-steps li {
  position: relative;
  padding: 0 0 16px 42px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  counter-increment: step;
}

.agent-steps li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.agent-steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 8px;
  background: rgba(77, 163, 255, 0.18);
  color: #91c8ff;
  font-size: 11px;
  font-weight: 800;
}

.agent-steps strong {
  display: block;
  color: #eef6ff;
  font-size: 14px;
  line-height: 1.6;
}

.agent-steps span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.agent-templates {
  margin-top: 28px;
}

.compact-heading {
  margin-bottom: 18px;
}

.agent-template-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.agent-template-card {
  padding: 20px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  max-width: 1180px;
  margin: 0 auto 28px;
}

.section-heading h2 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(28px, 3vw, 40px);
}

body.dark .section-heading h2 {
  color: #eef6ff;
}

.section-heading p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.diagnosis-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 420px);
  gap: 24px;
  max-width: 1180px;
  margin: 0 auto;
}

.purpose-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.purpose-button,
.tab-button,
.copy-button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
}

.purpose-button {
  min-height: 88px;
  padding: 18px;
  text-align: left;
}

.purpose-button strong {
  display: block;
  margin-bottom: 7px;
  color: var(--navy);
}

body.dark .purpose-button strong {
  color: #dcecff;
}

.purpose-button span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.purpose-button.selected {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.result-panel,
.tool-card,
.prompt-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.06);
}

.result-panel {
  align-self: start;
  padding: 22px;
  position: sticky;
  top: 88px;
}

body.dark .result-panel {
  border-color: rgba(77, 163, 255, 0.55);
  box-shadow:
    0 0 0 1px rgba(77, 163, 255, 0.12),
    0 24px 70px rgba(0, 0, 0, 0.5),
    0 0 42px rgba(77, 163, 255, 0.12);
}

.result-panel h3 {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  color: var(--navy);
  font-size: 24px;
}

.result-panel h3::before {
  content: "";
  width: 10px;
  height: 28px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--blue), var(--green));
}

.result-lead {
  margin: 0 0 8px;
  padding: 12px 14px;
  border: 1px solid rgba(77, 163, 255, 0.25);
  border-radius: 8px;
  background: rgba(77, 163, 255, 0.08);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.7;
}

body.dark .result-panel h3 {
  color: #eef6ff;
}

.recommendation {
  margin-top: 12px;
  padding: 14px;
  border-top: 1px solid var(--line);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.recommendation strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
}

.recommendation p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.action-card {
  position: relative;
  margin-top: 18px;
  padding: 18px 18px 18px 54px;
  border: 1px solid rgba(112, 173, 71, 0.42);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(112, 173, 71, 0.16), rgba(77, 163, 255, 0.08)),
    rgba(255, 255, 255, 0.03);
}

.action-card::before {
  content: "01";
  position: absolute;
  left: 16px;
  top: 18px;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 8px;
  background: var(--green);
  color: #06110b;
  font-size: 12px;
  font-weight: 800;
}

.action-label {
  margin-bottom: 7px;
  color: #b9e49d;
  font-size: 13px;
  font-weight: 800;
}

.action-card p {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.8;
}

.search-box {
  display: grid;
  gap: 8px;
  min-width: min(360px, 100%);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.search-box input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  padding: 0 14px;
  font: inherit;
}

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 1180px;
  margin: 0 auto 22px;
}

.tab-button {
  min-height: 38px;
  padding: 0 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.tab-button.active {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.tool-grid,
.prompt-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  max-width: 1180px;
  margin: 0 auto;
}

.tool-card,
.prompt-card,
.agent-template-card {
  padding: 20px;
}

.tool-card h3,
.prompt-card h3 {
  margin: 0 0 10px;
  color: var(--navy);
  font-size: 18px;
}

body.dark .tool-card h3,
body.dark .prompt-card h3 {
  color: #eef6ff;
}

.tool-card p,
.prompt-card p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.meta {
  padding: 5px 8px;
  border-radius: 6px;
  background: var(--soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.tool-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  background: var(--navy);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.prompt-text {
  min-height: 118px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.75;
  white-space: pre-wrap;
}

.copy-button {
  width: 100%;
  min-height: 40px;
  margin-top: 14px;
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
  font-size: 13px;
  font-weight: 700;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  padding: 12px 16px;
  border-radius: 8px;
  background: var(--navy);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  transition: 0.2s ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

@media (max-width: 920px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .hero,
  .agent-hero,
  .agent-layout,
  .diagnosis-layout,
  .section-heading {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .summary-strip,
  .tool-grid,
  .prompt-grid,
  .agent-template-grid {
    grid-template-columns: 1fr;
  }

  .summary-strip {
    margin: 0 20px;
  }

  .result-panel {
    position: static;
  }

  .agent-usecase-grid,
  .agent-map {
    grid-template-columns: 1fr;
  }
}

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

  .hero-actions {
    display: grid;
  }

  .button {
    width: 100%;
  }
}
