@font-face {
  font-family: "DM Mono";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("../fonts/dm-mono-v16-latin-300.woff2") format("woff2");
}

@font-face {
  font-family: "DM Mono";
  font-style: italic;
  font-weight: 300;
  font-display: swap;
  src: url("../fonts/dm-mono-v16-latin-300italic.woff2") format("woff2");
}

@font-face {
  font-family: "DM Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/dm-mono-v16-latin-regular.woff2") format("woff2");
}

@font-face {
  font-family: "DM Mono";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/dm-mono-v16-latin-italic.woff2") format("woff2");
}

@font-face {
  font-family: "DM Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/dm-mono-v16-latin-500.woff2") format("woff2");
}

@font-face {
  font-family: "DM Mono";
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/dm-mono-v16-latin-500italic.woff2") format("woff2");
}

@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("../fonts/dm-sans-v17-latin-300.woff2") format("woff2");
}

@font-face {
  font-family: "DM Sans";
  font-style: italic;
  font-weight: 300;
  font-display: swap;
  src: url("../fonts/dm-sans-v17-latin-300italic.woff2") format("woff2");
}

@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/dm-sans-v17-latin-regular.woff2") format("woff2");
}

@font-face {
  font-family: "DM Sans";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/dm-sans-v17-latin-italic.woff2") format("woff2");
}

@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/dm-sans-v17-latin-600.woff2") format("woff2");
}

@font-face {
  font-family: "DM Sans";
  font-style: italic;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/dm-sans-v17-latin-600italic.woff2") format("woff2");
}

@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/fraunces_5.3.0_latin-opsz-normal.woff2") format("woff2-variations");
}

@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/fraunces_5.3.0_latin-opsz-italic.woff2") format("woff2-variations");
}

