:root {
  --ink: #10243d;
  --muted: #5e6b78;
  --paper: #ffffff;
  --mist: #f3f6f8;
  --line: #dbe5ec;
  --teal: #007f89;
  --teal-soft: #e1f5f5;
  --gold: #f4b942;
  --green: #1b8a5a;
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "Noto Sans JP", "Hiragino Sans", "Yu Gothic", Meiryo, Arial, sans-serif;
  color: var(--ink);
  background: #f8fafb;
  line-height: 1.7;
}

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

.shell {
  width: min(1080px, calc(100% - 40px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(219, 229, 236, 0.9);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
}

.nav {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 850;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--ink), var(--teal));
  color: white;
}

.nav-links {
  display: flex;
  gap: 4px;
}

.nav-links a {
  padding: 9px 11px;
  border-radius: 8px;
  color: #334456;
  font-size: 14px;
  font-weight: 750;
}

.nav-links a:hover {
  background: var(--mist);
}

.hero {
  padding: 54px 0 34px;
  background: linear-gradient(180deg, white 0%, #f8fafb 100%);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.breadcrumbs a {
  color: var(--teal);
}

.kicker {
  margin: 28px 0 8px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  max-width: 850px;
  margin: 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.05;
  letter-spacing: 0;
}

.lead {
  max-width: 780px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  align-items: start;
  padding: 34px 0 56px;
}

.article {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: 0 12px 34px rgba(16, 36, 61, 0.06);
}

.article h2 {
  margin: 34px 0 10px;
  font-size: 28px;
  line-height: 1.2;
}

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

.article h3 {
  margin: 24px 0 8px;
  font-size: 20px;
}

.article p,
.article li {
  color: #415061;
}

.article ul {
  padding-left: 20px;
}

.note {
  margin: 22px 0;
  padding: 16px;
  border-left: 4px solid var(--teal);
  border-radius: 8px;
  background: var(--teal-soft);
  color: var(--ink);
  font-weight: 750;
}

.side {
  display: grid;
  gap: 14px;
}

.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: 0 8px 24px rgba(16, 36, 61, 0.05);
}

.panel h2,
.panel h3 {
  margin: 0 0 10px;
  font-size: 18px;
}

.category-nav,
.related-list {
  display: grid;
  gap: 8px;
}

.category-nav a,
.related-list a {
  padding: 10px 11px;
  border-radius: 8px;
  background: var(--mist);
  color: #334456;
  font-size: 14px;
  font-weight: 800;
}

.category-nav a:hover,
.related-list a:hover {
  background: var(--teal-soft);
  color: var(--teal);
}

.cta {
  background: var(--ink);
  color: white;
}

.cta p {
  color: #d4dde5;
}

.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  padding: 11px 16px;
  border-radius: 8px;
  background: var(--teal);
  color: white;
  font-weight: 850;
}

.btn-light {
  margin-top: 10px;
  background: white;
  color: var(--ink);
}

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

.guide-card {
  display: grid;
  gap: 8px;
  min-height: 168px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
}

.guide-card[hidden],
.empty[hidden] {
  display: none;
}

.guide-card h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
}

.guide-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.search-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 12px;
  margin: 0 0 18px;
}

.search-row input {
  min-height: 46px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.chips button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  background: white;
  color: #415061;
  font-weight: 800;
  cursor: pointer;
}

.chips button.active {
  border-color: #b7e6e6;
  background: var(--teal-soft);
  color: var(--teal);
}

footer {
  padding: 28px 0;
  background: var(--ink);
  color: #d4dde5;
  font-size: 13px;
}

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

  .guide-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .shell {
    width: min(100% - 28px, 1080px);
  }

  .nav-links {
    display: none;
  }

  .article {
    padding: 22px;
  }

  .guide-grid,
  .search-row {
    grid-template-columns: 1fr;
  }

  .chips {
    justify-content: flex-start;
  }
}
