* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #fbfaf2;
  color: #111;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  line-height: 1.6;
}

a {
  color: #0645d8;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:visited {
  color: #5d238a;
}

a:hover {
  color: #c51616;
}

.page {
  width: min(100% - 32px, 680px);
  margin: 0 auto;
  padding: 34px 0 46px;
}

.site-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 2px solid #111;
  padding-bottom: 12px;
  margin-bottom: 38px;
}

.site-name {
  color: #111;
  font-size: 20px;
  font-weight: 700;
  text-decoration: none;
}

.site-name:visited {
  color: #111;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 16px;
  font-size: 14px;
}

.intro {
  position: relative;
  margin-bottom: 34px;
  padding-right: 92px;
}

.tiny-label {
  width: fit-content;
  margin: 0 0 10px;
  padding: 2px 6px;
  border: 1px solid #111;
  background: #fff;
  font-size: 12px;
  transform: rotate(-1deg);
}

h1,
h2,
p,
ul {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  font-size: clamp(32px, 8vw, 58px);
  line-height: 0.98;
  font-weight: 700;
}

h2 {
  margin-bottom: 10px;
  font-size: 19px;
  line-height: 1.2;
}

p {
  margin-bottom: 15px;
}

.scribble {
  position: absolute;
  top: 18px;
  right: 6px;
  width: 64px;
  height: 64px;
  border: 2px solid #111;
  border-radius: 51% 43% 48% 39%;
  background: #fff36d;
  transform: rotate(7deg);
  display: grid;
  place-items: center;
  box-shadow: 5px 5px 0 #111;
}

.scribble span {
  font-family: Arial, sans-serif;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0;
}

.box,
.editor,
.contact {
  margin-top: 28px;
}

.box {
  border: 2px solid #111;
  background: #fff;
  padding: 15px 17px 13px;
  box-shadow: 6px 6px 0 #e5dfc2;
}

.plain-list {
  padding-left: 22px;
  margin-bottom: 0;
}

.plain-list li {
  margin-bottom: 11px;
}

.plain-list span {
  display: block;
  color: #424242;
  font-size: 14px;
}

.editor {
  border-top: 2px solid #111;
  padding-top: 16px;
}

.editor-form {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.editor-form label {
  font-weight: 700;
}

.editor-form input,
.editor-form textarea {
  width: 100%;
  border: 2px solid #111;
  border-radius: 0;
  background: #fff;
  color: #111;
  font: inherit;
  padding: 8px 10px;
}

.editor-form textarea {
  min-height: 190px;
  resize: vertical;
}

.editor-actions,
.post-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

button {
  border: 2px solid #111;
  border-radius: 0;
  background: #fff;
  color: #111;
  cursor: pointer;
  font: inherit;
  line-height: 1.2;
  padding: 7px 10px;
}

button:hover,
button:focus-visible {
  background: #fff36d;
}

.editor-status {
  min-height: 1.5em;
  margin-bottom: 0;
  color: #424242;
  font-size: 14px;
}

.saved-posts {
  margin-top: 24px;
}

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

.post-item {
  border: 2px solid #111;
  background: #fff;
  margin-top: 12px;
  padding: 13px 15px;
}

.post-item h3 {
  margin: 0 0 2px;
  font-size: 18px;
  line-height: 1.25;
}

.post-item time {
  display: block;
  color: #595959;
  font-size: 13px;
  margin-bottom: 10px;
}

.post-item p {
  white-space: pre-wrap;
}

.empty-posts {
  color: #595959;
}

.contact {
  border-top: 2px solid #111;
  padding-top: 16px;
}

.contact p {
  margin-bottom: 7px;
}

.site-footer {
  margin-top: 38px;
  color: #555;
  font-size: 13px;
}

@media (max-width: 520px) {
  body {
    font-size: 15px;
  }

  .page {
    width: min(100% - 24px, 680px);
    padding-top: 22px;
  }

  .site-header {
    display: block;
    margin-bottom: 28px;
  }

  .site-nav {
    justify-content: flex-start;
    margin-top: 8px;
  }

  .intro {
    padding-right: 0;
  }

  .scribble {
    position: static;
    margin: 0 0 16px auto;
    width: 54px;
    height: 54px;
    box-shadow: 4px 4px 0 #111;
  }
}
