:root {
  color: #2c3d43;
  background: #e9e7df;
  font-family: "Yu Gothic UI", "Meiryo", sans-serif;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(rgb(255 255 255 / 35%), rgb(255 255 255 / 35%)),
    repeating-linear-gradient(0deg, rgb(73 89 91 / 3%) 0, rgb(73 89 91 / 3%) 1px, transparent 1px, transparent 5px),
    #e9e7df;
}

a { color: inherit; }

.archive-shell {
  width: min(100% - 40px, 980px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 58px 0 34px;
}

.archive-header {
  padding: 25px 30px 29px;
  border: 1px solid #aeb7b2;
  background: #f5f3ec;
}

.compact-header { padding-bottom: 24px; }

.archive-kicker,
.archive-label {
  margin: 0;
  color: #78837f;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.archive-header h1 {
  margin: 10px 0 10px;
  color: #344c57;
  font-family: Georgia, "Yu Mincho", serif;
  font-size: clamp(2rem, 5vw, 3.3rem);
  font-weight: 500;
  letter-spacing: 0.08em;
}

.archive-lead {
  margin: 0;
  color: #586a6c;
  font-size: 0.9rem;
  line-height: 1.8;
}

.archive-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-bottom: 34px;
  border-right: 1px solid #aeb7b2;
  border-bottom: 1px solid #aeb7b2;
  border-left: 1px solid #aeb7b2;
  background: #e4e6df;
}

.archive-nav a {
  padding: 12px 18px;
  border-right: 1px solid #c3cac3;
  color: #526569;
  font-size: 0.78rem;
  text-decoration: none;
}

.archive-nav a:hover,
.archive-nav a:focus-visible,
.archive-link:hover,
.archive-link:focus-visible {
  color: #9b493c;
  text-decoration: underline;
  text-underline-offset: 4px;
}

main { padding: 0 7px; }

.archive-notice,
.archive-document,
.archive-section {
  margin-top: 27px;
  padding: 23px 25px;
  border: 1px solid #b9c1ba;
  background: rgb(249 248 241 / 82%);
}

.archive-notice {
  margin-top: 0;
  border-left: 4px solid #9b493c;
}

.archive-notice h2,
.archive-section h2 {
  margin: 9px 0 10px;
  color: #3b5158;
  font-family: Georgia, "Yu Mincho", serif;
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: 0.06em;
}

.archive-notice p:last-child,
.archive-section p:last-child,
.record-note p:last-child { margin-bottom: 0; }

.archive-notice p,
.archive-section > p,
.record-note p,
.history-row p {
  color: #5d6a6c;
  font-size: 0.84rem;
  line-height: 1.9;
}

.archive-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 17px;
}

.archive-card {
  display: flex;
  min-height: 145px;
  flex-direction: column;
  gap: 7px;
  padding: 16px;
  border: 1px solid #bdc5be;
  background: #f4f4ed;
  text-decoration: none;
}

.archive-card:hover,
.archive-card:focus-visible {
  border-color: #9b493c;
  background: #fffdf5;
}

.card-number {
  color: #9b493c;
  font-family: Georgia, serif;
  font-size: 0.76rem;
  letter-spacing: 0.1em;
}

.archive-card strong {
  color: #3d545b;
  font-family: Georgia, "Yu Mincho", serif;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.45;
}

.archive-card span:last-child {
  margin-top: auto;
  color: #74807d;
  font-size: 0.72rem;
  line-height: 1.6;
}

.archive-breadcrumb {
  margin: 0 0 16px;
  color: #798581;
  font-size: 0.76rem;
}

.archive-breadcrumb a { color: #526569; }

.archive-document {
  position: relative;
  padding-top: 52px;
}

.document-stamp {
  position: absolute;
  top: 19px;
  right: 23px;
  padding: 4px 8px;
  border: 1px solid #9b493c;
  color: #9b493c;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.record-list { margin: 0; }

.record-list > div {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid #d5dad3;
}

.record-list dt { color: #78837f; font-size: 0.76rem; }
.record-list dd { margin: 0; color: #44585d; font-size: 0.84rem; }

.record-note {
  margin-top: 25px;
  padding: 17px 18px;
  border-left: 3px solid #7b9aa0;
  background: #e9efec;
}

.record-note h2 {
  margin: 0 0 9px;
  color: #3e5960;
  font-family: Georgia, "Yu Mincho", serif;
  font-size: 1.05rem;
  font-weight: 500;
}

.record-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 21px;
}

.record-tags span {
  padding: 7px 10px;
  border: 1px solid #b4c0b8;
  color: #526b6d;
  background: #f2f5ef;
  font-size: 0.74rem;
}

.archive-link {
  display: inline-block;
  margin-top: 5px;
  color: #9b493c;
  font-size: 0.8rem;
  font-weight: 700;
}

.history-document { padding-top: 23px; }

.history-row {
  display: grid;
  grid-template-columns: 115px minmax(0, 1fr);
  gap: 20px;
  padding: 17px 0;
  border-bottom: 1px solid #d5dad3;
}

.history-row:first-child { padding-top: 0; }
.history-row:last-child { padding-bottom: 0; border-bottom: 0; }
.history-row time { color: #9b493c; font-family: Georgia, serif; font-size: 0.8rem; }
.history-row strong { color: #44585d; font-family: Georgia, "Yu Mincho", serif; font-size: 1rem; font-weight: 500; }
.history-row p { margin: 7px 0 0; }

.archive-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-top: 30px;
  padding: 17px 7px 0;
  border-top: 1px solid #aeb7b2;
  color: #7a8580;
  font-size: 0.7rem;
  line-height: 1.7;
}

.archive-footer p { margin: 0; }

@media (max-width: 700px) {
  .archive-shell { width: min(100% - 24px, 980px); padding-top: 24px; }
  .archive-header { padding: 20px 17px 22px; }
  .archive-nav { margin-bottom: 23px; }
  .archive-nav a { flex: 1 1 50%; padding: 10px 11px; text-align: center; }
  main { padding: 0; }
  .archive-notice, .archive-document, .archive-section { padding: 19px 16px; }
  .archive-cards { display: block; }
  .archive-card { min-height: 0; margin-top: 9px; }
  .record-list > div, .history-row { grid-template-columns: 1fr; gap: 4px; }
  .history-row { padding: 14px 0; }
  .archive-footer { display: block; }
  .archive-footer p + p { margin-top: 5px; }
}
