:root {
  color-scheme: light;
  --paper: #f8f5ec;
  --white: #fffdf8;
  --ink: #252f28;
  --muted: #525e53;
  --green: #264b3a;
  --green-deep: #1a392b;
  --green-light: #e8efe4;
  --ochre: #f0cd7e;
  --border: #dddace;
  --radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
html { font: 16px / 1.7 "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif; }
body { margin: 0; background: var(--paper); color: var(--ink); }
a { color: var(--green); text-underline-offset: .19em; }
a:hover { color: var(--green-deep); }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible, .table-scroll:focus-visible {
  outline: 3px solid #a96912;
  outline-offset: 3px;
}
img { display: block; max-width: 100%; height: auto; }
button, input { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.42; }
.wrap { width: min(1160px, calc(100% - 72px)); margin-inline: auto; }
.section { padding-block: 35px 72px; }
.section-title { margin-bottom: 24px; font-size: clamp(1.65rem, 3.3vw, 2.25rem); font-weight: 800; }
.skip-link { position: absolute; z-index: 2; top: 10px; left: 10px; padding: 9px 16px; background: var(--white); transform: translateY(-200%); }
.skip-link:focus { transform: translateY(0); }

.site-header { background: var(--white); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); font-size: .96rem; font-weight: 800; line-height: 1.45; text-decoration: none; }
.brand img { flex: none; }
.main-nav { display: flex; align-items: center; gap: clamp(14px, 2.2vw, 31px); }
.main-nav a { padding-block: 8px; color: var(--muted); font-size: .875rem; font-weight: 600; white-space: nowrap; text-decoration: none; }
.main-nav a:hover { text-decoration: underline; }
.main-nav [aria-current="page"] { color: var(--green-deep); border-bottom: 2px solid var(--green); }
.menu-toggle { display: none; padding: 6px 10px; background: var(--green-light); border: 1px solid var(--border); border-radius: 7px; color: var(--green-deep); white-space: nowrap; font-size: .82rem; font-weight: 700; }

.hero { overflow: hidden; background: var(--green-deep); color: var(--white); }
.hero-inner { display: grid; grid-template-columns: 1fr 1.13fr; align-items: center; gap: clamp(30px, 5vw, 70px); padding-block: clamp(42px, 6vw, 83px); }
.hero h1 { margin-bottom: 22px; font-size: clamp(1.7rem, 4vw, 3.65rem); line-height: 1.24; letter-spacing: .015em; font-weight: 800; }
.hero h1 span { color: var(--ochre); }
.hero p { max-width: 28em; margin-bottom: 25px; color: #e7ede3; line-height: 1.85; }
.hero-image { width: 100%; aspect-ratio: 1.69; object-fit: cover; border: 5px solid #f7e8c7; border-radius: var(--radius); box-shadow: 10px 10px 0 #ffffff16; }
.button { display: inline-flex; align-items: center; justify-content: space-between; gap: 15px; width: fit-content; max-width: 100%; padding: 11px 18px; border: 1px solid transparent; border-radius: 8px; background: var(--green); color: white; font-weight: 700; text-decoration: none; }
.button:hover { background: var(--green-deep); color: white; }
.hero .button { background: var(--ochre); color: #283629; }
.hero .button:hover { background: #ffdf96; color: #283629; }

.archive { padding-top: 40px; scroll-margin-top: 20px; }
.archive-layout, .reading-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(230px, 284px); gap: 27px; align-items: start; }
.archive-layout > *, .reading-layout > * { min-width: 0; }
.search-form { padding: 17px 20px 19px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--white); }
.search-form label { display: block; margin-bottom: 8px; font-size: .875rem; font-weight: 700; }
.search-field { display: flex; }
.search-field input { min-width: 0; flex: 1; padding: 9px 12px; border: 1px solid #b9c1b6; border-radius: 7px 0 0 7px; background: #fff; color: var(--ink); }
.search-field input::placeholder { color: #626a60; }
.search-field button { padding: 8px 17px; border: 1px solid var(--green); border-radius: 0 7px 7px 0; background: var(--green); color: #fff; font-weight: 700; }
.search-field button:hover { background: var(--green-deep); }
.result-info { margin: 16px 0 9px; color: var(--muted); font-size: .85rem; }
.article-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.article-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--white); color: var(--ink); text-decoration: none; }
.article-card:hover { border-color: #839681; }
.article-card:hover h3 { text-decoration: underline; text-underline-offset: .16em; }
.article-card img { width: 100%; aspect-ratio: 1.9; object-fit: cover; }
.card-content { display: flex; flex: 1; flex-direction: column; align-items: start; padding: 17px 19px; }
.category-label { display: inline-block; width: fit-content; padding: 3px 9px; border-radius: 5px; background: var(--green-light); color: var(--green-deep); font-size: .75rem; font-weight: 700; line-height: 1.6; text-decoration: none; }
a.category-label:hover { text-decoration: underline; }
.article-card h3 { margin: 9px 0 8px; font-size: 1.09rem; line-height: 1.52; }
.article-card p { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; margin-bottom: 15px; color: var(--muted); font-size: .875rem; }
.card-action { display: inline-flex; gap: 8px; margin-top: auto; color: var(--green); font-size: .84rem; font-weight: 700; }
.empty-state { padding: 22px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--white); }

.category-panel { overflow: hidden; padding: 19px 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--white); }
.category-panel h2 { margin: 0 0 12px; font-size: 1.02rem; font-weight: 800; }
.category-panel ul, .related ul { margin: 0; padding: 0; list-style: none; }
.category-panel li { border-top: 1px solid var(--border); }
.category-panel a { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 10px 0; color: var(--ink); font-size: .87rem; text-decoration: none; }
.category-panel a:hover, .category-panel [aria-current="page"] { color: var(--green-deep); text-decoration: underline; }
.category-panel a span:last-child { color: var(--muted); font-size: .8rem; }

.breadcrumb { display: flex; flex-wrap: wrap; gap: 3px 8px; margin-bottom: 20px; color: var(--muted); font-size: .84rem; }
.breadcrumb > :not(:first-child)::before { margin-inline-end: 8px; content: "›"; color: var(--muted); }
.article-paper, .related, .simple-paper, .site-link { border: 1px solid var(--border); border-radius: var(--radius); background: var(--white); }
.article-paper { min-width: 0; padding: clamp(23px, 3.4vw, 43px); }
.article-header h1 { margin: 12px 0 22px; font-size: clamp(1.55rem, 3.3vw, 2.45rem); font-weight: 800; line-height: 1.44; overflow-wrap: anywhere; }
.article-image { width: 100%; border-radius: 9px; }
.article-content { margin-top: 25px; overflow-wrap: anywhere; line-height: 1.92; }
.article-content p { margin-bottom: 1.15em; }
.article-content h2 { margin: 1.8em 0 .8em; padding: 11px 14px; border-inline-start: 4px solid var(--green); background: var(--green-light); color: var(--green-deep); font-size: clamp(1.15rem, 2.3vw, 1.46rem); scroll-margin-top: 15px; }
.article-content h3, .article-content h4 { margin: 1.45em 0 .65em; color: var(--green-deep); }
.article-content ul, .article-content ol { padding-inline-start: 1.55em; }
.article-content li + li { margin-top: .24em; }
.article-content blockquote { margin-inline: 0; padding: 12px 18px; border-inline-start: 3px solid #a3b5a1; background: #f0f3ec; }
.toc { margin: 0 0 26px; padding: 12px 17px; border: 1px solid var(--border); border-radius: 8px; background: var(--paper); }
.toc summary { padding-block: 2px; color: var(--green-deep); font-weight: 700; cursor: pointer; }
.toc ol { margin: 7px 0 2px; font-size: .9rem; }
.table-scroll { max-width: 100%; overflow-x: auto; margin: 1.25em 0; border: 1px solid var(--border); border-radius: 7px; }
.article-content table { width: 100%; min-width: 28em; border-collapse: collapse; font-size: .9rem; line-height: 1.65; }
.article-content th, .article-content td { padding: 10px 11px; border: 1px solid var(--border); text-align: start; vertical-align: top; }
.article-content th { background: var(--green-light); color: var(--green-deep); }
.article-content tr:first-child > * { border-top: 0; }
.article-content tr:last-child > * { border-bottom: 0; }
.article-content tr > :first-child { border-left: 0; }
.article-content tr > :last-child { border-right: 0; }
.article-navigation { display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: center; padding-top: 18px; }
.article-navigation a { padding: 7px 2px; font-weight: 600; }
.related { margin-top: 24px; padding: 20px; }
.related h2 { font-size: 1.2rem; }
.related li + li { margin-top: 9px; }

.simple-content { max-width: 760px; }
.simple-paper { padding: clamp(19px, 4vw, 37px); }
.simple-paper h2 { margin: 24px 0 8px; font-size: 1.16rem; }
.simple-paper h2:first-child { margin-top: 0; }
.simple-paper p:last-child { margin-bottom: 0; }
.simple-paper .button + p { margin-top: 15px; }
.site-links { display: grid; gap: 12px; }
.site-link { display: block; padding: 21px; text-decoration: none; }
.site-link:hover { border-color: #839681; }
.site-link:hover h2 { text-decoration: underline; }
.site-link h2 { margin-bottom: 7px; font-size: 1.14rem; }
.site-link p { margin-bottom: 0; color: var(--muted); }
.site-footer { border-top: 1px solid var(--border); background: var(--white); }
.footer-inner { display: grid; gap: 12px; padding-block: 28px; }
.footer-inner nav { display: flex; flex-wrap: wrap; gap: 8px 19px; }
.footer-inner nav a { font-size: .86rem; }
.footer-inner small { color: var(--muted); }

@media (max-width: 900px) {
  .wrap { width: calc(100% - 46px); }
  .archive-layout, .reading-layout { grid-template-columns: minmax(0, 1fr) minmax(198px, 230px); gap: 16px; }
}
@media (max-width: 740px) {
  .header-inner { flex-wrap: wrap; min-height: 58px; gap: 0 12px; }
  .main-nav { width: 100%; justify-content: space-between; gap: 7px; padding-block: 5px 9px; }
  .js .menu-toggle { display: block; }
  .js .main-nav:not(.is-open) { display: none; }
  .main-nav a { font-size: .8rem; }
  .brand { gap: 7px; font-size: .88rem; }
  .brand img { width: 31px; height: 31px; }
  .hero-inner { grid-template-columns: minmax(0, 1fr); gap: 23px; padding-block: 32px 33px; }
  .hero h1 { font-size: clamp(1.9rem, 6.8vw, 3.3rem); margin-bottom: 13px; }
  .hero p { margin-bottom: 16px; }
  .hero-image { max-height: 282px; border-width: 4px; box-shadow: 6px 6px 0 #ffffff16; }
  .archive-layout, .reading-layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar { margin-top: 8px; }
  .section { padding-block: 24px 48px; }
}
@media (max-width: 490px) {
  .wrap { width: calc(100% - 32px); }
  .header-inner { gap: 0 6px; }
  .header-inner .brand { flex: 1; }
  .header-inner .brand span { text-wrap: balance; }
  .article-grid { grid-template-columns: minmax(0, 1fr); }
  .article-paper { padding: 17px; }
  .article-content { margin-top: 19px; }
  .search-form { padding: 13px; }
}

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