* {
  box-sizing: border-box;
}

:root {
  --paper: #ffffff;
  --ink: #11110f;
  --muted: #777168;
  --rule: #ece8df;
  --accent: #254f3b;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: "Courier Prime", "Courier New", Courier, monospace;
  font-size: 17px;
  line-height: 1.55;
  overflow-wrap: anywhere;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover,
a:focus-visible {
  color: var(--accent);
  text-decoration: underline dotted;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

.is-current {
  text-decoration: underline dashed;
  text-decoration-color: color-mix(in srgb, var(--ink) 35%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.24em;
}

a:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 4px;
}

button {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

p,
h1,
h2,
h3,
pre {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-size: inherit;
  font-weight: 400;
  line-height: 1.3;
}

h1,
h2 {
  max-width: 20ch;
  margin-bottom: 1.1rem;
  font-size: clamp(2rem, 6vw, 4.6rem);
  letter-spacing: 0;
}

h3 {
  margin-bottom: 0.75rem;
}

.article-title {
  max-width: 34ch;
  margin-bottom: 1.25rem;
  font-size: clamp(1.25rem, 3vw, 1.8rem);
  line-height: 1.35;
}

p {
  max-width: 100%;
}

ul {
  display: grid;
  gap: 0.4rem;
  margin: 0;
  padding-left: 1.2rem;
}

.simple-list {
  display: grid;
  gap: 0.45rem;
  margin: -0.2rem 0 1.6rem;
  padding: 0;
  list-style: none;
}

.simple-list li {
  position: relative;
  padding-left: 1.25rem;
}

.simple-list li::before {
  content: "·";
  position: absolute;
  left: 0;
  color: var(--muted);
}

.thought-list {
  display: grid;
  gap: 0.85rem;
  margin: 1.3rem 0 0;
  padding: 0;
  list-style: none;
  width: 100%;
}

.thought-list li {
  display: grid;
  grid-template-columns: 9.5ch minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  padding-top: 0.85rem;
  border-top: 1px solid var(--rule);
}

.thought-list li[hidden] {
  display: none;
}

.thought-list time {
  color: var(--muted);
  font-size: 0.88rem;
}

.thought-meta {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.thought-list a {
  min-width: 0;
}

.tag-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.7rem;
  margin-top: 0;
  padding-top: 0;
}

.tag-filter button {
  padding: 0.08rem 0.28rem 0.12rem;
  color: color-mix(in srgb, var(--ink) 72%, var(--muted));
  font-size: 0.86rem;
}

.tag-filter button:hover,
.tag-filter button:focus-visible {
  color: var(--accent);
}

.tag-filter .is-current {
  background: #f7f5ef;
  text-decoration: none;
}

@media (max-width: 760px) {
  .thought-list li {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .thought-list span {
    text-align: left;
  }
}

.page {
  width: 100%;
  min-height: 100svh;
  padding: clamp(20px, 5vw, 56px);
}

.root-block {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  min-width: 0;
}

.site-header {
  display: grid;
  grid-template-columns: minmax(14ch, 1fr) minmax(0, auto);
  gap: 0.75rem 2rem;
  align-items: baseline;
  padding-bottom: 1rem;
  border-bottom: 1px solid color-mix(in srgb, var(--rule) 72%, var(--ink));
}

.site-name {
  max-width: 16ch;
  line-height: 1.25;
  color: color-mix(in srgb, var(--ink) 92%, var(--accent));
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.05rem;
  justify-content: flex-end;
  min-width: 0;
  max-width: 38ch;
  color: color-mix(in srgb, var(--ink) 88%, var(--muted));
}

.content-block {
  min-height: min(58svh, 540px);
  padding-top: clamp(0.9rem, 2.2vw, 1.6rem);
  min-width: 0;
  overflow-wrap: break-word;
  hyphens: auto;
  -webkit-hyphens: auto;
}

.panel {
  min-width: 0;
}

.prose-panel {
  padding-top: clamp(0.3rem, 1.2vw, 0.8rem);
  max-width: 58ch;
}

.prose-panel[data-panel="about"],
.prose-panel[data-panel="thoughts"] {
  max-width: 100%;
}

.article-block .prose-panel {
  max-width: 100%;
}

.panel-index {
  margin-bottom: 1.4rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.lead {
  margin-bottom: 1.7rem;
  padding-left: 1rem;
  border-left: 1px solid var(--rule);
}

.kicker {
  margin-bottom: 1.4rem;
  color: var(--muted);
}

.draft-note {
  margin-bottom: 1.3rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.panel {
  display: none;
}

.panel.is-active {
  display: block;
}

.landing-image {
  margin: 0;
}

.landing-image img,
.image-placeholder {
  display: block;
  width: 100%;
  min-height: min(54svh, 460px);
  max-height: 520px;
  object-fit: cover;
}

.image-placeholder {
  display: grid;
  place-items: center;
  border: 1px solid var(--rule);
  color: var(--muted);
  background:
    linear-gradient(135deg, transparent 49.5%, var(--rule) 50%, transparent 50.5%),
    linear-gradient(45deg, transparent 49.5%, var(--rule) 50%, transparent 50.5%);
}

.landing-image figcaption {
  margin-top: 0.55rem;
  color: var(--muted);
  font-size: 0.9rem;
  text-transform: lowercase;
}

.sub-block {
  max-width: 680px;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
}

.sub-block > :last-child,
.panel > :last-child {
  margin-bottom: 0;
}

.link-list {
  display: grid;
  gap: 0.5rem;
  width: fit-content;
}

.link-list a::before {
  content: "— ";
  color: var(--muted);
}

.link-list.compact {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}

.about-links {
  margin-top: 1.6rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.about-links a {
  color: var(--ink);
}

.article-block mjx-container[jax="SVG"][display="true"] {
  margin: 1.4rem 0;
  overflow-x: auto;
  overflow-y: hidden;
}

.article-figure {
  margin: 1.7rem 0;
}

.article-figure img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.article-figure figcaption {
  margin-top: 0.55rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.article-facts {
  margin: 0.2rem 0 1.7rem;
}

.article-table-wrap {
  width: 100%;
  margin: 1.6rem 0 1.9rem;
  overflow-x: auto;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.article-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  line-height: 1.45;
}

.article-table th,
.article-table td {
  padding: 0.58rem 0.7rem 0.58rem 0;
  text-align: left;
  vertical-align: top;
}

.article-table th {
  color: var(--muted);
  font-weight: 400;
}

.article-table tr + tr td {
  border-top: 1px solid color-mix(in srgb, var(--rule) 68%, transparent);
}

.article-table th:last-child,
.article-table td:last-child {
  padding-right: 0;
}

pre {
  width: 100%;
  margin: 1.6rem 0;
  padding: 1rem 0 1rem 1rem;
  overflow-x: visible;
  border: 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: transparent;
  white-space: pre-wrap;
  hyphens: none;
  -webkit-hyphens: none;
}

code {
  font-family: inherit;
  font-size: 0.78rem;
  line-height: 1.62;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  hyphens: none;
  -webkit-hyphens: none;
}

pre code.hljs {
  padding: 0;
  background: transparent;
}

@media (max-width: 680px) {
  body {
    font-size: 16px;
  }

  .site-header {
    grid-template-columns: 1fr;
  }

  .site-name {
    display: inline-block;
    margin-bottom: 0.7rem;
    max-width: none;
  }

  .nav {
    justify-content: flex-start;
  }

  .content-block {
    min-height: 68vh;
  }
}

@media (max-width: 900px) {
  .site-header {
    grid-template-columns: 1fr;
  }

  .site-name {
    max-width: none;
  }

  .nav {
    justify-content: flex-start;
    max-width: none;
  }
}

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