/* MVP.css */
:root {
  --font-family: "Kosugi Maru", sans-serif;
  --line-height: 2;
  --color-text: #222;
  --color-text-secondary: #777;
  --width-card: 222px;
  --width-content: 720px;
}

/* Header */
header {
  padding-top: 1rem;
}
nav {
  margin-bottom: 0;
}
nav > a:first-child {
  font-family: "Monomaniac One", sans-serif;
  font-weight: normal;
  font-size: 2.5rem;
  text-decoration: none;
  color: var(--color-text);
  white-space: nowrap;
}
h1 {
  font-family: "Monomaniac One", sans-serif;
  font-weight: normal;
  font-size: 8rem;
  line-height: 0.75;
}
h1 > span {
  font-size: 3.5rem;
}

/* Typography */
mark {
  background: linear-gradient(transparent 40%, rgba(255, 247, 0, 0.4) 40%);
  color: var(--color-text);
}
li a {
  vertical-align: top;
}
.bold {
  font-weight: bold;
}
pre {
  line-height: 1;
  font-size: 11px;
}
@media (min-width: 720px) {
  pre {
    font-size: 16px;
  }
}

/* Figure */
figure {
  text-align: center;
}
figure ~ aside {
  margin-top: 1rem;
}

/* Card */
section aside {
  margin: 0.25rem;
  padding: 0.25rem;
}
section aside a {
  font-weight: normal;
  text-decoration: none;
}
.card-caption {
  text-align: center;
  color: var(--color-text-secondary);
}

/* Button */
a em , a i {
  font-style: normal;
  margin: 0.25rem 0;
  padding: 0.25rem 0.5rem;
}
a em::before , a i::before {
  content: "▶";
}

/* ホームへ戻るボタン */
footer a em::before , footer a i::before {
  content: "⌂";
  margin-right: 0.25rem;
}
.back-to-home {
  text-align: center;
}

/* パンくずリスト */
#breadcrumb {
  background-color: var(--color-bg-secondary);
  font-weight: normal;
}
#breadcrumb a {
  font-weight: normal;
  text-decoration: none;
}
#breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding-left: 0.75rem;
}
#breadcrumb li:first-child a::before {
  content: "⌂";
  margin-right: 0.25rem;
}
#breadcrumb li:not(:last-of-type)::after {
  content: ">";
  margin: 0.5rem;
}

/* アンカーリンク */
.anchor-links {
  margin: 0.75rem 0;
  padding: 0;
  width: 100%;
}

/* No Image https://text.sakura.ne.jp/memo/8996300/ */
.noimage{
  width: 222px;
  height: 222px;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--color-bg-secondary);
  color: var(--color-text-secondary);
  font-size: 1.5rem;
}
.noimage::before {
  content:attr(title);
}

/* 横並び定義リスト https://css-grid-layout-samples.netlify.app/markups/horizontal-dl/ */
dl {
  display: grid;
  gap: 1rem;
  grid-template-columns: [key] minmax(7rem, min-content) [value] 1fr;
}
dt {
  grid-column: key;
  white-space: nowrap;
  font-weight: bold;
}
dd {
  grid-column: value;
  margin-left: 0;
}

/* 見出しデザイン https://jajaaan.co.jp/css/css-headline/ */
h2 {
  position: relative;
  overflow: hidden;
  padding: 1.5rem 2rem 1.5rem 130px;
  border: 2px solid var(--color-text);
}
h2:before {
  position: absolute;
  top: -150%;
  left: -100px;
  width: 200px;
  height: 300%;
  content: '';
  -webkit-transform: rotate(25deg);
  transform: rotate(25deg);
  background: var(--color-text);
}
h2 span {
  font-size: 40px;
  position: absolute;
  z-index: 1;
  top: 0;
  left: 0;
  display: block;
  padding-top: 8px;
  padding-left: 16px;
  color: var(--color-bg);
}
h3 {
  margin-top: 2.5rem;
  padding: 1rem 2rem;
  border-left: 10px solid var(--color-text);
  border-bottom: 2px solid var(--color-text);
}
h3 span {
  color: var(--color-text-secondary);
}
h4 {
  padding: 0.75rem 2rem;
  border-left: 10px solid var(--color-text);
}
h5 {
  width: fit-content;
  padding: 0.5rem 1rem;
  border: 2px solid var(--color-text);
}

/* カラム https://catalpa.oss.onl/ */
.column {
  display: flex;
  flex-wrap: wrap;
}
.column > div {
  margin-inline-start: auto;
  margin-inline-end: auto;
  flex-grow: 1;
}

/* アコーディオン (https://pulpxstyle.com/post-187/) */
summary {
  list-style: none;
  position: relative;
  margin-bottom: 10px;
  padding: 20px 70px 20px 30px;
  cursor: pointer;
  border: 3px solid var(--color-text);
}
summary::-webkit-details-marker {
  display: none;
}
summary:hover,
details[open] summary {
  background-color: var(--color-bg-secondary);
}
summary::after {
  content: "✚";
  position: absolute;
  top: 50%;
  right: 30px;
  transform: translateY(-50%);
  transition: transform 0.5s;
  font-size: 30px;
}
details[open] summary::after {
  transform: translateY(-50%) rotate(45deg);
}
.answer {
  padding: 5px 0;
}
details[open] .answer {
  animation: fadein 0.5s ease;
}
@keyframes fadein {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

/* ページトップへ戻るボタン https://rilaks.jp/blog/pagetop-css/ */
html {
  scroll-behavior: smooth;
}
.pagetop {
  height: 50px;
  width: 50px;
  position: fixed;
  right: 30px;
  bottom: 30px;
  background: var(--color-bg);
  border: solid 2px var(--color-text);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2;
  box-shadow: 0 4px 6px rgb(0 0 0 / 30%);
}
.pagetop-arrow {
  height: 10px;
  width: 10px;
  border-top: 3px solid var(--color-text);
  border-right: 3px solid var(--color-text);
  transform: translateY(20%) rotate(-45deg);
}
@media (hover: hover) and (pointer: fine) {
  .pagetop:hover, .pagetop:hover .pagetop-arrow {
    border-color: var(--color-link);
  }
}
footer {
  padding-bottom: 6rem;
}
