@charset "utf-8";

:root {
  color-scheme: light;
  --bg: #f7f8f4;
  --surface: #ffffff;
  --surface-soft: #eef4eb;
  --ink: #263126;
  --muted: #657064;
  --line: #d7dfd3;
  --green: #4f6f35;
  --green-dark: #2f4d25;
  --teal: #23656b;
  --rust: #a65734;
  --gold: #c49a44;
  --shadow: 0 18px 45px rgba(38, 49, 38, 0.12);
  --content: min(1120px, calc(100vw - 40px));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(238, 244, 235, 0.72), rgba(247, 248, 244, 0.98) 360px),
    var(--bg);
  color: var(--ink);
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.8;
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

a {
  color: var(--teal);
  text-decoration: none;
  text-underline-offset: 0.2em;
}

a:hover,
a:focus-visible {
  color: var(--rust);
  text-decoration: underline;
}

:focus-visible {
  outline: 3px solid rgba(196, 154, 68, 0.7);
  outline-offset: 3px;
}

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

.site-header-inner {
  width: var(--content);
  margin: 0 auto;
  padding: 18px 0 14px;
  display: grid;
  gap: 14px;
}

.brand {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 18px;
  color: var(--ink);
}

.brand img {
  width: min(260px, 42vw);
}

.brand span {
  max-width: 620px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.65;
}

.global-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.global-nav a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--green-dark);
  font-weight: 700;
  font-size: 0.9rem;
}

.global-nav a[aria-current="page"] {
  background: var(--green-dark);
  border-color: var(--green-dark);
  color: #ffffff;
}

main {
  width: var(--content);
  margin: 0 auto;
  padding: 36px 0 64px;
}

.home-hero {
  position: relative;
  min-height: clamp(340px, 48vh, 500px);
  display: grid;
  align-items: end;
  overflow: hidden;
  border-radius: 8px;
  background: #23301f;
  box-shadow: var(--shadow);
}

.home-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
}

.home-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(20, 31, 22, 0.88), rgba(20, 31, 22, 0.52) 58%, rgba(20, 31, 22, 0.14));
}

.home-hero-text {
  position: relative;
  z-index: 1;
  width: min(720px, 92%);
  padding: clamp(30px, 6vw, 64px);
  color: #ffffff;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--rust);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.home-hero .eyebrow {
  color: #f4d58c;
}

.home-hero h1 {
  margin: 0;
  font-size: clamp(2.35rem, 6vw, 4.9rem);
  line-height: 1.12;
}

.home-hero p:last-child {
  max-width: 620px;
  margin: 20px 0 0;
  font-size: clamp(1rem, 2vw, 1.18rem);
  line-height: 1.9;
}

.intro-section {
  max-width: 920px;
  margin: 34px auto 28px;
  padding: 0 8px;
  color: var(--ink);
  font-size: 1.04rem;
}

.intro-section p {
  margin: 0 0 14px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-top: 30px;
}

.category-card {
  display: grid;
  grid-template-columns: minmax(180px, 38%) 1fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 12px 28px rgba(38, 49, 38, 0.08);
}

.category-image {
  min-height: 210px;
  background: var(--surface-soft);
}

.category-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-body {
  padding: 22px;
}

.category-body h2 {
  margin: 0 0 10px;
  font-size: 1.3rem;
  line-height: 1.4;
}

.category-body h2 a {
  color: var(--green-dark);
}

.category-body p {
  margin: 0 0 14px;
  color: var(--muted);
}

.category-body ul,
.side-section ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.category-body li + li {
  margin-top: 8px;
}

.category-body li a::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--gold);
  vertical-align: 0.12em;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.92rem;
}

.breadcrumb .separator {
  color: #a7b0a2;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 32px;
  align-items: start;
}

.article {
  min-width: 0;
}

