*, *::before, *::after {
  box-sizing: border-box;
}

:root {
  color-scheme: light;
  --bg: #f4f6f8;
  --paper: #ffffff;
  --ink: #202833;
  --muted: #667386;
  --line: #e2e7ee;
  --blue: #1769b2;
  --blue-dark: #0f4e88;
  --orange: #e46f2d;
  --green: #1b8a66;
  --soft-blue: #eef6ff;
  --soft-gray: #f8fafc;
  --shadow: 0 10px 28px rgba(38, 55, 77, .08);
  --radius: 8px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: "Yu Gothic UI", "Hiragino Sans", Meiryo, system-ui, sans-serif;
  line-height: 1.85;
  letter-spacing: 0;
}

a {
  color: var(--blue);
  font-weight: 700;
  text-decoration: none;
}

a:hover {
  color: var(--blue-dark);
  text-decoration: underline;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(10px);
}

.site-footer {
  margin-top: 32px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.header-inner,
.footer-inner,
.article,
.blog-list {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.header-inner,
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 19px;
  font-weight: 900;
  letter-spacing: 0;
}

.brand::before {
  content: "";
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background:
    linear-gradient(135deg, var(--blue), var(--green));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .38);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 13px;
}

.nav a {
  padding: 7px 10px;
  border-radius: 999px;
  color: #435166;
  font-weight: 800;
}

.nav a:hover {
  background: var(--soft-blue);
  text-decoration: none;
}

.hero {
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, #fff 0%, #f7fbff 100%);
}

.article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 304px;
  gap: 28px;
  padding: 28px 0 54px;
}

.hero .article {
  align-items: stretch;
  padding: 26px 0;
}

.hero .article > div:first-child,
.article-body,
.side > *,
.blog-card,
.tool-visual {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.hero .article > div:first-child {
  padding: 26px 28px;
}

.breadcrumbs {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
}

.breadcrumbs a {
  color: var(--muted);
  font-weight: 700;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin: 0 0 12px;
  padding: 3px 10px;
  border-radius: 999px;
  color: var(--blue);
  background: var(--soft-blue);
  font-size: 12px;
  font-weight: 900;
}

h1,
h2,
h3 {
  line-height: 1.42;
  letter-spacing: 0;
}

h1 {
  margin: 0 0 14px;
  font-size: clamp(28px, 4.6vw, 42px);
}

h2 {
  position: relative;
  margin: 38px 0 16px;
  padding: 12px 14px 12px 18px;
  border-left: 5px solid var(--blue);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--soft-gray);
  font-size: 24px;
}

h3 {
  margin: 28px 0 10px;
  padding-bottom: 7px;
  border-bottom: 2px solid var(--line);
  font-size: 19px;
}

p {
  margin: 0 0 16px;
}

ul {
  margin: 0 0 18px;
  padding-left: 24px;
}

li + li {
  margin-top: 6px;
}

.lead {
  color: var(--muted);
  font-size: 16px;
}

.article-body {
  min-width: 0;
  padding: 30px;
}

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

.side {
  position: sticky;
  top: 78px;
  align-self: start;
  display: grid;
  gap: 14px;
}

.side > * {
  padding: 18px;
}

.toc strong,
.card strong {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 15px;
}

.toc strong::before,
.card strong::before {
  content: "";
  width: 4px;
  height: 18px;
  border-radius: 4px;
  background: var(--orange);
}

.toc ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 13px;
}

.card p {
  color: var(--muted);
  font-size: 13px;
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 6px;
  color: #fff;
  background: var(--blue);
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(23, 105, 178, .18);
}

.cta:hover {
  color: #fff;
  background: var(--blue-dark);
  text-decoration: none;
}

.cta.secondary {
  color: var(--blue);
  background: #fff;
  border: 1px solid #b8d5ef;
  box-shadow: none;
}

.cta.secondary:hover {
  color: var(--blue-dark);
  background: var(--soft-blue);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 0;
}

.tool-visual {
  min-height: 100%;
  padding: 20px;
  background:
    linear-gradient(rgba(23, 105, 178, .08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 105, 178, .08) 1px, transparent 1px),
    #ffffff;
  background-size: 22px 22px;
}

.map-demo {
  position: relative;
  min-height: 250px;
}

.node {
  position: absolute;
  width: 142px;
  padding: 10px 12px;
  border: 2px solid var(--blue);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 22px rgba(38, 55, 77, .12);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.45;
}

.node.root {
  left: 72px;
  top: 18px;
}

.node.a {
  left: 8px;
  top: 142px;
  border-color: var(--orange);
}

.node.b {
  right: 8px;
  top: 142px;
  border-color: var(--green);
}

.line {
  position: absolute;
  height: 2px;
  background: #93a4b8;
  transform-origin: left center;
}

.line.one {
  left: 86px;
  top: 112px;
  width: 88px;
  transform: rotate(56deg);
}

.line.two {
  left: 172px;
  top: 112px;
  width: 88px;
  transform: rotate(124deg);
}

