:root {
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  font-size: 16px;
  color: #232c26;
  background: #faf9f5;
  --paper: #faf9f5;
  --white: #fff;
  --green: #254a3a;
  --muted: #515c53;
  --line: #dbdfd6;
  --wash: #eef1e9;
  --warm: #eee8db;
  font-synthesis: none;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 1.25rem; }
body { margin: 0; line-height: 1.75; }
img { display: block; max-width: 100%; }
a { color: var(--green); text-underline-offset: .2em; }
button, input { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #8c4c2e; outline-offset: 4px; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.45; }
h1 { font-size: clamp(1.75rem, 3.75vw, 2.8rem); letter-spacing: .02em; }
h2 { font-size: 1.375rem; letter-spacing: .04em; }
.wrap { width: min(1160px, calc(100% - 72px)); margin-inline: auto; }

.visually-hidden, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link:focus {
  position: absolute;
  z-index: 2;
  top: .5rem;
  left: .5rem;
  padding: .6rem 1rem;
  background: var(--white);
}

.site-header { background: var(--paper); }
.header-inner, .footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 1.5rem;
}
.header-inner { min-height: 74px; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  color: var(--green);
  font-weight: 800;
  letter-spacing: .04em;
  text-decoration: none;
}
.brand img { width: 36px; height: 36px; flex-shrink: 0; }
.main-nav, .footer-links { display: flex; flex-wrap: wrap; gap: .5rem 1.6rem; }
.main-nav a, .footer-links a {
  padding-block: .35rem;
  font-size: .875rem;
  font-weight: 700;
  text-decoration: none;
}
.main-nav a:hover, .main-nav [aria-current], .footer-links a:hover { text-decoration: underline; }
.site-footer { padding-block: 1.8rem; border-top: 1px solid var(--line); background: var(--wash); }
.footer-links { gap: .35rem 1.15rem; }

