:root {
  --background: #faf8f4;
  --surface: #ffffff;
  --text: #26221f;
  --muted: #645d56;
  --border: #ded6cd;
  --accent: #6f3f2a;
  --accent-dark: #4d2b1d;
  --focus: #1b5f8c;
  --max-width: 1060px;
  --content-width: 760px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--background);
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.6;
}

body {
  margin: 0;
}

body,
button,
input,
textarea {
  font: inherit;
}

a {
  color: var(--accent);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent-dark);
}

a:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

img {
  display: block;
  height: auto;
  max-width: 100%;
}

.skip-link {
  background: var(--text);
  color: #fff;
  left: 1rem;
  padding: 0.5rem 0.75rem;
  position: absolute;
  top: 0.5rem;
  transform: translateY(-150%);
  z-index: 10;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(250, 248, 244, 0.98);
}

.site-header__inner {
  align-items: baseline;
  display: flex;
  gap: 2rem;
  justify-content: space-between;
  margin: 0 auto;
  max-width: var(--max-width);
  padding: 1.25rem 1.5rem;
}

.site-title {
  color: var(--text);
  font-size: 1.2rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  justify-content: flex-end;
}

.site-nav a {
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  text-transform: uppercase;
}

.site-nav a[aria-current="page"],
.site-nav a:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.3em;
}

.site-main {
  margin: 0 auto;
  max-width: var(--max-width);
  padding: 3rem 1.5rem 4rem;
}

.content {
  max-width: var(--content-width);
}

.content--center {
  margin: 0 auto;
}

h1,
h2,
h3 {
  line-height: 1.2;
  margin: 0 0 1rem;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.1rem);
  font-weight: 500;
}

h2 {
  font-size: 1.45rem;
  margin-top: 2rem;
}

h3 {
  font-size: 1.1rem;
  margin-top: 1.5rem;
}

p,
ul,
ol,
details {
  margin: 0 0 1.1rem;
}

.content,
.publication,
.book,
.notice {
  overflow-wrap: anywhere;
  word-break: normal;
}

.content a {
  overflow-wrap: anywhere;
}

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

.hero {
  align-items: center;
  display: grid;
  gap: 3rem;
  grid-template-columns: minmax(220px, 0.7fr) minmax(280px, 1fr);
  margin: 1rem auto 0;
}

.hero__image {
  border: 1px solid var(--border);
  width: 100%;
}

.book {
  align-items: start;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 2rem;
  grid-template-columns: 180px minmax(0, 1fr);
  padding: 2rem 0;
}

.book:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.book img {
  border: 1px solid var(--border);
}

.publication {
  border-top: 1px solid var(--border);
  padding: 1.25rem 0;
}

.publication:first-of-type {
  border-top: 0;
}

.publication__citation {
  margin-bottom: 0.6rem;
}

details {
  background: rgba(255, 255, 255, 0.42);
  border-left: 3px solid var(--border);
  padding: 0.6rem 0.85rem;
}

summary {
  color: var(--accent-dark);
  cursor: pointer;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
}

details p {
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 0.6rem;
}

.button-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.button-list a {
  border: 1px solid var(--accent);
  color: var(--accent-dark);
  display: inline-block;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.9rem;
  padding: 0.55rem 0.8rem;
  text-decoration: none;
}

.button-list a:hover {
  background: var(--accent);
  color: #fff;
}

.notice {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1rem;
}

.rec-page {
  background: #dedfdb;
  box-shadow: 0 0 0 100vmax #dedfdb;
  clip-path: inset(0 -100vmax);
  margin-left: calc(50% - 50vw);
  max-width: none;
  min-height: 50vh;
  overflow-x: clip;
  padding: clamp(2.5rem, 5vw, 3.25rem) 0 clamp(3.5rem, 7vw, 5rem);
  width: 100vw;
}

.rec-title-group {
  align-items: center;
  display: flex;
  gap: clamp(1rem, 2.5vw, 2rem);
  justify-content: center;
  margin: 0 auto clamp(2.25rem, 5vw, 3.75rem);
  max-width: min(94vw, 1500px);
}

.rec-icon {
  flex: 0 0 clamp(82px, 8vw, 112px);
  height: auto;
  width: clamp(82px, 8vw, 112px);
}

.rec-page h1 {
  font-size: clamp(2.35rem, 4.6vw, 4.35rem);
  font-weight: 400;
  letter-spacing: 0;
  margin: 0;
  text-align: center;
  white-space: nowrap;
}

.rec-page .button-list {
  display: grid;
  gap: clamp(1.25rem, 4vw, 6rem);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 auto;
  max-width: 1800px;
  width: min(90vw, 1800px);
}

.rec-page .button-list a {
  align-items: center;
  border: 2px solid #26384f;
  color: #2d3b55;
  display: flex;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.1rem;
  justify-content: center;
  min-height: 2.8rem;
  padding: 0.35rem 1.75rem;
  text-align: center;
}

.rec-page .button-list a:hover {
  background: #26384f;
  color: #fff;
}

@media (max-width: 1100px) {
  .rec-title-group {
    flex-direction: column;
  }

  .rec-page h1 {
    font-size: clamp(2.4rem, 8vw, 3.8rem);
    white-space: normal;
  }

}

@media (max-width: 900px) {
  .rec-page .button-list {
    gap: 1rem;
    grid-template-columns: 1fr;
    max-width: 560px;
    width: min(92vw, 560px);
  }
}

@media (max-width: 800px) {
  html {
    font-size: 17px;
  }

  .site-header__inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.9rem;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .site-main {
    padding-top: 2rem;
  }

  .hero,
  .book {
    grid-template-columns: 1fr;
  }

  .rec-page h1 {
    font-size: clamp(2.15rem, 12vw, 3rem);
    white-space: normal;
  }

  .rec-icon {
    flex-basis: auto;
    width: 86px;
  }

  .rec-page {
    margin-left: -1.5rem;
    padding: 3rem 1.5rem 4rem;
    width: calc(100% + 3rem);
  }

  .book img {
    max-width: 220px;
  }
}