.compare-table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  border-collapse: collapse;
  box-shadow: none;
}

.compare-table th,
.compare-table td {
  min-width: 120px;
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.compare-table th {
  color: #38475a;
  background: #eef4fa;
  font-size: 13px;
  white-space: nowrap;
}

.compare-table tr:last-child td {
  border-bottom: 0;
}

.rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: #fff;
  background: var(--orange);
  font-weight: 900;
}

.ranking-summary {
  display: grid;
  gap: 12px;
  margin: 22px 0 30px;
}

.rank-card {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: #fff;
  box-shadow: 0 8px 22px rgba(38, 55, 77, .07);
}

.rank-card.no1 {
  border-color: #f3c89c;
  background: #fffaf4;
}

.rank-card:hover {
  transform: translateY(-2px);
  text-decoration: none;
}

.rank-card strong {
  display: block;
  margin-bottom: 2px;
  font-size: 18px;
}

.rank-card span:last-child {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 30px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #fff;
  background: var(--orange);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.tool-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28);
}

.icon-logic { background: linear-gradient(135deg, #1769b2, #1b8a66); }
.icon-mm { background: linear-gradient(135deg, #1782c4, #3bb1d3); }
.icon-xm { background: linear-gradient(135deg, #1d252f, #667386); }
.icon-miro { background: linear-gradient(135deg, #ffd22e, #ff8f2d); color: #202833; }
.icon-cg { background: linear-gradient(135deg, #37a95c, #1b8a66); }

.criteria-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0 32px;
}

.criteria-grid div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.criteria-grid strong {
  display: block;
  margin-bottom: 4px;
  color: var(--blue-dark);
}

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

.tool-review {
  margin: 30px 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 10px 28px rgba(38, 55, 77, .08);
}

.tool-review.top {
  border-color: #f0c28d;
  background: linear-gradient(180deg, #fffaf4, #fff);
}

.tool-review-head {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.tool-review-head h2 {
  margin: 0 0 2px;
  padding: 0;
  border-left: 0;
  background: transparent;
}

.tool-review-head p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.score-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0 18px;
}

.score-row span {
  padding: 9px 10px;
  border-radius: 6px;
  color: #435166;
  background: #f2f7fb;
  font-size: 13px;
  font-weight: 800;
}

.score-row b {
  color: var(--orange);
  font-size: 16px;
}

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

.good-bad > div {
  padding: 16px;
  border-radius: var(--radius);
  background: var(--soft-gray);
}

.good-bad strong,
.recommend-box strong {
  display: block;
  margin-bottom: 8px;
  color: var(--blue-dark);
}

.good-bad ul {
  margin-bottom: 0;
}

.recommend-box {
  margin: 18px 0;
  padding: 16px;
  border: 1px solid #cfe1f3;
  border-radius: var(--radius);
  background: #f7fbff;
}

.note-box {
  margin: 22px 0;
  padding: 18px;
  border: 1px solid #cfe1f3;
  border-radius: var(--radius);
  background: #f7fbff;
}

.note-box strong {
  display: block;
  margin-bottom: 8px;
  color: var(--blue-dark);
}

.blog-list {
  padding: 34px 0 56px;
}

.blog-list h2 {
  margin-top: 0;
}

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

.blog-card {
  position: relative;
  display: grid;
  grid-template-rows: 104px auto auto;
  gap: 12px;
  min-height: 250px;
  padding: 0 18px 18px;
  color: var(--ink);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
}

.blog-card::before {
  content: "";
  margin: 0 -18px;
  background:
    linear-gradient(135deg, rgba(23, 105, 178, .92), rgba(27, 138, 102, .82)),
    linear-gradient(rgba(255, 255, 255, .25) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .25) 1px, transparent 1px);
  background-size: auto, 18px 18px, 18px 18px;
}

.blog-card strong {
  display: block;
  padding-top: 2px;
  font-size: 18px;
  line-height: 1.5;
}

.blog-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.blog-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 34px rgba(38, 55, 77, .13);
  text-decoration: none;
}

@media (max-width: 900px) {
  .article,
  .hero .article {
    grid-template-columns: 1fr;
  }

  .side {
    position: static;
  }

  .tool-visual {
    min-height: 260px;
  }
}

@media (max-width: 680px) {
  .header-inner,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .article,
  .hero .article,
  .blog-list {
    width: min(100% - 20px, 1120px);
  }

  .hero .article > div:first-child,
  .article-body {
    padding: 20px;
  }

  h1 {
    font-size: 27px;
  }

  h2 {
    font-size: 21px;
  }

  .blog-grid {
    grid-template-columns: 1fr;
  }

  .criteria-grid,
  .score-row,
  .good-bad {
    grid-template-columns: 1fr;
  }

  .rank-card,
  .tool-review-head {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .rank-card .rank-badge,
  .tool-review-head .rank-badge {
    grid-column: 1 / -1;
    justify-self: start;
  }
}