.hero {
  border-block: 1px solid #e6dfd1;
  background: #f3ede1;
}
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, .83fr) minmax(0, 1.17fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
  padding-block: clamp(2.2rem, 4.3vw, 4rem);
}
.hero-copy { container-type: inline-size; }
.hero h1 {
  margin-bottom: 1.25rem;
  color: var(--green);
  font-size: clamp(2.3rem, 15cqi, 4.25rem);
  font-weight: 800;
  line-height: 1.19;
  letter-spacing: .045em;
}
.hero h1 span { display: block; }
.hero p { max-width: 24em; margin-bottom: 1.55rem; color: var(--muted); }
.hero-image {
  width: 100%;
  height: auto;
  aspect-ratio: 1.65;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 10px 10px 0 #e3d9c5;
}
.button, .search-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .75em;
  min-height: 46px;
  padding: .55rem 1.15rem;
  border: 1px solid var(--green);
  border-radius: 4px;
  background: var(--green);
  color: var(--white);
  font-weight: 700;
  font-size: .9rem;
  text-decoration: none;
}
.button:hover, .search-form button:hover { background: #173527; }

.topics { padding-block: 2.1rem; }
.topics h2, .article-aside h2, .archive h2 { margin-bottom: .95rem; color: var(--green); }
.topic-list { display: flex; flex-wrap: wrap; gap: .6rem; padding: 0; margin: 0; list-style: none; }
.topic-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .65rem;
  min-height: 42px;
  padding: .4rem .9rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--white);
  text-decoration: none;
  font-weight: 700;
  font-size: .875rem;
}
.topic-list a:hover, .topic-list [aria-current] { background: var(--wash); border-color: #8da494; }
.archive {
  padding-block: 2.1rem 4rem;
  border-top: 1px solid var(--line);
}
.search-form { display: flex; max-width: 33rem; gap: .5rem; }
.search-form input {
  min-width: 0;
  width: 100%;
  padding: .55rem .85rem;
  border: 1px solid #aab5a9;
  border-radius: 4px;
  background: var(--white);
  color: inherit;
}
.search-form button { flex: 0 0 auto; }
.result-info { margin-block: .65rem 1rem; color: var(--muted); font-size: .875rem; }
.article-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.article-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--white);
  color: inherit;
  text-decoration: none;
}
.article-card:hover { border-color: #8da494; }
.article-card:hover h3 { text-decoration: underline; text-underline-offset: .2em; }
.article-card img { width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; }
.card-body { display: flex; flex-direction: column; align-items: flex-start; flex: 1; padding: .9rem; }
.category-label { color: var(--green); font-size: .78rem; font-weight: 700; }
.card-body h3 { margin: .45rem 0 .75rem; font-size: 1rem; line-height: 1.58; }
.card-arrow { margin-top: auto; align-self: flex-end; color: var(--green); }
.empty-state { margin-top: 1.25rem; }

.subpage { padding-block: 1.5rem 4rem; }
.subpage > h1, .simple-layout > h1 { color: var(--green); margin-bottom: 1.25rem; }
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .35rem .65rem;
  margin-bottom: 1.2rem;
  color: var(--muted);
  font-size: .85rem;
}
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 264px);
  align-items: start;
  gap: clamp(1.5rem, 4vw, 3rem);
}
.article-heading h1 { margin-bottom: 1.3rem; font-size: clamp(1.75rem, 3.6vw, 2.5rem); }
.article-image { width: 100%; height: auto; aspect-ratio: 2.35; object-fit: cover; border-radius: 5px; }
.article-aside {
  padding: 1.2rem;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--wash);
}
.article-aside h2 { font-size: 1rem; }
.article-aside .topic-list { display: grid; }
.article-aside .topic-list a { padding-inline: .7rem; }
.toc, .article-paper, .simple-paper, .related {
  padding: clamp(1rem, 3.3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--white);
}
.toc { margin-block: 1.25rem; padding-block: 1rem; background: var(--wash); }
.toc summary { color: var(--green); cursor: pointer; font-weight: 700; }
.toc ol { margin: .6rem 0 0; padding-left: 1.45rem; font-size: .95rem; }
.toc li + li { margin-top: .3rem; }
.article-paper { margin-top: 1.25rem; line-height: 1.95; overflow-wrap: anywhere; }
.article-paper p { margin-block: 0 1em; }
.article-paper > :last-child, .simple-paper > :last-child { margin-bottom: 0; }
.article-paper h2 {
  margin: 2.2em 0 1em;
  padding: .6em .7em;
  border-left: 4px solid #557361;
  background: var(--wash);
  color: var(--green);
  font-size: 1.3rem;
}
.article-paper h3 {
  margin: 1.75em 0 .6em;
  color: var(--green);
  font-size: 1.08rem;
}
.article-paper ul, .article-paper ol { padding-left: 1.5em; }
.table-scroll { max-width: 100%; overflow-x: auto; margin-block: 1.3em; }
.table-scroll table { width: 100%; min-width: 30rem; border-collapse: collapse; line-height: 1.65; }
.table-scroll th, .table-scroll td {
  padding: .65em .75em;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.table-scroll th { background: var(--wash); }
.related { margin-top: 1.25rem; }
.related h2 { margin-bottom: .7rem; color: var(--green); }
.related ul { margin: 0; padding: 0; list-style: none; }
.related li + li { border-top: 1px solid var(--line); }
.related a { display: block; padding: .55rem 0; }
.article-navigation { display: flex; justify-content: space-between; gap: .4rem; margin-top: 1rem; font-size: .875rem; }

.simple-layout { max-width: 53rem; }
.simple-paper h2:not(:first-child) { margin-top: 1.4em; }
.simple-paper h2, .links-list h2 { color: var(--green); font-size: 1.125rem; }
.simple-paper .button { margin-bottom: 1rem; }
.links-list { display: grid; gap: .8rem; margin: 0; padding: 0; list-style: none; }
.links-list a {
  display: block;
  padding: 1.2rem 1.35rem;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--white);
  color: inherit;
  text-decoration: none;
}
.links-list a:hover { border-color: #8da494; }
.links-list a:hover h2 { text-decoration: underline; }
.links-list h2 { margin-bottom: .4rem; }
.links-list p { margin: 0; color: var(--muted); }

@media (max-width: 940px) {
  .wrap { width: calc(100% - 48px); }
  .article-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-inner { flex-wrap: wrap; }
}

@media (max-width: 720px) {
  .wrap { width: calc(100% - 32px); }
  .header-inner { min-height: 0; align-items: flex-start; flex-direction: column; gap: .25rem; padding-block: .65rem; }
  .main-nav { gap: .4rem 1.15rem; margin-left: .15rem; }
  .main-nav a { min-height: 36px; }
  .hero-inner { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; padding-block: 2rem; }
  .hero h1 { font-size: clamp(2.45rem, 9vw, 3.8rem); }
  .hero p { margin-bottom: 1rem; }
  .hero-image { width: calc(100% - 6px); aspect-ratio: 1.74; box-shadow: 6px 6px 0 #e3d9c5; }
  .topics, .archive { padding-block: 1.55rem; }
  .article-layout { grid-template-columns: minmax(0, 1fr); }
  .article-heading h1 { font-size: clamp(1.65rem, 5.75vw, 2.4rem); }
  .article-image { aspect-ratio: 1.8; }
  .article-aside .topic-list { display: flex; }
  .article-paper h2 { font-size: 1.18rem; }
}

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

/* 記事内の共通囲みボックス */
.article-box {
  box-sizing: border-box;
  margin: 1.8em 0;
  padding: 1.2em 1.4em;
  border: 2px solid;
  border-radius: 8px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

/* ポイント */
.article-box--point {
  background-color: #eff8f7;
  border-color: #178a95;
}

/* 注意 */
.article-box--caution {
  background-color: #fff7ee;
  border-color: #d48735;
}

/* 補足 */
.article-box--note {
  background-color: #f2f6fc;
  border-color: #7393bd;
}

/* 囲みボックスの見出し */
.article-box .article-box__title {
  margin: 0 0 0.6em;
  font-weight: 700;
  font-size: 1em;
}

.article-box--point .article-box__title {
  color: #176a72;
}

.article-box--caution .article-box__title {
  color: #a35c20;
}

.article-box--note .article-box__title {
  color: #45678d;
}

/* ボックス内の最後の段落 */
.article-box p:last-child {
  margin-bottom: 0;
}

/* 黄色マーカー */
.article-marker {
  background: linear-gradient(
    transparent 55%,
    #fff0a6 55%
  );
  padding: 0 0.1em;
}

/* スマートフォン対応 */
@media (max-width: 600px) {
  .article-box {
    padding: 1em 1.1em;
    margin: 1.5em 0;
  }
}
