@font-face {
  font-family: "ABC Marist";
  src: url("/font/ABCMarist-Regular.woff2") format("woff2"),
    url("/font/ABCMarist-Regular.woff") format("woff"),
    url("/font/ABCMarist-Regular.otf") format("opentype"),
    url("/font/ABCMarist-Regular.ttf") format("truetype");
  font-display: swap;
}

:root {
  --text: #0d0d0d;
  --muted: #6a6a6a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #ffffff;
  color: var(--text);
  font-family: "ABC Marist", "Times New Roman", Times, serif;
  font-size: 14px;
  line-height: 1.5;
}

.page {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px;
}

.content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 540px;
}

p {
  margin: 0 0 1.5em;
  font-weight: 600;
  letter-spacing: 0.001em;
  line-height: 1.5;
}

.name {
  margin-bottom: 0;
}

.contact {
  margin-bottom: 1.5em;
  font-style: italic;
}

.inline-toggle {
  text-decoration: underline;
  text-underline-offset: 0.09em;
  cursor: pointer;
  display: inline;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

.inline-toggle:focus-visible {
  outline: 1.5px solid var(--muted);
  outline-offset: 2px;
  border-radius: 2px;
}

.toggle-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.revealed {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  visibility: hidden;
  transition:
    grid-template-rows 350ms ease,
    opacity 300ms ease,
    margin 300ms ease,
    visibility 0s 350ms;
}

.revealed-inner {
  overflow: hidden;
  min-height: 0;
}

.copy-block,
.reading-section {
  color: var(--muted);
  margin: 0;
}

#show-coase:checked + .copy-block,
#show-reading:checked + .reading-section {
  grid-template-rows: 1fr;
  opacity: 1;
  visibility: visible;
  margin: 0 0 1.5em;
  transition:
    grid-template-rows 350ms ease,
    opacity 300ms ease,
    margin 300ms ease,
    visibility 0s 0s;
}

.copy-block p,
.reading-scroll p {
  font-weight: 600;
}

.copy-block p:last-child {
  margin-bottom: 0;
}

.content a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 0.09em;
  transition: text-decoration-color 120ms ease;
}

.content a:hover {
  text-decoration-color: currentColor;
}

a.coase-link {
  text-decoration-color: currentColor;
}

.reading-scroll {
  --fade-top: 0%;
  --fade-bottom: 18%;
  max-height: 160px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-right: 12px;
  scrollbar-width: thin;
  scrollbar-color: #bdbdbd transparent;
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    black var(--fade-top),
    black calc(100% - var(--fade-bottom)),
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    black var(--fade-top),
    black calc(100% - var(--fade-bottom)),
    transparent 100%
  );
}

.reading-scroll p {
  margin-bottom: 0.4em;
}

.reading-scroll p:last-child {
  margin-bottom: 0;
}

@media (max-width: 768px) {
  body {
    font-size: 13px;
  }

  .page {
    padding: 16px;
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
    padding-bottom: max(16px, env(safe-area-inset-bottom));
  }
}

@media (max-width: 400px) {
  body {
    font-size: 12.5px;
  }

  .reading-scroll {
    max-height: 140px;
  }
}
