:root {
  color-scheme: light;
  font-family: "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  --ink: #172e29;
  --green: #225546;
  --deep: #173c32;
  --muted: #4f6258;
  --paper: #fffefa;
  --cream: #f5f1e7;
  --sage: #eaf0e8;
  --line: #dce1d7;
  --edge: min(5vw, 64px);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); }
img { display: block; max-width: 100%; }
a { color: var(--green); text-underline-offset: .2em; }
a:hover { color: var(--deep); }
button, input { font: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.45; overflow-wrap: anywhere; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid #156b92; outline-offset: 4px; }
.wrap { width: min(calc(100% - 2 * var(--edge)), 1192px); margin-inline: auto; }

.visually-hidden, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link:focus { position: absolute; z-index: 3; padding: .5rem 1rem; background: white; }
.site-header { position: relative; background: var(--paper); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; justify-content: space-between; align-items: center; min-height: 70px; gap: 1.25rem; }
.brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; color: inherit; font-weight: 700; }
.brand img { flex: none; border-radius: 8px; }
.main-nav, .footer-inner nav { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem clamp(1rem, 2.4vw, 2rem); }
.main-nav a { padding-block: .4rem; color: var(--ink); text-decoration: none; font-weight: 500; font-size: .875rem; white-space: nowrap; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--green); text-decoration: underline; text-underline-offset: .55em; }
.menu-toggle { display: none; }

.hero { background: var(--cream); border-bottom: 1px solid #e7e0d1; }
.hero-inner { display: grid; grid-template-columns: 1fr 1.18fr; gap: clamp(1.75rem, 4.8vw, 4.5rem); align-items: center; padding-block: clamp(2rem, 5.1vw, 4.55rem); }
.hero-copy h1 {
  color: var(--deep);
  font-size: clamp(1.95rem, 3.8vw, 3.3rem);
  line-height: 1.35;
  letter-spacing: -.047em;
  font-weight: 700;
}
.hero-copy h1 span { display: block; }
.hero-copy p { max-width: 30rem; margin-top: 1.25rem; color: var(--muted); line-height: 1.9; }
.hero-image { width: 100%; height: auto; aspect-ratio: 1.58; object-fit: cover; border-radius: 16px; background: var(--sage); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .85rem 1.5rem; margin-top: 1.6rem; }
.button, .search-form button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: .8rem;
  min-height: 46px;
  padding: .55rem 1rem;
  border: 1px solid var(--green);
  border-radius: 8px;
  background: var(--green);
  color: white;
  text-decoration: none;
  font-size: .9rem;
  font-weight: 700;
}
.button:hover, .search-form button:hover { color: white; background: var(--deep); }
.text-link { color: var(--green); font-size: .9rem; font-weight: 700; }

