@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;600;700&family=Noto+Serif+JP:wght@600;700;800&display=swap");

:root {
  color-scheme: light;
  --paper: #faf8f3;
  --panel: #fffdfa;
  --ink: #28283a;
  --muted: #61594f;
  --line: #ded5c6;
  --accent: #834832;
  --sand: #f0e9dc;
  --serif: "Noto Serif JP", "Yu Mincho", YuMincho, serif;
  font-family: "Noto Sans JP", "Yu Gothic UI", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  font-size: 16px;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); line-height: 1.7; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.45; }
a { color: inherit; text-underline-offset: .22em; }
img { display: block; max-width: 100%; }
button, input { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
[hidden] { display: none !important; }
[id] { scroll-margin-top: 1.5rem; }

.sr-only, .search-status:not(.search-error), .skip-link:not(:focus) {
  position: absolute;
  clip-path: inset(50%);
  width: 1px;
  height: 1px;
  overflow: hidden;
  white-space: nowrap;
}
.skip-link:focus { position: fixed; z-index: 2; inset: .5rem auto auto .5rem; padding: .5rem 1rem; background: var(--panel); }
.wrap { width: min(1184px, calc(100% - 88px)); margin-inline: auto; }

.site-header { background: var(--paper); border-bottom: 1px solid var(--line); }
.header-inner, .footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; }
.header-inner { min-height: 75px; }
.brand { display: inline-flex; width: fit-content; align-items: center; gap: .75rem; text-decoration: none; }
.brand img { flex: none; }
.brand span { font-family: var(--serif); font-weight: 800; font-size: 1.19rem; letter-spacing: .055em; }
.main-nav, .footer-links { display: flex; align-items: center; gap: 1.85rem; }
.main-nav a, .footer-links a { text-decoration: none; font-size: .875rem; font-weight: 600; }
.main-nav a[aria-current], .main-nav a:hover, .footer-links a:hover { color: var(--accent); }
.menu-toggle { display: none; }
.site-footer { margin-top: clamp(3.5rem, 8vw, 7rem); padding-block: 2.5rem 1.5rem; background: var(--sand); border-top: 1px solid var(--line); }
.copyright { padding-top: 1.25rem; color: var(--muted); font-size: .75rem; }

.hero { background: var(--sand); border-bottom: 1px solid var(--line); }
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 6vw, 6.25rem);
  align-items: center;
  padding-block: clamp(2.5rem, 5.2vw, 4.6rem);
}
.hero-copy h1 {
  font-family: var(--serif);
  font-size: clamp(3rem, 5.2vw, 4.75rem);
  line-height: 1.16;
  letter-spacing: .075em;
  font-weight: 800;
}
.hero-copy p { max-width: 25rem; margin: 1.3rem 0 1.6rem; color: var(--muted); line-height: 1.95; }
.hero-image {
  width: 100%;
  height: auto;
  aspect-ratio: 1.65;
  object-fit: cover;
  object-position: center;
  border: 1px solid #d5c0a8;
  border-radius: 4px;
}
.button {
  display: inline-flex;
  gap: 1.4rem;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: .62rem 1.1rem;
  border: 1px solid transparent;
  border-radius: 4px;
  background: var(--ink);
  color: #fffdfa;
  font-weight: 700;
  font-size: .875rem;
  text-decoration: none;
}
.button:hover { background: var(--accent); }
.button span { font-size: 1rem; }

