@font-face {
  font-family: "Noto Sans JP";
  src: url("noto-sans-jp.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #212d23;
  --muted: #525e54;
  --green: #225542;
  --forest: #1d4032;
  --cream: #f6f6ee;
  --white: #fffefa;
  --line: #dce2d8;
  --mint: #e9f0e7;
  --sand: #f3e7c8;
  --wrap: 1160px;
  font-family: "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.75;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--ink); background: var(--cream); }
img { display: block; max-width: 100%; }
a { color: var(--green); text-underline-offset: .22em; }
a:hover { color: #153b2b; }
button, input { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #95601f; outline-offset: 4px; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
h1, h2, h3 { line-height: 1.45; }
.wrap { width: min(var(--wrap), calc(100% - 72px)); margin-inline: auto; }
.visually-hidden, .skip-link:not(:focus) {
  position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
.skip-link:focus {
  position: fixed; z-index: 2; top: 12px; left: 12px;
  padding: 8px 16px; background: white; border-radius: 6px;
}

.site-header { background: var(--white); border-bottom: 1px solid var(--line); }
.header-inner, .footer-inner {
  display: flex; justify-content: space-between; align-items: center;
  gap: 20px; min-height: 74px;
}
.brand {
  display: inline-flex; align-items: center; gap: 11px;
  color: var(--forest); font-size: 1rem; font-weight: 800; text-decoration: none;
}
.brand img { flex: none; width: 38px; height: 38px; border-radius: 10px; }
.main-nav { display: flex; align-items: center; gap: 6px; }
.main-nav a {
  padding: 6px 13px; color: var(--muted); font-size: .875rem;
  font-weight: 700; white-space: nowrap; text-decoration: none; border-radius: 7px;
}
.main-nav a:hover, .main-nav a[aria-current="page"] { background: var(--mint); color: var(--forest); }

.home { padding-block: 38px 80px; }
.hero {
  display: grid; grid-template-columns: minmax(0, .93fr) minmax(0, 1fr); align-items: stretch;
  overflow: hidden; border-radius: 22px; background: var(--forest); color: var(--white);
}
.hero-copy { padding: clamp(28px, 4.4vw, 58px) clamp(30px, 5vw, 66px); }
.hero h1 { font-size: clamp(2rem, 4vw, 3.35rem); line-height: 1.29; letter-spacing: .015em; font-weight: 800; }
.hero h1 span { display: block; }
.hero p { max-width: 26em; margin: 19px 0 24px; color: #edf1e8; }
.hero-image { width: 100%; height: 100%; min-height: 0; object-fit: cover; object-position: 46% 53%; }
.button {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 20px; border-radius: 8px; padding: 9px 15px;
  color: white; background: var(--green); font-weight: 700; text-decoration: none;
}
.button:hover { background: var(--forest); color: white; }
.hero .button { background: var(--sand); color: var(--forest); }
.hero .button:hover { background: #fff0ca; }

.category-panel { margin-top: 34px; }
.category-panel h2 { color: var(--forest); font-size: 1.125rem; font-weight: 800; margin-bottom: 11px; }
.category-list { display: flex; flex-wrap: wrap; gap: 9px; list-style: none; padding: 0; }
.category-list a {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  min-height: 41px; padding: 6px 12px; color: var(--forest); border: 1px solid #ccd9cd;
  background: var(--white); border-radius: 8px; font-size: .875rem; font-weight: 700; text-decoration: none;
}
.category-list a:hover, .category-list a[aria-current="page"] { background: var(--mint); border-color: #a4bda9; }
.category-list a span { font-size: 1.2em; line-height: 1; }

.archive { margin-top: 35px; scroll-margin-top: 16px; }
.section-heading {
  display: flex; justify-content: space-between; align-items: end;
  gap: 16px; margin-bottom: 17px; padding-top: 21px; border-top: 1px solid var(--line);
}
.section-heading h2 { color: var(--forest); font-size: clamp(1.5rem, 2.6vw, 2rem); }
.section-heading p { margin-top: 2px; color: var(--muted); font-size: .875rem; }
.search-form { display: flex; align-items: stretch; gap: 6px; width: min(100%, 360px); }
.search-form input {
  min-width: 0; flex: 1; padding: 7px 11px; background: var(--white); color: var(--ink);
  border: 1px solid #b7c5b9; border-radius: 8px;
}
.search-form button, .empty-state button {
  min-height: 44px; padding: 5px 14px; white-space: nowrap;
  border: 0; border-radius: 8px; color: white; background: var(--green); font-weight: 700;
}
.search-form button:hover, .empty-state button:hover { background: var(--forest); }
.article-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.article-card {
  overflow: hidden; border-radius: 13px; border: 1px solid var(--line);
  background: var(--white); box-shadow: 0 2px 5px #263c2a09;
}
.article-card:hover { border-color: #a4bda9; }
.article-card a { display: block; height: 100%; color: var(--ink); text-decoration: none; }
.article-card a:focus-visible { outline-offset: -4px; }
.card-image { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; background: var(--mint); }
.card-copy { padding: 15px 17px 17px; }
.category-label {
  display: inline-block; padding: 2px 9px; border-radius: 5px;
  background: var(--mint); color: var(--forest); font-size: .8125rem; font-weight: 700;
}
.card-copy h3 { margin-top: 8px; font-size: 1.0625rem; font-weight: 800; overflow-wrap: anywhere; }
.article-card a:hover h3 { text-decoration: underline; text-underline-offset: .22em; }
.card-copy p {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  overflow: hidden; margin-top: 8px; color: var(--muted); font-size: .875rem;
}
.empty-state { padding: 25px 0; }
.empty-state button { margin-top: 10px; }

.inner-page { padding-block: 23px 72px; }
.breadcrumb { margin-bottom: 18px; color: var(--muted); font-size: .875rem; }
.breadcrumb ol { display: flex; flex-wrap: wrap; align-items: center; gap: 0 10px; list-style: none; padding: 0; }
.breadcrumb li { overflow-wrap: anywhere; }
.breadcrumb li + li::before { content: "›"; padding-right: 10px; color: #65766a; }
.standalone-title { color: var(--forest); font-size: clamp(1.8rem, 3.7vw, 2.8rem); }
.reading-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(210px, 260px); gap: 28px; align-items: start; }
.article-paper, .simple-paper {
  min-width: 0; padding: clamp(22px, 4vw, 49px);
  background: var(--white); border: 1px solid var(--line); border-radius: 16px;
}
.article-heading h1, .simple-paper h1 {
  margin: 11px 0 19px; color: var(--forest); overflow-wrap: anywhere;
  font-size: clamp(1.625rem, 3vw, 2.55rem); font-weight: 800;
}
.article-heading .category-label { text-decoration: none; }
.article-heading .category-label:hover { text-decoration: underline; }
.article-image {
  width: 100%; aspect-ratio: 2 / 1; object-fit: cover;
  margin-bottom: 23px; border-radius: 9px; background: var(--mint);
}
.article-body { min-width: 0; font-size: 1rem; line-height: 1.9; overflow-wrap: anywhere; }
.article-body p, .article-body ul, .article-body ol { margin: 0 0 1em; }
.article-body ul, .article-body ol { padding-inline-start: 1.55em; }
.article-body li + li { margin-top: .3em; }
.article-body h2, .simple-paper h2 {
  margin: 2.05em 0 .78em; color: var(--forest); font-size: 1.32rem; scroll-margin-top: 20px;
}
.article-body h2 { border-left: 4px solid #6d966f; padding: .42em .66em; background: #f1f4ed; border-radius: 0 7px 7px 0; }
.article-body h3 { margin: 1.6em 0 .55em; color: var(--forest); font-size: 1.125rem; }
.article-body h4 { margin: 1em 0 .45em; }
.article-body .article-box .article-box__title { background: transparent; border: 0; padding: 0; }
.article-body a, .simple-paper a:not(.button) { font-weight: 600; }
.toc {
  margin: 1.65em 0; padding: 12px 17px;
  background: #f6f8f3; border: 1px solid var(--line); border-radius: 8px;
}
.toc summary { color: var(--forest); cursor: pointer; font-weight: 800; }
.toc ol { margin: 9px 0 0; }
.toc a { text-decoration-thickness: 1px; }
.table-scroll {
  max-width: 100%; overflow-x: auto; margin: 1.4em 0;
  border: 1px solid var(--line); border-radius: 7px;
}
.article-body table { width: 100%; min-width: 34rem; border-collapse: collapse; font-size: .9375rem; line-height: 1.65; }
.article-body th, .article-body td { padding: .62em .75em; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.article-body th { color: var(--forest); background: #edf2eb; }
.article-body tr:first-child > * { border-top: 0; }
.article-body tr > :first-child { border-left: 0; }
.article-body tr > :last-child { border-right: 0; }
.article-navigation {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px;
  margin-top: 32px; padding-top: 14px; border-top: 1px solid var(--line);
}
.article-side .category-panel, .related {
  margin: 0; padding: 18px; background: var(--white); border: 1px solid var(--line); border-radius: 12px;
}
.article-side .category-list { flex-direction: column; }
.article-side .category-list a { width: 100%; }
.related { margin-top: 14px; }
.related h2 { color: var(--forest); font-size: 1rem; }
.related ul { margin-top: 8px; padding-inline-start: 1.15em; font-size: .9375rem; }

.simple-paper { max-width: 850px; margin-inline: auto; }
.simple-paper p + p { margin-top: 1em; }
.directory-list { list-style: none; padding: 0; }
.directory-list li { padding: 18px 0; border-top: 1px solid var(--line); }
.directory-list li:last-child { padding-bottom: 0; }
.directory-list h2 { margin: 0 0 6px; font-size: 1.16rem; }
.directory-list h2 span { margin-left: 4px; }
.directory-list p { color: var(--muted); }

.site-footer { background: #e9efe5; border-top: 1px solid #d7e0d4; }
.footer-inner { padding-block: 18px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: .875rem; }
.footer-links a { color: var(--forest); }

@media (max-width: 900px) {
  .wrap { width: calc(100% - 44px); }
  .article-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reading-layout { gap: 16px; }
}
@media (max-width: 720px) {
  .hero { grid-template-columns: 1fr; border-radius: 14px; }
  .hero-copy { padding: 25px; }
  .hero-image { height: auto; aspect-ratio: 2 / 1; }
  .reading-layout { grid-template-columns: minmax(0, 1fr); }
  .article-side .category-list { flex-direction: row; }
  .footer-inner { align-items: start; flex-direction: column; gap: 14px; }
}
@media (max-width: 520px) {
  .wrap { width: calc(100% - 28px); }
  .header-inner { flex-wrap: wrap; justify-content: center; padding-block: 11px 6px; gap: 4px 10px; }
  .header-inner .brand { width: 100%; justify-content: center; }
  .main-nav a { padding: 5px 13px; }
  .home, .inner-page { padding-top: 17px; padding-bottom: 42px; }
  .hero p { margin-block: 12px 16px; }
  .category-panel, .archive { margin-top: 24px; }
  .section-heading { flex-wrap: wrap; align-items: start; }
  .search-form { width: 100%; }
  .article-grid { grid-template-columns: minmax(0, 1fr); }
  .article-paper, .simple-paper { padding: 16px; border-radius: 12px; }
  .article-heading h1 { margin-bottom: 14px; }
  .article-body h2 { font-size: 1.16rem; }
}

/* 記事内の共通囲みボックス */
.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;
  }
}
