/* The New look, variant A "Hand-lettered": what it is, and any tweaks, are in the Site spec #91's
   New look section. Section comments below name the part of it each rule carries out. */

:root {
  --ink: #141414;
  --muted: #6b6b6b;
  --rule: #d9d9d9;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font: 19px/1.7 var(--serif);
}

.wrap {
  max-width: 38rem;
  margin: 0 auto;
  padding: 0 1.5rem;
  /* Long URLs written out as link text wrap instead of scrolling sideways on phones. */
  overflow-wrap: break-word;
}

a {
  color: var(--ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

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

img,
iframe,
video,
audio {
  max-width: 100%;
}

img {
  height: auto;
}

iframe {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
}

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

h1 {
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  line-height: 1.15;
  text-align: center;
  margin: 0.25rem 0 0.75rem;
}

/* Lists that are menus or listings carry no bullets. */
.site-header ul,
.site-footer ul,
.recent-posts,
.largest-categories,
.post-list,
.category-list,
.way-back,
.comment-list,
.comment-replies {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* New look: Type (small capitals). */
.label,
.menu a,
.post-categories,
.breadcrumb,
.comment-author {
  font-variant: small-caps;
  text-transform: lowercase;
  letter-spacing: 0.08em;
}

.label {
  text-align: center;
  font-size: 18px;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin: 0 0 1.5rem;
}

.fleuron {
  text-align: center;
  color: var(--muted);
  font-size: 22px;
  margin: 2.75rem 0;
}

/* New look: Header and Menu. */
.site-header {
  text-align: center;
  padding-top: 2.5rem;
}

.logo {
  display: block;
  width: min(420px, 88%);
  margin: 0 auto;
}

.logo img {
  display: block;
  width: 100%;
  margin: -10% 0 -8%;
}

.menu {
  margin-top: 1.25rem;
  padding: 0.7rem 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.menu ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 1.6rem;
}

.menu a {
  font-size: 17px;
  letter-spacing: 0.09em;
  text-decoration: none;
}

.menu a:hover,
.menu a[aria-current="page"] {
  text-decoration: underline;
}

main {
  padding: 3rem 0 2rem;
}

/* New look: Colours (muted text) and Type (dates). */
.post-date,
.post-meta,
.count,
.post-categories,
.breadcrumb {
  color: var(--muted);
}

time {
  font-style: italic;
}

.post-categories {
  font-size: 16px;
}

.post-categories a,
.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}

.post-categories a:hover,
.breadcrumb a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.notice,
.count,
.more {
  font-style: italic;
  text-align: center;
}

.notice {
  font-size: 18px;
  margin: 0;
}

.more {
  margin-top: 1.75rem;
}

/* New look: Colours (listing and menu links). */
.recent-posts > li > a,
.post-list > li > a,
.category-list a,
.largest-categories a,
.way-back a,
.footer-menu a {
  text-decoration: none;
}

.recent-posts > li > a:hover,
.post-list > li > a:hover,
.category-list a:hover,
.largest-categories a:hover,
.way-back a:hover,
.footer-menu a:hover {
  text-decoration: underline;
}

/* New look: Home page. */
.recent-posts {
  text-align: center;
}

.recent-posts li {
  padding: 0.85rem 0;
}

.recent-posts li + li {
  border-top: 1px solid var(--rule);
}

.recent-posts > li > a {
  font-size: 22px;
  line-height: 1.3;
}

.recent-posts .post-categories {
  margin: 0.15rem 0 0;
}

.largest-categories {
  text-align: center;
  font-size: 18px;
  line-height: 2;
}

.largest-categories li {
  display: inline;
  white-space: nowrap;
}

.largest-categories li + li::before {
  content: " · ";
}

.largest-categories .count,
.category-list .count {
  font-size: 16px;
}

/* New look: Post dates and categories, Images. */
.post > header,
.page > header {
  text-align: center;
}

.post > header p {
  margin: 0;
}

.featured-image {
  display: block;
  margin: 0 auto 1.5rem;
}

.entry-content {
  margin-top: 2rem;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
  font-style: italic;
}

.post::after,
.page::after {
  content: "";
  display: block;
  clear: both;
}

blockquote {
  margin: 1.5rem 0;
  padding: 0 1.25rem;
  border-left: 1px solid var(--ink);
  font-style: italic;
}

.alignleft {
  float: left;
  margin: 0.4rem 1.25rem 0.5rem 0;
}

.alignright {
  float: right;
  margin: 0.4rem 0 0.5rem 1.25rem;
}

.aligncenter {
  display: block;
  margin-inline: auto;
}

figure {
  margin: 1.5rem 0;
}

figcaption {
  font-size: 16px;
  font-style: italic;
  color: var(--muted);
  text-align: center;
}

pre.verse {
  font: inherit;
  white-space: pre-wrap;
}

/* New look: Comments. */
.comments {
  clear: both;
}

.comment {
  margin: 0 0 1.5rem;
}

.comment-meta {
  margin: 0;
}

.comment-meta time {
  color: var(--muted);
  font-size: 16px;
  margin-left: 0.5rem;
}

.comment-text {
  font-size: 17px;
}

.comment-text p {
  margin: 0.3rem 0;
}

.comment-replies {
  margin-top: 1.5rem;
  margin-left: 1.5rem;
  padding-left: 1rem;
  border-left: 1px solid var(--rule);
}

.comments-closed {
  text-align: center;
  font-style: italic;
  color: var(--muted);
}

/* New look: Listings. */
.breadcrumb {
  text-align: center;
  margin: 0;
}

.year {
  text-align: center;
  font-size: 30px;
  font-variant-numeric: oldstyle-nums;
  margin: 2.5rem 0 0.5rem;
}

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

.post-list > li > a {
  font-size: 21px;
  line-height: 1.3;
}

.post-meta {
  font-size: 16px;
  margin: 0;
}

.preview {
  font-size: 17px;
  margin: 0.3rem 0 0;
}

/* New look: /category/. */
.category-list {
  columns: 2;
  column-gap: 2.5rem;
}

.category-list li {
  break-inside: avoid;
  padding: 0.2rem 0;
}

/* New look: 404 page. */
.way-back {
  text-align: center;
  font-style: italic;
}

/* New look: Footer. */
.site-footer {
  text-align: center;
  padding: 1rem 0 7rem;
  color: var(--muted);
  font-size: 16px;
}

.site-footer p {
  margin: 0;
}

.site-footer .fleuron {
  margin: 1rem 0 2.75rem;
}

.footer-menu ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 1.4rem;
  margin-bottom: 1.5rem;
}

.footer-menu a {
  font-style: italic;
}

.signature {
  display: block;
  width: 72px;
  margin: 0 auto 0.5rem;
}

@media (max-width: 600px) {
  body {
    font-size: 18px;
  }

  main {
    padding-top: 2rem;
  }

  .menu ul {
    gap: 0.15rem 1.1rem;
  }

  .category-list {
    columns: 1;
  }

  .alignleft,
  .alignright {
    float: none;
    display: block;
    width: 100%;
    margin: 1rem 0;
  }
}
