:root {
  --bg: #ece7df;
  --surface: #fffdf9;
  --text: #1f1f1f;
  --muted: #5f5f5f;
  --rule: #d7d0c7;
  --purple: #4b2878;
  --blue: #283c8c;
  --link: #1e4f8a;
  --shadow: 0 8px 28px rgba(0, 0, 0, 0.10);
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  background:
    url("../03-assets/htmlbg.png") top center / cover no-repeat,
    var(--bg);
  background-color: var(--bg);
  color: var(--text);
  font-family: Verdana, Geneva, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  font-weight: 400;
  font-style: normal;
}

.newsletter-shell {
  position: relative;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 1rem 0.95rem 2.4rem;
  border-radius: 22px;
  background: rgba(255, 253, 249, 0.96);
  box-shadow: var(--shadow);
  border: 1px solid rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.newsletter-shell::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 8.75rem;
  background:
    linear-gradient(to bottom, rgba(75, 40, 120, 0.18), rgba(75, 40, 120, 0.05)),
    url("../03-assets/header-new.png") top center / cover no-repeat;
  z-index: 0;
}

.newsletter-shell > * {
  position: relative;
  z-index: 1;
  box-sizing: border-box;
}

.newsletter-shell::after {
  content: "";
  display: table;
}

@media (min-width: 720px) {
  .newsletter-shell {
    padding: 1.35rem 1.4rem 3rem;
    border-radius: 26px;
  }
}

@media (max-width: 479px) {
  .newsletter-shell {
    padding: 0.95rem 0.9rem 2rem;
    border-radius: 18px;
  }

  .newsletter-shell::before {
    height: 7.2rem;
    background:
      linear-gradient(to bottom, rgba(75, 40, 120, 0.22), rgba(75, 40, 120, 0.07)),
      url("../../03-assets/header.png") top center / cover no-repeat;
  }
}

p,
ul,
ol,
blockquote,
div.par,
div.caption,
figcaption,
li,
td,
th,
pre,
code,
kbd,
samp,
h1,
h2,
h3,
h4,
a,
span,
div {
  font-family: Verdana, Geneva, sans-serif;
}

p,
ul,
ol,
blockquote,
div.par,
div.caption,
figcaption {
  max-width: none;
}

p {
  margin: 0.8rem 0;
}

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

a:hover {
  color: var(--purple);
}

strong,
b,
.newsletter-shell strong,
.newsletter-shell b {
  font-weight: 700;
  font-style: normal;
  color: #444444;
}

em,
i,
.newsletter-shell em,
.newsletter-shell i {
  font-style: italic;
  font-weight: 400;
  color: #444444;
}

strong em,
strong i,
b em,
b i,
em strong,
i strong,
em b,
i b,
.newsletter-shell strong em,
.newsletter-shell strong i,
.newsletter-shell b em,
.newsletter-shell b i,
.newsletter-shell em strong,
.newsletter-shell i strong,
.newsletter-shell em b,
.newsletter-shell i b {
  font-weight: 700;
  font-style: italic;
  color: #444444;
}

img,
object,
embed,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

figure.figure,
div.figure,
.wrapfigure {
  margin: 1.4rem 0;
}

figure.figure img,
div.figure img,
.newsletter-image {
  width: auto;
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}

figcaption,
.caption {
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.4;
}

h1,
h2,
h3,
h4 {
  line-height: 1.2;
  margin: 1.2rem 0 0.55rem;
  font-weight: 700;
  font-style: normal;
}

h1 {
  color: var(--purple);
  font-size: 2rem;
}

.newsletter-shell h1:first-of-type,
.newsletter-shell .maketitle h1,
.newsletter-shell .titleHead {
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
  margin-top: 0;
  margin-bottom: 0.15rem;
  padding-top: 0.35rem;
  padding-bottom: 0;
  line-height: 1.05;
}

.newsletter-shell .date,
.newsletter-shell .makedate {
  display: inline-block;
  color: #ffffff;
  background: var(--purple);
  margin-top: 0;
  margin-bottom: 0.35rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  line-height: 1.1;
  font-size: 0.9rem;
  font-weight: 700;
}

.newsletter-shell hr:first-of-type {
  margin-top: 0.65rem;
  margin-bottom: 1rem;
}

.newsletter-shell > p:first-of-type,
.newsletter-shell > div:first-of-type {
  margin-top: 0;
}

h2,
.section-heading {
  color: var(--purple);
  font-size: 1.45rem;
  border-top: 1px solid var(--rule);
  padding-top: 1rem;
  margin-top: 1.8rem;
}

h3,
.subsection-heading {
  color: var(--blue);
  font-size: 1.15rem;
}

h4,
.paragraph-heading {
  color: var(--text);
  font-size: 1rem;
}

.newsletter-section:first-of-type .section-heading,
h2:first-child {
  border-top: 0;
  padding-top: 0;
  margin-top: 0.5rem;
}

hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 1.5rem 0;
}

blockquote {
  margin: 1.25rem 0;
  padding: 0.75rem 1rem;
  border-left: 4px solid var(--purple);
  background: rgba(75, 40, 120, 0.06);
  border-radius: 0 10px 10px 0;
}

ul,
ol {
  padding-left: 1.35rem;
  margin: 0.8rem 0 1rem;
}

li + li {
  margin-top: 0.35rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  display: block;
  overflow-x: auto;
  margin: 1rem 0 1.25rem;
  background: var(--surface);
}

th,
td {
  border: 1px solid var(--rule);
  padding: 0.55rem 0.65rem;
  text-align: left;
  vertical-align: top;
}

th {
  background: rgba(40, 60, 140, 0.08);
}

pre {
  overflow-x: auto;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  background: #f0ece7;
}

code,
pre,
kbd,
samp {
  background: #f0ece7;
  border-radius: 4px;
}

code {
  padding: 0.08rem 0.25rem;
}

.toc,
.contents,
.newsletter-contents {
  margin: 1rem 0 1.4rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.55);
}

.toc ul,
.contents ul,
.newsletter-contents ul {
  margin: 0.4rem 0 0;
}

.section-nav-icons {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0.7rem 0 1.3rem;
}

.section-nav-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.2rem;
  height: 2rem;
  padding: 0 0.65rem;
  text-decoration: none;
  font-size: 0.88rem;
  line-height: 1;
  color: var(--purple);
  background: rgba(75, 40, 120, 0.08);
  border: 1px solid rgba(75, 40, 120, 0.18);
  border-radius: 999px;
  font-weight: 700;
}

.section-nav-icons a:hover {
  color: white;
  background: var(--purple);
}

@media (max-width: 480px) {
  body {
    font-size: 16px;
    line-height: 1.6;
    background:
      url("../../03-assets/htmlbg.png") top center / auto no-repeat,
      var(--bg);
    background-color: var(--bg);
  }

  h1 {
    font-size: 1.7rem;
  }

  h2,
  .section-heading {
    font-size: 1.3rem;
  }

  h3,
  .subsection-heading {
    font-size: 1.08rem;
  }

  .section-nav-icons {
    flex-wrap: wrap;
    gap: 0.4rem;
  }
}