.archive-layout, .article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 290px);
  align-items: start;
  gap: clamp(1.75rem, 3.5vw, 3.5rem);
}
#articles { padding-top: clamp(2rem, 4vw, 3.75rem); }
.archive-main, .reading-column { min-width: 0; }
.archive-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.35rem; }
.archive-heading h2, .category-panel h2, .related h2 {
  font-family: var(--serif);
  font-weight: 800;
  letter-spacing: .04em;
}
.archive-heading h2 { font-size: clamp(1.45rem, 3vw, 1.9rem); }
.search-form {
  display: flex;
  width: min(100%, 285px);
  min-width: 0;
  border: 1px solid #cfc3b2;
  border-radius: 4px;
  background: var(--panel);
}
.search-form:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.search-form input {
  background: transparent;
  min-width: 0;
  width: 100%;
  min-height: 44px;
  padding: .5rem .7rem .5rem .85rem;
  border: 0;
  color: var(--ink);
}
.search-form input:focus-visible, .search-form button:focus-visible { outline-offset: -2px; }
.search-form input::placeholder { color: #71685c; }
.search-form button { display: grid; min-width: 43px; place-items: center; background: transparent; color: var(--ink); border: 0; }
.search-form button:hover { color: var(--accent); }
.search-error { color: var(--accent); font-size: .8125rem; }

.article-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.3rem; }
.article-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  color: var(--ink);
  text-decoration: none;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 5px;
  overflow: clip;
}
.article-card:hover { border-color: var(--accent); }
.article-card:hover h3 { color: var(--accent); }
.article-card img { width: 100%; height: auto; aspect-ratio: 2.05; object-fit: cover; background-color: var(--sand); }
.card-copy { display: grid; flex: 1; align-content: start; gap: .65rem; padding: 1rem 1.1rem .85rem; }
.category-label { display: inline-flex; align-items: center; width: fit-content; color: var(--accent); font-weight: 700; font-size: .79rem; }
.card-copy h3 { font-size: 1rem; line-height: 1.65; overflow-wrap: anywhere; }
.card-arrow { justify-self: end; color: var(--accent); line-height: 1; }
.category-panel { border: 1px solid var(--line); border-radius: 5px; padding: 1.2rem 1.25rem .7rem; background: var(--panel); min-width: 0; }
.category-panel h2 { font-size: 1.14rem; padding-bottom: .7rem; border-bottom: 2px solid var(--accent); }
.category-panel ul, .related ul { margin: 0; padding: 0; list-style: none; }
.category-panel li + li, .related li + li { border-top: 1px solid var(--line); }
.category-panel a { display: flex; align-items: center; justify-content: space-between; gap: .4rem; min-height: 45px; padding: .45rem 0; text-decoration: none; font-size: .87rem; font-weight: 600; }
.category-panel a:hover, .category-panel a[aria-current] { color: var(--accent); }
.category-count { color: var(--muted); font-variant-numeric: tabular-nums; }
.empty-state { margin-top: 1rem; padding: 1.5rem; border: 1px solid var(--line); background: var(--panel); }
.text-button { border: 0; background: transparent; padding: .45rem 0; color: var(--accent); text-decoration: underline; }

.inside { padding-top: 1.35rem; }
.breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; color: var(--muted); font-size: .8125rem; margin-bottom: 1.5rem; }
.breadcrumb a:hover { color: var(--accent); }
.page-title { margin-bottom: 1.6rem; }
.page-title h1, .simple-paper h1, .article-header h1 {
  font-family: var(--serif);
  font-weight: 800;
  font-size: clamp(1.7rem, 3.05vw, 2.6rem);
  letter-spacing: .026em;
  overflow-wrap: anywhere;
}
.page-title p { margin-top: .5rem; color: var(--muted); }

