/* Paul Graham style: off-white, Verdana, a plain list, ordinary blue links. */

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

html {
  background: #f6f5f0;
}

body {
  margin: 0;
  background: #f6f5f0;
  color: #111;
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  font-size: 13px;
  line-height: 1.45;
  color-scheme: light;
}

::selection {
  background: #d9d6c8;
  color: #111;
}

:focus-visible {
  outline: 1px solid #111;
  outline-offset: 2px;
}

a {
  color: #00e;
}

a:visited {
  color: #551a8b;
}

.skip {
  position: absolute;
  left: 0.75rem;
  top: 0.75rem;
  transform: translateY(-150%);
  z-index: 5;
  padding: 0.35rem 0.55rem;
  background: #f6f5f0;
  color: #111;
  border: 1px solid #111;
  font-size: 13px;
}

.skip:focus {
  transform: none;
}

.sheet {
  width: min(40rem, calc(100% - 2.5rem));
  margin: 0 auto 3rem;
  padding-top: 1.35rem;
}

.sheet-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
  align-items: baseline;
  margin: 0;
}

.sheet-name {
  color: #111;
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
}

.sheet-name:hover,
.sheet-name:visited,
.sheet-name[aria-current="page"] {
  color: #111;
  text-decoration: underline;
}

.sheet-nav a {
  margin-right: 0.85rem;
}

.sheet-origin {
  margin: 0.35rem 0 1.1rem;
  color: #444;
  font-size: 12px;
}

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

.index li {
  display: grid;
  grid-template-columns: 7.4rem 1fr;
  column-gap: 0.75rem;
  margin: 0.18rem 0;
}

.index time,
.essay-date {
  color: #333;
  font-size: 13px;
}

.index-label,
.sheet-title,
.page-title {
  margin: 1.35rem 0 0.45rem;
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.3;
}

.sheet-title,
.page-title {
  margin-top: 0;
}

.essay h1 {
  margin: 0 0 0.2rem;
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.3;
}

.essay-date {
  margin: 0 0 1rem;
}

.essay-date a {
  color: #333;
}

.essay-back,
.note-source,
.essay-canonical,
.more {
  margin: 1.2rem 0 0;
  font-size: 13px;
}

.lede {
  margin: 0.6rem 0 0;
  font-size: 13px;
}

.prose {
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
}

.prose p,
.prose ul,
.prose ol,
.prose pre,
.prose blockquote {
  margin: 0 0 1.05em;
}

.prose h2,
.prose h3 {
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.3;
}

.prose h2 {
  margin: 1.4rem 0 0.45rem;
  font-size: 14px;
}

.prose h3 {
  margin: 1.1rem 0 0.35rem;
  font-size: 13px;
}

.prose ul,
.prose ol {
  padding-left: 1.4rem;
}

.prose li {
  margin: 0.2rem 0;
}

.prose blockquote {
  margin-left: 0;
  padding-left: 1rem;
  border-left: 1px solid #bbb;
  font-style: normal;
}

.prose blockquote p:last-child {
  margin-bottom: 0;
}

.prose code,
.prose pre {
  font-family: ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace;
}

.prose code {
  font-size: 0.92em;
}

.prose pre {
  padding: 0.75rem 0.85rem;
  overflow-x: auto;
  border: 1px solid #ccc;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.prose pre code {
  font-size: inherit;
  white-space: inherit;
}

.prose hr {
  margin: 1.4rem 0;
  border: 0;
  border-top: 1px solid #ccc;
}

.prose table {
  width: 100%;
  margin: 0 0 1rem;
  border-collapse: collapse;
  font-size: 13px;
}

.prose th,
.prose td {
  padding: 0.3rem 0.6rem 0.3rem 0;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid #ccc;
}

.media,
.embed {
  margin: 1.2rem 0 1.4rem;
}

.media img,
.media video {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid #ccc;
}

.frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #111;
  border: 1px solid #ccc;
}

.frame iframe,
.embed-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.embed-frame {
  position: relative;
  width: 100%;
  height: 28rem;
  border: 1px solid #ccc;
}

.media figcaption,
.embed figcaption {
  margin-top: 0.35rem;
  color: #444;
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  font-size: 12px;
  font-style: normal;
  line-height: 1.4;
}

.embed-card {
  margin: 1.2rem 0 1.4rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid #ccc;
}

.embed-kicker {
  margin: 0 0 0.25rem;
  color: #444;
  font-size: 12px;
}

.embed-link {
  margin: 0;
  font-size: 14px;
}

.embed-url {
  margin: 0.25rem 0 0;
  color: #444;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.embed-error {
  margin: 1rem 0;
  padding: 0.5rem 0.6rem;
  border: 1px solid #ccc;
  color: #333;
  font-size: 13px;
}

.twitter-tweet {
  margin: 0 !important;
}

.note-plain {
  margin: 0 0 1.25rem;
}

.placeholder,
.facts dt,
.facts dd {
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  letter-spacing: 0;
  text-transform: none;
  color: #111;
}

.placeholder {
  margin-right: 0.25rem;
  font-size: 13px;
}

.facts {
  margin: 1rem 0;
  border: 0;
}

.facts div {
  display: block;
  padding: 0.12rem 0;
  border: 0;
}

.facts dt,
.facts dd {
  display: inline;
  margin: 0;
  font-size: 13px;
  font-weight: 400;
}

.facts dt::after {
  content: ": ";
}

.editor-note {
  margin-top: 1.75rem;
  color: #444;
  font-size: 12px;
  line-height: 1.45;
}

.editor-note p {
  margin: 0;
}

.editor-note code {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 12px;
}

.sheet-foot {
  margin-top: 2rem;
  font-size: 12px;
}

.sheet-foot a {
  margin-right: 0.85rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (min-width: 960px) {
  .sheet {
    margin-left: max(2rem, 10vw);
    margin-right: auto;
  }
}

@media (max-width: 520px) {
  .index li {
    grid-template-columns: 1fr;
    margin-bottom: 0.55rem;
  }

  .embed-frame {
    height: 22rem;
  }
}

@media print {
  body {
    background: #fff;
    color: #000;
  }

  .sheet-nav,
  .skip,
  .editor-note,
  .sheet-foot {
    display: none;
  }

  a {
    color: #000;
  }
}
