:root {
  --pink: #f599b5;
  --pink-soft: #ffe6ef;
  --ink: #171717;
  --muted: #717171;
  --line: #ececec;
  --paper: #ffffff;
  --accent: #24a7a2;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #fff7fa;
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 18px;
  line-height: 1.62;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.05);
}

.topbar {
  display: grid;
  grid-template-columns: 96px 1fr 96px;
  align-items: center;
  min-height: 72px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.brand {
  justify-self: center;
  color: var(--pink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 48px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
}

.menu-toggle {
  display: inline-flex;
  flex-direction: column;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 10px 8px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  height: 2px;
  background: var(--ink);
}

.discuss {
  justify-self: end;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
}

.nav {
  display: flex;
  justify-content: center;
  gap: 28px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px 16px;
  color: #333;
  font-size: 15px;
  font-weight: 800;
  text-transform: uppercase;
}

.nav a:hover,
.section-link,
.meta a,
.related a:hover {
  color: var(--pink);
}

.article-head {
  background: linear-gradient(180deg, #fff 0%, #fff7fa 100%);
  border-bottom: 1px solid var(--line);
}

.article-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 54px;
  align-items: center;
  max-width: 1180px;
  margin: 0 auto;
  padding: 64px 24px 56px;
}

.section-link {
  display: inline-block;
  margin-bottom: 18px;
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  line-height: 1.08;
  letter-spacing: 0;
}

h1 {
  max-width: 760px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 58px;
}

.lead {
  max-width: 650px;
  margin: 24px 0 18px;
  color: #333;
  font-size: 22px;
  line-height: 1.45;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.hero-image {
  margin: 0;
  justify-self: end;
  width: min(420px, 100%);
}

.hero-image img {
  width: 100%;
  border-radius: 8px;
  box-shadow: 18px 18px 0 var(--pink-soft);
}

.article-body {
  max-width: 920px;
  margin: 0 auto;
  padding: 50px 24px 80px;
  background: var(--paper);
}

.article-body > p {
  margin: 0 0 42px;
  font-size: 21px;
}

.book {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 32px;
  padding: 38px 0;
  border-top: 1px solid var(--line);
}

.book figure {
  margin: 0;
}

.book img {
  width: 210px;
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(23, 23, 23, 0.12);
}

.book h2,
.related h2,
.tags h2,
.comments h2,
.footer h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 30px;
}

.book p {
  margin: 18px 0 0;
}

.promo {
  margin: 48px 0;
  padding: 30px;
  background: var(--pink-soft);
  border-left: 8px solid var(--pink);
  border-radius: 8px;
}

.promo p {
  margin: 0 0 22px;
  font-size: 21px;
}

.button,
.comments button,
.cookie button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border: 0;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  text-transform: uppercase;
}

.button:hover,
.comments button:hover,
.cookie button:hover {
  background: var(--accent);
}

.author {
  padding: 18px 0 32px;
  color: var(--pink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
  font-weight: 700;
}

.related,
.tags,
.comments {
  padding: 34px 0;
  border-top: 1px solid var(--line);
}

.related ul {
  display: grid;
  gap: 14px;
  margin: 22px 0 0;
  padding-left: 22px;
}

.tags div {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.tags a {
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
}

.comments h2 span {
  color: var(--pink);
}

.comments form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.comments label {
  font-weight: 800;
}

.comments textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  font: inherit;
}

.comments button {
  justify-self: start;
}

.footer {
  background: #171717;
  color: #fff;
}

.footer-inner {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 42px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 54px 24px;
}

.footer h2 {
  margin-bottom: 18px;
  color: var(--pink);
  font-size: 25px;
}

.footer p {
  margin: 0 0 14px;
  color: #e6e6e6;
  font-size: 15px;
  line-height: 1.55;
}

.cookie {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  width: min(680px, calc(100% - 36px));
  padding: 18px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.18);
}

.cookie.is-hidden {
  display: none;
}

.cookie p {
  margin: 0;
  color: #333;
  font-size: 14px;
  line-height: 1.45;
}

@media (max-width: 900px) {
  .topbar {
    grid-template-columns: 48px 1fr 72px;
    min-height: 62px;
    padding: 0 16px;
  }

  .brand {
    font-size: 38px;
  }

  .nav {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 0 16px 18px;
  }

  .nav.is-open {
    display: flex;
  }

  .article-grid,
  .book,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .article-grid {
    gap: 34px;
    padding: 42px 18px 44px;
  }

  h1 {
    font-size: 40px;
  }

  .lead {
    font-size: 19px;
  }

  .hero-image {
    justify-self: center;
  }

  .article-body {
    padding: 34px 18px 58px;
  }

  .book {
    gap: 22px;
  }

  .book img {
    width: min(230px, 100%);
  }

  .book h2,
  .related h2,
  .tags h2,
  .comments h2 {
    font-size: 26px;
  }

  .cookie {
    grid-template-columns: 1fr;
  }
}

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

  .discuss {
    display: none;
  }

  .topbar {
    grid-template-columns: 42px 1fr 42px;
  }

  h1 {
    font-size: 34px;
  }

  .article-body > p,
  .promo p {
    font-size: 18px;
  }

  .hero-image img {
    box-shadow: 10px 10px 0 var(--pink-soft);
  }

  .promo {
    padding: 22px;
  }
}