.archive, .category-section { padding-block: clamp(2.5rem, 4.7vw, 4.25rem); }
.archive > h2, .category-section h2 { margin-bottom: 1.2rem; color: var(--deep); font-size: clamp(1.45rem, 2.4vw, 2rem); }
.search-form { display: flex; gap: .5rem; max-width: 34rem; }
.search-form input {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: .5rem .8rem;
  border: 1px solid #adb9ae;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}
.search-form input::placeholder { color: #57665e; }
.search-form button { flex: none; padding-inline: 1.2rem; }
.result-count { margin: .8rem 0; color: var(--muted); font-size: .875rem; }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.article-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
}
.article-card:hover { border-color: #7b9b8b; box-shadow: 0 5px 16px #163c3211; }
.card-photo { width: 100%; height: auto; aspect-ratio: 1.92; object-fit: cover; background: var(--sage); }
.card-body { display: grid; justify-items: start; grid-template-rows: auto 1fr auto; flex: 1; gap: .65rem; padding: 1.05rem 1.15rem 1.15rem; }
.card-body h3 { font-size: 1.115rem; line-height: 1.6; }
.tag { display: inline-block; padding: .25rem .65rem; border-radius: 5px; background: var(--sage); color: var(--deep); font-size: .8rem; font-weight: 600; text-decoration: none; }
a.tag:hover { text-decoration: underline; }
.card-link { color: var(--green); font-size: .825rem; font-weight: 700; }
.article-card:hover .card-link { text-decoration: underline; text-underline-offset: .2em; }
.empty-state { padding: 1.25rem; background: var(--cream); border-radius: 12px; }
.empty-state p { margin-bottom: .8rem; }

.category-section { background: var(--sage); border-top: 1px solid var(--line); }
.category-list { display: grid; gap: .6rem; list-style: none; margin: 0; padding: 0; }
.category-section .category-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.category-list a {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto auto;
  align-items: center;
  gap: .55rem;
  min-height: 48px;
  padding: .65rem .8rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.category-list a:hover { border-color: #7b9b8b; text-decoration: underline; }
.category-list small { color: var(--muted); font-size: .75rem; white-space: nowrap; }
.arrow { color: var(--green); font-size: 1.2rem; line-height: 1; }

.inner-page { padding-bottom: clamp(2.5rem, 5.5vw, 5rem); }
.breadcrumb ol { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .65rem; margin: 0; padding: 1.15rem 0; list-style: none; color: var(--muted); font-size: .825rem; }
.breadcrumb li + li::before { content: "›"; margin-right: .65rem; }
.page-title { margin: .35rem 0 1.6rem; }
.page-title h1 { color: var(--deep); font-size: clamp(1.8rem, 3.45vw, 2.7rem); }
.article-layout { display: grid; grid-template-columns: minmax(0, 812px) minmax(220px, 1fr); align-items: start; gap: clamp(1.4rem, 3.2vw, 2.8rem); }
.reading-column { min-width: 0; }
.article, .simple-content {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: clamp(1rem, 3.1vw, 2.6rem);
}
.simple-content { max-width: 53rem; }
.article-header { margin-bottom: 1.6rem; }
.article-header h1 { margin: .85rem 0 1.4rem; color: var(--deep); font-size: clamp(1.55rem, 3vw, 2.45rem); line-height: 1.46; letter-spacing: -.025em; }
.article-image { width: 100%; height: auto; aspect-ratio: 2.1; object-fit: cover; border-radius: 9px; background: var(--sage); }
.article-body { min-width: 0; overflow-wrap: anywhere; line-height: 1.9; }
.article-body p + p { margin-top: 1em; }
.article-body h2 {
  margin: 2em 0 .8em;
  padding: .55em .7em;
  border-left: 4px solid #587b69;
  border-radius: 0 6px 6px 0;
  background: var(--sage);
  color: var(--deep);
  font-size: clamp(1.17rem, 2vw, 1.45rem);
  scroll-margin-top: 1rem;
}
.article-body h3 { margin: 1.45em 0 .6em; font-size: 1.13rem; color: var(--deep); }
.article-body h4 { margin: 1.4em 0 .6em; }
.article-body p, .article-body ul, .article-body ol { margin-bottom: 1em; }
.article-body ul, .article-body ol { padding-inline-start: 1.5em; }
.article-body > :last-child, .article-box > :last-child { margin-bottom: 0; }
.article-body > :first-child { margin-top: 0; }
.article-body blockquote { border-left: 3px solid var(--line); margin-inline: 0; padding-left: 1em; }
.toc { border: 1px solid var(--line); border-radius: 8px; background: var(--cream); margin: 1.65rem 0; padding: .75rem 1rem; }
.toc summary { cursor: pointer; font-weight: 700; color: var(--deep); }
.toc ol { margin: .55em 0 .25em; }
.toc li + li { margin-top: .2rem; }
.table-scroll { max-width: 100%; overflow-x: auto; margin: 1.2em 0; border: 1px solid var(--line); border-radius: 6px; }
.article-body table { width: 100%; min-width: 28rem; border-collapse: collapse; font-size: .92rem; }
.article-body th, .article-body td { text-align: left; vertical-align: top; padding: .65em .8em; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.article-body tr > :last-child { border-right: 0; }
.article-body tbody tr:last-child > * { border-bottom: 0; }
.article-body th { background: var(--sage); color: var(--deep); }

.article-sidebar { padding: 1rem; background: var(--cream); border: 1px solid #e7e0d1; border-radius: 10px; }
.article-sidebar h2 { margin-bottom: .75rem; color: var(--deep); font-size: 1rem; }
.article-sidebar .category-list a { font-size: .85rem; }
.article-navigation { margin-top: 1.2rem; display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); align-items: center; gap: .45rem; text-align: center; font-size: .875rem; }
.article-navigation a { padding-block: .55rem; }
.related { margin-top: 1.6rem; }
.related h2 { font-size: 1.15rem; }
.related li + li { margin-top: .6rem; }
.article-body .related-sites { display: grid; gap: .8rem; padding: 0; margin: 0; list-style: none; }
.related-sites li { padding: 1rem 1.2rem; background: var(--cream); border-radius: 8px; }
.related-sites li h2 { margin: 0 0 .35rem; padding: 0; background: none; border: 0; font-size: 1.1rem; }
.related-sites li p { margin: 0; color: var(--muted); }

.site-footer { padding-block: 1.7rem; background: var(--deep); color: #f7faf5; }
.site-footer a { color: inherit; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: .85rem 1.5rem; flex-wrap: wrap; margin-bottom: 1.15rem; }
.footer-inner nav { font-size: .825rem; }
.site-footer small { opacity: .86; font-size: .8rem; }

@media (max-width: 900px) {
  .article-layout { grid-template-columns: minmax(0,1fr); }
  .article-sidebar .category-list { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .card-grid, .category-section .category-list { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 700px) {
  .header-inner { min-height: 62px; flex-wrap: wrap; gap: .35rem .5rem; }
  .site-header .brand { font-size: .92rem; gap: .45rem; }
  .site-header .brand img { width: 31px; height: 31px; }
  .main-nav { width: 100%; padding-bottom: .5rem; gap: .2rem 1rem; }
  .js .main-nav { display: none; }
  .js .main-nav.is-open { display: flex; }
  .js .menu-toggle {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    padding: .35rem .55rem;
    color: var(--ink);
    border: 1px solid #adb9ae;
    border-radius: 6px;
    background: var(--paper);
    font-size: .8rem;
  }
  .hero-inner { grid-template-columns: minmax(0,1fr); gap: 1.35rem; }
  .hero-image { aspect-ratio: 1.65; }
  .hero-copy p { margin-top: .8rem; }
  .hero-actions { margin-top: 1rem; }
}
@media (max-width: 540px) {
  .card-grid, .category-section .category-list, .article-sidebar .category-list { grid-template-columns: minmax(0,1fr); }
  .article-image { aspect-ratio: 1.7; }
  .article { padding: .9rem; }
}

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