:root {
  --base-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  --base-font-size: 16px;
  --base-line-height: 1.5;
  --spacing-unit: 30px;
  --text-color: #111;
  --background-color: #fdfdfd;
  --brand-color: #2a7ae2;
  --brand-color-visited: #1756a9;
  --grey-color: #828282;
  --grey-color-light: #e8e8e8;
  --grey-color-dark: #424242;
  --content-width: 800px;
}

body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
hr,
dl,
dd,
ol,
ul,
figure {
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--background-color);
  color: var(--text-color);
  display: flex;
  flex-direction: column;
  font: 400 var(--base-font-size) / var(--base-line-height) var(--base-font-family);
  font-feature-settings: "kern" 1;
  font-kerning: normal;
  min-height: 100vh;
  text-size-adjust: 100%;
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
ul,
ol,
dl,
figure {
  margin-bottom: calc(var(--spacing-unit) / 2);
}

main {
  display: block;
}

img {
  max-width: 100%;
  vertical-align: middle;
}

figure > img {
  display: block;
}

figcaption,
.post-meta {
  font-size: 0.875rem;
}

ul,
ol {
  margin-left: var(--spacing-unit);
}

li > ul,
li > ol {
  margin-bottom: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 400;
}

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

a:visited {
  color: var(--brand-color-visited);
}

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

blockquote {
  border-left: 4px solid var(--grey-color-light);
  color: var(--grey-color);
  font-size: 1.125rem;
  font-style: italic;
  letter-spacing: 0;
  padding-left: calc(var(--spacing-unit) / 2);
}

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

pre,
code {
  background-color: #eef;
  border: 1px solid var(--grey-color-light);
  border-radius: 3px;
  font-size: 0.9375rem;
}

code {
  padding: 1px 5px;
}

pre {
  overflow-x: auto;
  padding: 8px 12px;
}

pre > code {
  border: 0;
  padding-left: 0;
  padding-right: 0;
}

.wrapper {
  margin-left: auto;
  margin-right: auto;
  max-width: calc(var(--content-width) - (var(--spacing-unit) * 2));
  padding-left: var(--spacing-unit);
  padding-right: var(--spacing-unit);
}

.wrapper::after {
  clear: both;
  content: "";
  display: table;
}

table {
  border: 1px solid var(--grey-color-light);
  border-collapse: collapse;
  color: #3e3e3e;
  margin-bottom: var(--spacing-unit);
  text-align: left;
  width: 100%;
}

tr:nth-child(even) {
  background-color: #f7f7f7;
}

th,
td {
  border: 1px solid var(--grey-color-light);
  padding: 10px 15px;
}

th {
  background-color: #f0f0f0;
  border-bottom-color: #c9c9c9;
}

.site-header {
  border-bottom: 1px solid var(--grey-color-light);
  border-top: 5px solid var(--grey-color-dark);
  min-height: 56px;
  position: relative;
}

.site-title {
  float: left;
  font-size: 1.625rem;
  font-weight: 300;
  letter-spacing: 0;
  line-height: 54px;
  margin-bottom: 0;
}

.site-title,
.site-title:visited {
  color: var(--grey-color-dark);
}

.site-footer {
  border-top: 1px solid var(--grey-color-light);
  padding: var(--spacing-unit) 0;
}

.page-content {
  flex: 1;
  padding: var(--spacing-unit) 0;
}

.page-heading {
  font-size: 2rem;
}

.post-list-heading {
  font-size: 1.75rem;
}

.post-list {
  list-style: none;
  margin-left: 0;
}

.post-list > li {
  margin-bottom: var(--spacing-unit);
}

.post-meta {
  color: var(--grey-color);
}

.post-link {
  display: block;
  font-size: 1.5rem;
}

.pagination {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.post-header {
  margin-bottom: var(--spacing-unit);
}

.post-title {
  font-size: 2.625rem;
  letter-spacing: 0;
  line-height: 1;
}

.post-content {
  margin-bottom: var(--spacing-unit);
}

.post-content h2 {
  font-size: 2rem;
}

.post-content h3 {
  font-size: 1.625rem;
}

.post-content h4 {
  font-size: 1.25rem;
}

.spoilerbutton {
  display: block;
  margin: 5px 0;
}

.spoiler {
  background: #f5f5f5;
  overflow: hidden;
}

.spoiler > div {
  transition: margin 0.2s ease;
}

.spoilerbutton[value="Show"] + .spoiler > div {
  margin-top: -1000%;
}

.spoilerbutton[value="Hide"] + .spoiler {
  padding: 5px;
}

.censor {
  background-color: black;
}

.censor:hover {
  color: white;
}

@media (hover: none) {
  .censor {
    color: white;
  }
}

@media screen and (max-width: 800px) {
  .wrapper {
    max-width: calc(var(--content-width) - var(--spacing-unit));
    padding-left: calc(var(--spacing-unit) / 2);
    padding-right: calc(var(--spacing-unit) / 2);
  }

  .post-title {
    font-size: 2.25rem;
  }

  .post-content h2 {
    font-size: 1.75rem;
  }

  .post-content h3 {
    font-size: 1.375rem;
  }

  .post-content h4 {
    font-size: 1.125rem;
  }
}
