:root {
  color-scheme: light;
  --text: #111;
  --muted: #666;
  --line: #d8d8d8;
  --hover: #f5f5ed;
  --link: #0000ee;
  --page: min(90ch, calc(100vw - 4em));
}

* {
  box-sizing: border-box;
}

html {
  background: #fff;
  font-family: Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14pt;
  scroll-behavior: smooth;
  scroll-padding-top: 1em;
}

body {
  min-width: 300px;
  margin: 0;
  color: var(--text);
  background: #fff;
  line-height: 1.3;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection {
  color: #000;
  background: #fff3a3;
}

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

a:focus-visible,
button:focus-visible,
.post-cell:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  border: 0;
  white-space: nowrap;
}

.site-header {
  width: var(--page);
  margin: 2em auto 0;
}

.header-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 2em;
  padding-bottom: 1.25em;
}

.wordmark {
  color: var(--text);
  font-size: 1.75em;
  font-weight: 700;
  letter-spacing: -.03em;
  text-decoration: none;
}

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25em;
  justify-content: flex-end;
}

.feed {
  width: var(--page);
  margin: 0 auto;
  padding: 0;
  border-top: 1px solid var(--line);
}

.loading-state,
.load-error,
.no-script {
  width: var(--page);
  margin: 0 auto;
  padding: 2em 0;
}

.post-cell {
  position: relative;
  margin: 0 -1em;
  padding: 1.25em 1em 1.1em;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background-color 140ms ease;
}

.post-cell:hover,
.post-cell:focus-within {
  background: var(--hover);
}

.post-meta {
  display: flex;
  gap: .24em;
  align-items: baseline;
  margin-bottom: .45em;
  color: var(--muted);
  font-size: .82em;
}

.post-meta strong {
  color: var(--text);
  font-weight: 700;
}

.post-preview-measure,
.post-body,
.post-body h2,
.post-body h3 {
  font: inherit;
}

.post-body-shell {
  position: relative;
  overflow: hidden;
  transition: height 360ms cubic-bezier(.2, .7, .2, 1);
}

.post-preview-measure {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  margin: 0;
  visibility: hidden;
  pointer-events: none;
}

.post-body {
  padding-top: 0;
}

.post-body p {
  margin: 0 0 1em;
}

.post-body p:last-child {
  margin-bottom: 0;
}

.post-body h2,
.post-body h3 {
  margin: 1.5em 0 .75em;
  font-weight: 700;
}

.post-body pre {
  max-width: 100%;
  margin: 1.25em 0;
  padding: 1em;
  overflow: auto;
  background: #f5f5f5;
  border: 1px solid var(--line);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: .86em;
  line-height: 1.45;
}

.post-body code {
  padding: .08em .22em;
  background: #f3f3f3;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: .88em;
}

.post-body pre code {
  padding: 0;
  background: transparent;
  font-size: inherit;
}

.post-toggle {
  display: inline;
  margin: .55em 0 0;
  padding: 0;
  color: var(--link);
  background: transparent;
  border: 0;
  font: inherit;
  font-size: .82em;
  text-decoration: underline;
  cursor: pointer;
}

.post-cell.is-expanded {
  cursor: default;
}

.site-footer {
  width: var(--page);
  margin: 8em auto 3em;
  color: var(--muted);
  font-size: .9em;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 640px) {
  :root {
    --page: calc(100vw - 2em);
  }

  html {
    font-size: 12.5pt;
  }

  .site-header {
    margin-top: 1.25em;
  }

  .header-row {
    align-items: flex-start;
    gap: 1em;
  }

  .wordmark {
    font-size: 1.5em;
  }

  .site-header nav {
    gap: .75em;
    font-size: .9em;
  }

  .post-cell {
    margin-right: -.5em;
    margin-left: -.5em;
    padding-right: .5em;
    padding-left: .5em;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    transition-delay: 0ms !important;
  }
}

@media print {
  .site-header,
  .site-footer,
  .post-toggle,
  .post-preview-measure {
    display: none !important;
  }

  .post-body-shell {
    height: auto !important;
    overflow: visible;
  }

  .post-cell {
    break-inside: avoid;
  }
}
