:root {
  color-scheme: light;
  --background: #fbfaf7;
  --text: #181818;
  --muted: #66625c;
  --rule: #ddd8cf;
  --link: #064f88;
  --code: #f0ede6;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--background);
  color: var(--text);
  font-family: ui-serif, Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.55;
}

body {
  margin: 0;
}

.page,
#write {
  max-width: 700px;
  margin: 0 auto;
  padding: 72px 24px;
}

b,
h1 {
  display: block;
  margin: 0 0 18px;
  font-size: 1.1rem;
  line-height: 1.3;
}

h2,
h3,
h4 {
  margin-top: 2rem;
  line-height: 1.3;
}

p {
  margin: 0 0 1.1rem;
}

a {
  color: var(--link);
  text-underline-offset: 0.16em;
}

a:hover {
  text-decoration-thickness: 2px;
}

code,
pre {
  background: var(--code);
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
}

code {
  padding: 0.08rem 0.24rem;
  overflow-wrap: anywhere;
}

pre {
  overflow-x: auto;
  padding: 0.9rem;
}

img {
  max-width: 100%;
  height: auto;
}

.site-nav {
  display: flex;
  gap: 16px;
  margin-bottom: 40px;
  color: var(--muted);
  font-size: 0.92rem;
}

.post-nav {
  display: flex;
  gap: 16px;
  max-width: 700px;
  margin: 48px auto 0;
  padding: 0 24px;
  color: var(--muted);
  font-size: 0.92rem;
}

.site-nav a,
.post-nav a {
  color: inherit;
}

.polyring {
  margin: 1.4rem 0 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
}

.post-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--rule);
}

.post-list li {
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--rule);
}

.post-list a {
  display: block;
}

.post-list span {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
}

.typora-export {
  background: var(--background) !important;
  color: var(--text) !important;
  font-family: ui-serif, Georgia, "Times New Roman", serif !important;
  padding: 0 !important;
}

.typora-export-content {
  max-width: none !important;
  display: block !important;
}

.typora-export #write {
  width: auto !important;
  padding-top: 28px !important;
}

.typora-export h1,
.typora-export h2,
.typora-export h3,
.typora-export h4,
.typora-export p,
.typora-export li {
  color: var(--text) !important;
}

.typora-export a {
  color: var(--link) !important;
}

.typora-export table {
  display: block;
  overflow-x: auto;
}

.typora-export .MathJax_SVG_Display {
  overflow-x: auto;
  overflow-y: hidden;
}

@media (max-width: 560px) {
  html {
    font-size: 17px;
  }

  .page,
  #write {
    padding: 40px 18px;
  }

  .post-nav {
    margin-top: 32px;
    padding: 0 18px;
  }
}
