* {
  box-sizing: border-box;
}

:root {
  --font-family-primary: "Hiragino Mincho ProN", serif;
  --font-family-code: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    Liberation Mono, Courier New, monospace;

  --font-size-1: 12px;
  --font-size-2: 14px;
  --font-size-3: 16px;
  --font-size-4: 18px;
  --font-size-5: 20px;
  --font-size-6: 34px;
  --font-size-7: 28px;
  --font-size-8: 35px;
  --font-size-9: 60px;

  --font-weight-light: 300;
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-bold: 700;

  --site-navigation-height: 48px;
  --site-navigation-sp-height: 48px;

  --sp-width: 600px;
}

html,
body {
  min-height: 100%;
  font-family: var(--font-family-primary);
  padding: 0;
  margin: 0;
  min-width: 480px;
}

body {
  background: var(--background);
  color: var(--gray-a12);
}

h1,
h2,
h3,
h4,
h5,
h6,
p {
  font-family: var(--font-family-primary);
  margin: 0;
  margin-bottom: 1.5em;
}

h1 {
  font-size: var(--font-size-6);
  letter-spacing: 0.5;
  line-height: 30px;
  letter-spacing: -0.00625em;
}

h2 {
  font-size: var(--font-size-5);
  line-height: 20px;
  line-height: 28px;
  letter-spacing: -0.005em;
}

h3 {
  font-size: var(--font-size-4);
  line-height: 26px;
  letter-spacing: -0.0025em;
}

h4 {
  font-size: var(--font-size-3);
  line-height: 24px;
  letter-spacing: 0em;
}

h5 {
  font-size: var(--font-size-2);
  line-height: 20px;
  letter-spacing: 0em;
}

h6 {
  font-size: var(--font-size-1);
  line-height: 16px;
  letter-spacing: 0.0025em;
}

p {
  font-weight: var(--font-weight-medium);
  font-size: var(--font-size-4);
  margin-bottom: 36px;
  text-indent: 1em;
}

hr {
  margin-bottom: 48px;
  border-color: var(--gray-a8);
}

ol,
ul {
  font-size: var(--font-size-4);
  font-family: var(--font-family-primary);
  font-weight: var(--font-weight-light);
}

ol {
  margin: 0;
  padding-left: 42px;
}

ul {
  margin: 0;
  padding-left: 38px;
}

a {
  color: var(--accent-a11);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-decoration-color: var(--accent-a10);
}

section {
  margin-bottom: 48px;
  padding: 2em;
  max-width: 90ch;
  word-wrap: break-word;
  word-break: break-word;
  white-space: normal;
}

section:first-of-type {
  margin-top: 36px;
}

section > :last-child {
  margin-bottom: 0;
}

img {
  border-radius: 4px;
  max-width: 256px;
  max-height: 256px;
}

figure {
  margin: 1em 0 1em 0;
}

figcaption {
  font-family: var(--font-family-primary);
  font-size: var(--font-size-3);
}

table {
  border-collapse: separate;
  border: 1px solid var(--gray-5);
  border-radius: 4px;
  border-spacing: 0;
  box-sizing: border-box;
  font-size: var(--font-size-2);
  font-family: var(--font-family-primary);
  min-width: 256px;
  margin-bottom: 1.5em;
}

table thead tr {
  background-color: var(--gray-4);
}

table tfoot tr {
  background-color: var(--gray-3);
}

table td,
table th {
  padding: 12px;
}

table th {
  font-weight: var(--font-weight-bold);
}

tr > td:first-of-type {
  min-width: 10ch;
}

table thead tr th {
  border-bottom: 1px solid var(--gray-5);
  text-align: left;
}

blockquote {
  margin: 0;
  padding: 8px 8px 8px 12px;
  font-size: var(--font-size-1);
  border-left: 4px solid var(--accent-6);
  margin-bottom: 32px;
}

blockquote :last-child {
  margin-bottom: 0;
}

blockquote p {
  text-indent: 0em;
}

code:not(pre code) {
  font-family: var(--font-family-code);
  font-weight: var(--font-weight-light);
  color: var(--accent-a11);
  font-size: 95%;
  padding: 2px 6px;
}

pre > code {
  font-size: var(--font-size-2);
  margin: 0;
  line-height: 1.5em;
}

pre {
  margin: 0;
  padding: 12px;
  border: 1px solid var(--gray-5);
  border-radius: 4px;
  background-color: #111113;
  color: #eeeef0;
  overflow-x: auto;
}

#site-navigation {
  display: block;
  height: var(--site-navigation-height);
  width: 100%;
  box-sizing: border-box;
  background-color: var(--gray-2);
  backdrop-filter: blur(4px);
  border-bottom: 1px solid var(--gray-2);
  box-sizing: border-box;
}

#site-navigation ul {
  width: 200px;
  list-style: none;
  display: flex;
  flex-direction: row;
  justify-content: center;
  justify-content: space-between;
  padding: 0;
  height: 100%;
}

#site-navigation ul li {
  padding: 0;
  height: 100%;
  box-sizing: border-box;
  gap: 4px;
}

#site-navigation ul li a {
  height: 100%;
  box-sizing: border-box;
  font-size: var(--font-size-2);
  padding: 2px 12px;
  color: var(--gray-a11);
  display: flex;
  justify-content: center;
  align-items: center;
}

#site-navigation ul li a:hover {
  color: var(--gray-a12);
}

@media print {
  #site-navigation {
    display: none;
  }

  h1,
  h2,
  h3,
  h4,
  h5,
  h6,
  p {
    margin-bottom: 0.75em;
  }

  h1 {
    font-size: var(--font-size-5);
  }

  h2 {
    font-size: var(--font-size-4);
  }
  h3 {
    font-size: var(--font-size-3);
  }
  h4 {
    font-size: var(--font-size-2);
  }
  h5 {
    font-size: var(--font-size-1);
  }
  h6 {
    font-size: var(--font-size-1);
  }
  p {
    font-size: var(--font-size-2);
    margin-bottom: 1em;
  }

  section {
    border: none;
    width: 80% !important;
    padding: 0;
    max-width: 144ch;
    margin-top: 0;
  }

  table {
    margin-bottom: 1em;
  }

  table td,
  table th {
    padding: 10px;
  }

  body {
    background: #fff;
    color: #000 !important;
  }

  table tr {
    color: #000;
  }

  table thead tr {
    background-color: transparent;
  }

  table tfoot tr {
    background-color: transparent;
  }
}

@media screen and (max-width: 600px) {
  #site-navigation {
    width: 100vw;
  }
  #site-navigation {
    height: var(--site-navigation-sp-height);
  }
  html,
  body {
    min-width: 0;
    overflow-x: hidden;
  }
}
