:root {
  --clr-light: rgb(245, 245, 245);
  --clr-dark: rgb(19, 19, 19);
  --clr-line: rgb(19, 19, 19);
  --clr-highlight-yellow: rgb(238, 255, 0);
  --clr-highlight-violet: rgb(119, 0, 255);
  --clr-highlight-green: rgb(0, 255, 128);
  --clr-text-light: black;
  --clr-text-dark: rgb(245, 245, 245);
  --spacing-right: 10%;
  --spacing-gap: 0.2rem;
  --transition: 120ms linear;
}
@media (min-width: 550px) {
  :root {
    --spacing-right: 15%;
  }
}
@media (min-width: 1000px) {
  :root {
    --spacing-right: 22%;
  }
}

::selection {
  background: var(--clr-highlight-violet);
}

@font-face {
  font-family: "HelveticaNowText";
  src: url("/font/HelveticaNowText-Regular.woff2") format("woff2"), url("/font/HelveticaNowText-Regular.woff") format("woff");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Times New Roman", Times, serif;
  font-size: 1.2rem;
  margin: 8px var(--spacing-right) 8px 8px;
}
body .header h1 {
  font-family: "HelveticaNowText", Helvetica, Arial, sans-serif;
  font-size: 1.5rem;
  letter-spacing: -0.07rem;
  line-height: 1.5rem;
  margin-top: 0;
  margin-right: 1rem;
}

.articles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-gap);
}
.articles .textbox {
  max-width: 100%;
  margin-bottom: var(--spacing-gap);
}
.articles .textbox p {
  margin-right: 1rem;
  line-height: 1.2rem;
  letter-spacing: -0.02rem;
  word-spacing: -0.01rem;
}
.articles .textbox img {
  width: 100%;
  height: auto;
  display: block;
  margin: 0 0 var(--spacing-gap);
}
.articles .textbox__button {
  all: unset;
  cursor: pointer;
  margin-bottom: var(--spacing-gap);
}
.articles .textbox__button span:last-child {
  display: none;
}
.articles .textbox__button:hover {
  background: var(--clr-highlight-green);
}
.articles .textbox__content {
  display: block;
  justify-content: start;
  max-height: 0;
  overflow: hidden;
  transition: max-height 250ms ease-in;
}
.articles .textbox.is-opened .textbox__button span:first-child {
  display: none;
}
.articles .textbox.is-opened .textbox__button span:last-child {
  display: inline-block;
  background: var(--clr-highlight-yellow);
}
.articles .textbox.is-opened .textbox__content {
  max-height: 2000px;
}