.article-paper, .simple-paper { background: var(--panel); border: 1px solid var(--line); border-radius: 5px; }
.article-paper { min-width: 0; }
.article-header, .article-body { padding-inline: clamp(1.15rem, 3.8vw, 3rem); }
.article-header { padding-block: clamp(1.4rem, 3vw, 2.6rem) 1.35rem; }
.article-header h1 { margin-top: .5rem; }
.article-eyecatch { width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; background: var(--sand); }
.article-body { padding-block: 1.85rem 2.4rem; overflow-wrap: anywhere; font-size: 1rem; line-height: 1.95; }
.simple-paper { max-width: 840px; }
.simple-paper h1 { margin-bottom: 1.1rem; }
.article-body p { margin-bottom: 1.15em; }
.article-body h2 {
  margin: 1.9em 0 .85em;
  padding: .45em .65em;
  border-left: 4px solid var(--accent);
  background: var(--sand);
  font-size: clamp(1.2rem, 2.45vw, 1.55rem);
  font-family: var(--serif);
  font-weight: 800;
}
.article-body h3 { margin: 1.65em 0 .7em; padding-bottom: .35em; border-bottom: 1px solid var(--line); font-size: 1.1em; }
.article-body ul, .article-body ol { padding-left: 1.5em; margin: .75em 0 1.2em; }
.article-body blockquote { margin-inline: 0; padding-inline: 1em; border-left: 3px solid var(--line); }
.article-body a:not(.button), .related a, .article-navigation a { color: var(--accent); }
.article-body > :last-child { margin-bottom: 0; }
.toc { margin: 1.6rem 0; padding: .85rem 1.1rem; background: #f7f2e9; border: 1px solid var(--line); border-radius: 4px; }
.toc summary { cursor: pointer; font-weight: 700; }
.toc ol { margin: .45rem 0 0; }
.toc li { padding: .125rem 0; }
.table-scroll { max-width: 100%; overflow-x: auto; margin: 1.4rem 0; scrollbar-color: #987b63 var(--sand); }
.table-scroll table { min-width: 26rem; width: 100%; border-collapse: collapse; font-size: .92rem; line-height: 1.65; }
.table-scroll th, .table-scroll td { padding: .6em .75em; border: 1px solid #d9cfbe; text-align: left; vertical-align: top; }
.table-scroll thead th { background: #ede4d5; }
.table-scroll tbody tr:nth-child(even) { background: #faf7f0; }
.related { margin-top: 1.7rem; border: 1px solid var(--line); border-radius: 5px; padding: 1.15rem 1.3rem .7rem; background: var(--panel); }
.related h2 { font-size: 1.15rem; }
.related a { display: block; padding: .65rem 0; }
.article-navigation { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; margin-top: 1.25rem; font-size: .875rem; }
.article-navigation > :nth-child(2) { text-align: center; }
.article-navigation > :last-child { text-align: right; }

@media (max-width: 930px) {
  .wrap { width: calc(100% - 48px); }
  .archive-layout, .article-layout { grid-template-columns: minmax(0, 1fr) minmax(205px, 235px); }
  .hero-inner { gap: 2rem; }
}
@media (max-width: 740px) {
  .wrap { width: calc(100% - 36px); }
  .header-inner { min-height: 64px; flex-wrap: wrap; row-gap: 0; }
  .brand span { font-size: 1.06rem; }
  .brand img { width: 34px; height: 34px; }
  .menu-toggle { display: inline-flex; align-items: center; min-height: 40px; padding: .3rem .7rem; border: 1px solid var(--line); border-radius: 4px; background: transparent; color: var(--ink); font-size: .81rem; }
  .main-nav { display: none; flex-basis: 100%; justify-content: space-between; gap: .45rem; padding: .65rem 0; border-top: 1px solid var(--line); }
  .main-nav.is-open { display: flex; }
  .main-nav a { display: grid; min-height: 40px; align-items: center; font-size: .8rem; }
  .hero-inner { grid-template-columns: 1fr; gap: 1.45rem; padding-block: 2rem 1.5rem; }
  .hero-copy h1 { font-size: clamp(2.8rem, 10vw, 3.65rem); }
  .hero-copy p { margin-block: .9rem 1.15rem; max-width: 34rem; }
  .hero-image { aspect-ratio: 1.95; }
  .archive-layout, .article-layout { grid-template-columns: minmax(0, 1fr); }
  .footer-inner { flex-wrap: wrap; }
  .footer-links { flex-wrap: wrap; gap: .55rem 1rem; }
  .footer-links a { font-size: .8rem; }
}
@media (max-width: 475px) {
  .archive-heading { flex-wrap: wrap; gap: .65rem; }
  .search-form { width: 100%; }
  .article-grid { grid-template-columns: minmax(0, 1fr); gap: .9rem; }
  .article-body { padding-top: 1.35rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

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