:root {
  color-scheme: light;
  --font-mono: "DM Mono", monospace;
  --font-serif: "Fraunces", serif;
  --font-sans: "DM Sans", sans-serif;
  --purple: #d850d8;
  /* Tag Colours are sampled from these stops by tagSpectrum in
     internal/models/TagColour.go; keep the two in step. */
  --gradient-color: linear-gradient(
    45deg,
    #d850d8 0%,
    #e5416d 10%,
    #e84b46 20%,
    #ea7547 30%,
    #eeb042 40%,
    #dbd656 50%,
    #79ca4e 60%,
    #64b9cf 70%,
    #5489d4 80%,
    #3e4fd4 90%,
    #6f3adf 100%
  );
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
*:not(dialog) {
  margin: 0;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

p {
  text-wrap: pretty;
}
h1,
h2,
h3,
h4,
h5,
h6 {
  text-wrap: balance;
}

body {
  font-family: var(--font-mono);
  font-weight: 300;
  background: url("https://rachsmith-assets.b-cdn.net/assets/paper.jpg");
}

body:has(> .site-footer) {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

body:has(> .site-footer) > .container {
  flex: 1;
  width: 100%;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-serif);
  font-weight: 400;
}

.container {
  max-width: 69ch;
  margin: 0 auto;
  padding: 0 2rem;
}

.index-header {
  position: relative;
  padding: 4rem 0;
}

.title {
  font-size: 2rem;
  margin-bottom: 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.title .small {
  font-size: 1.2rem;
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 400;
  text-align: left;
  margin-left: -4.2rem;
}

.title .large {
  font-size: 4rem;
  line-height: 0.8;
  text-transform: lowercase;
}

.index-posts {
  position: relative;
  list-style: none;
  padding: 0;
  margin: 0;
}

.index-posts h2 a {
  position: relative;
  font-size: 2rem;
  text-decoration: none;
  color: inherit;
}

.index-posts li {
  margin-bottom: 6rem;
}

.index-posts li.note:nth-child(even) {
  text-align: right;
}

.pagination {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 6rem;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #666;
}

.pagination a {
  color: #333;
  text-decoration: none;
  text-underline-offset: 0.2em;
}

.pagination a:hover {
  text-decoration: underline;
  text-decoration-color: var(--purple);
}

.pagination a[rel="prev"] {
  margin-right: auto;
}

.pagination a[rel="next"] {
  margin-left: auto;
}

.post {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.post h2 {
  position: relative;
}

.tag-line,
.date,
.footnotes-label {
  position: relative;
  z-index: 1;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  font-weight: 400;
  color: #666;
}

.tag-line {
  text-transform: uppercase;
  color: #333;
}

.tag-line a {
  color: inherit;
  text-decoration: none;
  text-underline-offset: 0.2em;
}

.date {
  text-decoration: none;
  text-underline-offset: 0.2em;
}

.tag-line a:hover,
.date:hover {
  text-decoration: underline;
}

/* Each Tag's hover underline is its Tag Colour, set per link. */
.tag-line a:hover {
  text-decoration-color: var(--tag-color, var(--purple));
  text-decoration-thickness: 0.15em;
}

.header-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 500px;
}

.lockup {
  position: relative;
  z-index: 1;
  display: block;
  padding: 3rem 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-decoration: none;
  color: inherit;
  text-align: center;
}

.lockup .serif {
  font-family: var(--font-serif);
  font-weight: 400;
  text-transform: lowercase;
  font-size: 1.4rem;
  letter-spacing: 0
}

.page-header {
  position: relative;
  padding: 1rem 0 4rem 0;
}

.page-header h1 {
  font-size: 4rem;
  line-height: 1;
}

.post-header {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.post-header h1 {
  text-align: center;
  margin-bottom: 3rem;
}

.post-body p, .nugget-body p {
  margin-bottom: 1.2rem;
}

.nugget .post-body {
  margin: 4rem 0 6rem;
}

.thanks-for-reading {
  font-style: italic;
  font-size: 0.9rem;
  margin-top: 4rem;
}

/* Full-width navy band; its .container keeps the text in the page column. */
.site-footer {
  position: relative;
  overflow: hidden;
  margin-top: 6rem;
  padding: 3rem 0;
  background: #14213d;
  color: #fff;
  font-size: 0.9rem;
}

/* Flecks in the footer's corners, clipped to the navy band, behind the text. */
.footer-canvas {
  position: absolute;
  top: 0;
  left: 0;
}

.site-footer .container {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.site-footer a {
  color: inherit;
}

.site-footer h3 {
  margin-bottom: 0.5rem;
}

.site-links {
  margin: 1.6rem 0;
  text-transform: uppercase;
}

.profile-links {
  list-style: none;
  padding: 0;
}

.profile-links li {
  margin-bottom: 0.5rem;
}

.copyright {
  opacity: 0.7;
  font-size: 0.8rem;
  text-align: center;
}

/* Code blocks. Highlighted ones take their colours from syntax.css. */
pre {
  padding: 1rem;
  overflow-x: auto;
  background: #fafafa;
}

/* Footnotes, under their label at the end of a Post's body. */
.footnotes {
  margin-top: 2rem;
  font-size: 0.9rem;
}

.footnotes-label {
  font-weight: 600;
}

/* Off-site links in a Post body: an arrow, in the link's own colour. */
a.external::after {
  content: "";
  display: inline-block;
  width: 0.6em;
  height: 0.6em;
  margin-left: 0.2em;
  background-color: currentColor;
  -webkit-mask: var(--external-arrow);
  mask: var(--external-arrow);
  --external-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M3 1h6v6M9 1 1 9' fill='none' stroke='black' stroke-width='1.5'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Thick purple underlines that turn rainbow on hover. The underline stops
   short of the external arrow. */
.styled-link-underlines a:not(.lty-playbtn) {
  color: inherit;
  text-decoration: none;
  background-repeat: no-repeat;
  background-size: 100% 0.24em;
  background-position: 0 114%;
  background-image: linear-gradient(45deg, var(--purple), var(--purple));
}

.styled-link-underlines a.external {
  background-size: calc(100% - 0.8em) 0.24em;
}

.styled-link-underlines a:not(.lty-playbtn):hover {
  background-image: var(--gradient-color);
}

.comments {
  margin-top: 2rem;
}

.comments-closed {
  font-size: 0.85em;
  font-style: italic;
  margin: 1.6rem 0;
}

.comments ul,
.comment-children {
  list-style: none;
  margin: 0;
  padding: 0;
}

.comment {
  --muted: #6b6b6b;
  --rule: #d9d6cf;
  padding-left: 1rem;
  border-left: 2px solid var(--rule);
  margin-bottom: 1.75rem;
}

.comment-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.75rem;
  margin: 0 0 0.4rem;
}

.comment-name {
  font-weight: bold;
}

.op {
  font-size: 0.7em;
  padding: 0.1em 0.5em;
  border: 1px solid currentColor;
  border-radius: 3px;
  letter-spacing: 0.05em;
}

.comment-date,
.comment-date:visited {
  font-size: 0.8em;
  color: var(--muted);
  text-decoration: none;
}
.comment-date:hover {
  text-decoration: underline;
}

.comment-content {
  line-height: 1.6;
  max-width: 60ch;
}
.comment-content > :first-child { margin-top: 0; }
.comment-content > :last-child  { margin-bottom: 0; }
.comment-content p { margin: 0 0 0.75em; }

/* Replies: nest inside the parent's rule */
.comment-children {
  margin-top: 1.25rem;
}
.comment-children .comment {
  margin-bottom: 1.25rem;
}

.comment:nth-child(11n + 1)  { --rule: #d850d8; }
.comment:nth-child(11n + 2)  { --rule: #e5416d; }
.comment:nth-child(11n + 3)  { --rule: #e84b46; }
.comment:nth-child(11n + 4)  { --rule: #ea7547; }
.comment:nth-child(11n + 5)  { --rule: #eeb042; }
.comment:nth-child(11n + 6)  { --rule: #dbd656; }
.comment:nth-child(11n + 7)  { --rule: #79ca4e; }
.comment:nth-child(11n + 8)  { --rule: #64b9cf; }
.comment:nth-child(11n + 9)  { --rule: #5489d4; }
.comment:nth-child(11n + 10) { --rule: #3e4fd4; }
.comment:nth-child(11n + 11) { --rule: #6f3adf; }

.comment:has(> .comment-meta .op) {
  border-left-color: currentColor;
}

.comment:target {
  background: rgba(255, 230, 150, 0.25);
}