.article-header {
  padding: clamp(28px, 5vw, 48px);
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.article-header h1 {
  margin: 0;
  color: var(--green-dark);
  font-size: clamp(2rem, 4vw, 3.35rem);
  line-height: 1.2;
}

.article-header > p:last-child {
  max-width: 760px;
  margin: 18px 0 0;
  color: var(--muted);
}

.article-body {
  margin-top: 28px;
  padding: clamp(24px, 4vw, 44px);
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.article-body h2 {
  margin: 32px 0 14px;
  padding: 0 0 10px;
  color: var(--green-dark);
  border-bottom: 3px solid var(--surface-soft);
  font-size: 1.55rem;
  line-height: 1.45;
}

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

.article-body h3 {
  margin: 34px 0 14px;
  padding-left: 14px;
  border-left: 5px solid var(--gold);
  color: var(--green-dark);
  font-size: 1.28rem;
  line-height: 1.5;
}

.article-body h4 {
  margin: 26px 0 8px;
  color: var(--rust);
  font-size: 1.08rem;
}

.article-body p,
.article-body ul,
.article-body ol,
.article-body dl {
  margin-top: 0;
  margin-bottom: 1.1em;
}

.article-body ul,
.article-body ol {
  padding-left: 1.4em;
}

.intent-panel {
  margin: 34px 0;
}

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

.intent-card {
  display: grid;
  gap: 6px;
  min-height: 132px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
  color: var(--ink);
}

.intent-card:hover,
.intent-card:focus-visible {
  border-color: rgba(166, 87, 52, 0.45);
  background: #ffffff;
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 10px 22px rgba(38, 49, 38, 0.08);
}

.intent-card strong {
  color: var(--green-dark);
  font-size: 1.04rem;
  line-height: 1.45;
}

.intent-card span {
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.65;
}

.cta-box,
.checklist-box,
.example-box,
.related-box {
  margin: 34px 0 0;
  padding: 22px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
}

.cta-box h2,
.checklist-box h2,
.example-box h2,
.related-box h2 {
  margin-top: 0;
  border-bottom-color: rgba(79, 111, 53, 0.18);
}

.checklist-box ul {
  margin-bottom: 0;
}

.checklist-box li + li {
  margin-top: 8px;
}

.example-box {
  background: #fffaf0;
}

.related-box {
  background: #fbfcfa;
}

.related-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding-left: 0;
  list-style: none;
}

.related-links li {
  margin: 0;
}

.related-links a {
  display: block;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  font-weight: 700;
}

.step-list {
  counter-reset: step;
  padding-left: 0;
  list-style: none;
}

.step-list li {
  position: relative;
  margin: 0 0 14px;
  padding-left: 44px;
}

.step-list li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: 0.2em;
  left: 0;
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--green-dark);
  color: #ffffff;
  font-size: 0.86rem;
  font-weight: 800;
}

.diagram-figure {
  margin: 28px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.diagram-figure img {
  display: block;
  width: 100%;
  border-radius: 6px;
}

.diagram-figure figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.92rem;
  text-align: center;
}

.article-body .left,
.article-body .imgL {
  float: left;
  width: min(130px, 38vw);
  margin: 4px 20px 12px 0;
}

.article-body .imgR {
  float: right;
  margin: 4px 0 12px 20px;
}

.text-style1 {
  color: var(--gold);
}

.text-style2,
.text-style3 {
  color: var(--green-dark);
  font-weight: 700;
}

.small-note {
  color: var(--muted);
  font-size: 0.86rem;
}

.article-body table {
  width: 100%;
  margin: 24px 0;
  border-collapse: collapse;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 0.96rem;
}

.article-body th,
.article-body td {
  padding: 12px 14px;
  border: 1px solid var(--line);
  vertical-align: top;
}

.article-body th {
  background: var(--surface-soft);
  color: var(--green-dark);
  text-align: left;
}

.article-body tr:nth-child(even) td {
  background: #fbfcfa;
}

.sidebar {
  position: sticky;
  top: 138px;
}

.side-box {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 24px rgba(38, 49, 38, 0.08);
}

.side-box h2 {
  margin: 0 0 14px;
  color: var(--green-dark);
  font-size: 1.05rem;
}

.side-section {
  border-top: 1px solid var(--line);
}

.side-section summary {
  cursor: pointer;
  padding: 12px 0;
  color: var(--green-dark);
  font-weight: 800;
}

.side-section li {
  margin: 0 0 8px;
  font-size: 0.92rem;
  line-height: 1.55;
}

.side-section a[aria-current="page"] {
  color: var(--rust);
  font-weight: 800;
}

.site-footer {
  background: #263126;
  color: #eef4eb;
}

.site-footer-inner {
  width: var(--content);
  margin: 0 auto;
  padding: 34px 0;
  display: grid;
  gap: 12px;
}

.site-footer p {
  margin: 0;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.site-footer a {
  color: #f4d58c;
}

.copyright {
  color: #bdc9b8;
  font-size: 0.9rem;
}

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

  .sidebar {
    position: static;
  }
}

@media (max-width: 720px) {
  :root {
    --content: min(100vw - 24px, 1120px);
  }

  .site-header {
    position: static;
  }

  .brand {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .brand img {
    width: min(250px, 72vw);
  }

  .brand span {
    font-size: 0.86rem;
  }

  .global-nav {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
  }

  .global-nav a {
    flex: 0 0 auto;
    font-size: 0.84rem;
  }

  main {
    padding-top: 20px;
  }

  .home-hero {
    min-height: 390px;
  }

  .home-hero::after {
    background: linear-gradient(180deg, rgba(20, 31, 22, 0.28), rgba(20, 31, 22, 0.88));
  }

  .home-hero-text {
    width: 100%;
    padding: 24px;
  }

  .category-card {
    grid-template-columns: 1fr;
  }

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

  .related-links {
    grid-template-columns: 1fr;
  }

  .category-image {
    min-height: 180px;
  }

  .article-header,
  .article-body {
    padding: 22px;
  }

  .article-body .left,
  .article-body .imgL,
  .article-body .imgR {
    float: none;
    display: block;
    margin: 0 0 18px;
  }

  .article-body {
    overflow-x: auto;
  }
}
