/* FELSEN Journal. An editorial index and a quiet, generous reading column. */
.page-blog,
.page-post {
  --journal-panel: #e5e4de;
  --journal-code: #e8e7e1;
  --journal-code-line: #d0d0c7;
  --journal-code-ink: #282833;
  --journal-quote: #e4e2ef;
  overflow-wrap: anywhere;
}

.page-blog .page-head { padding-bottom: 62px; }
.page-blog .page-head .page-intro > p { font-size: 16px; max-width: 470px; }
.journal-count { color: var(--muted); font: 12px/1.6 var(--mono); }
.journal-index { padding-bottom: 104px; }
.journal-entry {
  display: grid;
  grid-template-columns: 144px minmax(0, 1fr);
  column-gap: clamp(28px, 4vw, 68px);
  row-gap: 22px;
  padding: 42px 0;
  border-top: 1px solid var(--line);
  position: relative;
}
.journal-entry:last-child { border-bottom: 1px solid var(--line); }
.journal-entry:has(> .journal-thumb) {
  grid-template-columns: 144px minmax(0, 1fr) minmax(180px, 25%);
}
.entry-meta {
  grid-column: 1;
  grid-row: 1 / 3;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding-top: 8px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}
.entry-meta time { font-family: var(--mono); }
.entry-meta > :not(time) { color: var(--orange); }
.entry-heading { grid-column: 2; min-width: 0; }
.entry-heading h2 {
  max-width: 800px;
  font-size: clamp(26px, 2.5vw, 39px);
  font-weight: 550;
  letter-spacing: -.045em;
  line-height: 1.42;
  text-wrap: pretty;
}
.entry-heading h2 a { transition: color .18s; }
.entry-heading h2 a:hover { color: var(--orange); }
.entry-dek {
  max-width: 660px;
  margin-top: 20px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.9;
}
.journal-thumb {
  grid-column: 3;
  grid-row: 1 / 3;
  display: flex;
  align-items: center;
  align-self: start;
  border: 1px solid var(--line);
  overflow: hidden;
  background: var(--journal-panel);
  margin-top: 8px;
}
.journal-thumb img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 250px;
  object-fit: contain;
  background: #fff;
}
.entry-link {
  grid-column: 2;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 26px;
  min-height: 44px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.entry-link:hover { color: var(--orange); border-color: currentColor; }

/* The article is typeset independently of the compact service pages. */
.post-header { padding-top: 36px; padding-bottom: 52px; }
.post-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 15px 0 32px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}
.post-breadcrumb a { min-height: 32px; display: inline-flex; align-items: center; }
.post-breadcrumb a:hover { color: var(--orange); }
.post-header h1 {
  max-width: 1160px;
  font-size: clamp(36px, 4.7vw, 72px);
  font-weight: 550;
  letter-spacing: -.045em;
  line-height: 1.25;
  text-wrap: pretty;
}
.post-original-title {
  max-width: 950px;
  margin-top: 25px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--muted);
  word-break: normal;
}
.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 25px;
  margin-top: 27px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
}
.post-meta time { font-family: var(--mono); }
.post-source {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  margin-top: 14px;
  padding: 5px 0;
  color: var(--orange);
  font-size: 14px;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}
.post-source:hover { text-decoration-thickness: 2px; }
.post-layout {
  display: grid;
  grid-template-columns: minmax(170px, 220px) minmax(0, 820px);
  gap: clamp(38px, 6vw, 100px);
  align-items: start;
  padding-top: 35px;
  padding-bottom: 88px;
  border-top: 1px solid var(--line);
}
.post-sidebar { position: sticky; top: 32px; min-width: 0; }
.post-toc > summary {
  list-style: none;
  position: relative;
  cursor: pointer;
  padding: 13px 30px 13px 0;
  border-top: 1px solid var(--ink);
  color: var(--orange);
  font-size: 13px;
  line-height: 1.6;
}
.post-toc > summary::-webkit-details-marker { display: none; }
.post-toc > summary::after {
  content: "+";
  position: absolute;
  right: 1px;
  top: 8px;
  font-size: 22px;
  font-weight: 400;
}
.post-toc[open] > summary::after { content: "−"; }
.post-toc nav {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-height: calc(100dvh - 132px);
  overflow-y: auto;
  padding: 8px 5px 18px 0;
  scrollbar-width: thin;
}
.post-toc nav a {
  display: block;
  padding: 10px 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  border-bottom: 1px solid var(--line);
}
.post-toc nav a:hover { color: var(--orange); }
.post-toc nav a:focus-visible { outline-offset: -3px; }
.post-content {
  min-width: 0;
  max-width: 100%;
  font-size: 17px;
  line-height: 1.95;
  letter-spacing: -.015em;
}
.post-content > :first-child { margin-top: 0; }
.post-content h2,
.post-content h3,
.post-content h4 { scroll-margin-top: 32px; }
.post-content h2 {
  margin: 72px 0 27px;
  padding-top: 27px;
  border-top: 1px solid var(--line);
  font-size: clamp(26px, 2.6vw, 35px);
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: -.035em;
}
.post-content h3 {
  margin: 43px 0 19px;
  font-size: 23px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: -.03em;
}
.post-content h4 {
  margin: 33px 0 14px;
  font-size: 19px;
  font-weight: 650;
  line-height: 1.6;
}
.post-content p { margin: 0 0 24px; }
.post-content strong { font-weight: 650; }
.post-content a {
  color: var(--orange);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.post-content a:hover { text-decoration-thickness: 2px; }
.post-content ul,
.post-content ol { margin: 20px 0 30px; padding-left: 1.5em; }
.post-content li { padding-left: .15em; margin-bottom: 10px; }
.post-content li::marker { color: var(--orange); }
.post-content li > p { margin-bottom: 12px; }
.post-content li > ul,
.post-content li > ol { margin: 12px 0 16px; }
.post-content blockquote {
  margin: 32px 0;
  border-left: 2px solid var(--orange);
  padding: 19px 27px;
  background: var(--journal-quote);
  font-size: 17px;
}
.post-content blockquote > :last-child { margin-bottom: 0; }
.post-content hr { border: 0; border-top: 1px solid var(--line); margin: 50px 0; }
.post-content figure { margin: 34px 0 38px; max-width: 100%; }
.post-content figure > a { display: block; }
.post-content img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 28px auto;
  border: 1px solid var(--line);
  background: #fff;
}
.post-content figure img { margin: 0 auto; }
.post-content figcaption {
  margin-top: 12px;
  padding-left: 14px;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
  letter-spacing: 0;
}
.post-content code {
  font-family: var(--mono);
  font-size: .86em;
  letter-spacing: 0;
  word-break: break-word;
  overflow-wrap: anywhere;
  padding: 2px 5px;
  background: var(--journal-code);
  color: var(--journal-code-ink);
}
.post-content pre {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  margin: 30px 0;
  padding: 24px;
  border: 1px solid var(--journal-code-line);
  background: var(--journal-code);
  color: var(--journal-code-ink);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.75;
  letter-spacing: 0;
  tab-size: 4;
  white-space: pre;
  word-break: normal;
  overflow-wrap: normal;
  scrollbar-width: thin;
}
.post-content pre code {
  display: block;
  width: max-content;
  min-width: 100%;
  padding: 0;
  font-size: inherit;
  color: inherit;
  background: none;
  white-space: inherit;
  word-break: normal;
  overflow-wrap: normal;
}
.post-content pre:focus-visible,
.post-content table:focus-visible { outline-offset: -3px; }
.post-content table {
  display: block;
  max-width: 100%;
  width: max-content;
  overflow-x: auto;
  margin: 30px 0;
  border-collapse: collapse;
  text-align: left;
  font-size: 15px;
  line-height: 1.75;
}
.post-content th,
.post-content td { padding: 14px 17px; min-width: 110px; border: 1px solid var(--line); vertical-align: top; }
.post-content th { background: var(--journal-panel); font-weight: 650; }
.post-footer {
  margin-top: 60px;
  padding-top: 27px;
  border-top: 1px solid var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px 26px;
  font-size: 14px;
}
.post-footer .post-source { margin: 0; }
.back-blog { display: inline-flex; align-items: center; min-height: 44px; gap: 12px; }
.post-editor-note {
  margin-top: 60px;
  padding: 25px 28px;
  border-left: 2px solid var(--orange);
  background: var(--journal-panel);
  font-size: 15px;
  line-height: 1.9;
}
.post-editor-note > strong { display: block; margin-bottom: 14px; }
.post-editor-note > :last-child { margin-bottom: 0; }
.article-table-wrap,
.table-scroll { min-width: 0; max-width: 100%; }
.desktop-nav a[aria-current="true"],
#mobile-nav a[aria-current="true"] { color: var(--orange); }
.post-related { padding-top: 30px; padding-bottom: 70px; border-top: 1px solid var(--line); }
.post-related h2 { font-size: 25px; line-height: 1.45; }
.post-related a { display: inline-block; padding: 14px 0; font-size: 17px; }
.post-related a:hover { color: var(--orange); }

@media screen and (prefers-color-scheme: dark) {
  .page-blog,
  .page-post {
    --journal-panel: #282932;
    --journal-code: #202127;
    --journal-code-line: #41424e;
    --journal-code-ink: #e5e4ef;
    --journal-quote: #272633;
  }
}

@media screen and (max-width: 1050px) {
  .journal-entry,
  .journal-entry:has(> .journal-thumb) { grid-template-columns: minmax(0, 1fr) minmax(160px, 29%); gap: 20px 34px; }
  .entry-meta { grid-column: 1 / -1; grid-row: 1; flex-direction: row; flex-wrap: wrap; gap: 12px 24px; padding-top: 0; }
  .entry-heading { grid-column: 1; grid-row: 2; }
  .journal-entry:not(:has(> .journal-thumb)) .entry-heading { grid-column: 1 / -1; }
  .journal-thumb { grid-column: 2; grid-row: 2 / 4; margin-top: 4px; }
  .entry-link { grid-column: 1; grid-row: 3; }
  .post-layout { grid-template-columns: minmax(0, 820px); gap: 28px; justify-content: center; padding-top: 24px; }
  .post-sidebar { position: static; }
  .post-toc { border-bottom: 1px solid var(--line); }
  .post-toc > summary { border-top: 0; min-height: 48px; }
  .post-toc nav { max-height: none; padding-bottom: 20px; }
  .post-toc nav a { min-height: 44px; font-size: 14px; }
  .post-header { padding-bottom: 38px; }
}

@media screen and (max-width: 620px) {
  .page-blog .page-head { padding-bottom: 36px; }
  .page-blog .page-head .page-intro > p { font-size: 15px; }
  .page-blog .page-head .page-eyebrow { font-size: 10px; }
  .journal-index { padding-bottom: 52px; }
  .journal-entry,
  .journal-entry:has(> .journal-thumb) { grid-template-columns: minmax(0, 1fr); row-gap: 20px; padding: 28px 0 33px; }
  .entry-meta { grid-column: 1; font-size: 11px; gap: 12px 20px; }
  .entry-heading { grid-column: 1; grid-row: 2; }
  .entry-heading h2 { font-size: 27px; letter-spacing: -.035em; line-height: 1.45; }
  .entry-dek { margin-top: 16px; font-size: 15px; line-height: 1.85; }
  .journal-thumb { grid-column: 1; grid-row: 3; margin-top: 0; max-width: 100%; }
  .journal-thumb img { max-height: 240px; }
  .entry-link { grid-column: 1; grid-row: 4; }
  .journal-entry:not(:has(> .journal-thumb)) .entry-link { grid-row: 3; }
  .post-header { padding-top: 20px; padding-bottom: 30px; }
  .post-breadcrumb { padding-top: 10px; padding-bottom: 22px; font-size: 12px; }
  .post-header h1 { font-size: clamp(31px, 7.8vw, 44px); line-height: 1.32; letter-spacing: -.04em; }
  .post-original-title { font-size: 14px; line-height: 1.75; margin-top: 19px; }
  .post-meta { font-size: 12px; gap: 8px 18px; margin-top: 22px; }
  .post-source { font-size: 13px; margin-top: 12px; }
  .post-layout { padding-top: 15px; padding-bottom: 52px; gap: 25px; }
  .post-content { font-size: 16px; line-height: 1.92; }
  .post-content h2 { font-size: 26px; margin-top: 52px; padding-top: 23px; margin-bottom: 22px; }
  .post-content h3 { font-size: 21px; margin-top: 34px; margin-bottom: 17px; }
  .post-content h4 { font-size: 18px; }
  .post-content p { margin-bottom: 22px; }
  .post-content pre { font-size: 12px; padding: 17px 15px; margin: 25px 0; }
  .post-content blockquote { font-size: 16px; padding: 16px 18px; }
  .post-editor-note { padding: 18px; }
  .post-content figure { margin: 27px 0 31px; }
  .post-content figcaption { font-size: 12px; padding-left: 10px; }
  .post-content table { font-size: 14px; }
  .post-content th,
  .post-content td { padding: 11px 13px; }
  .post-footer { margin-top: 40px; padding-top: 20px; align-items: flex-start; gap: 9px 24px; }
  .post-related { padding-bottom: 45px; }
}

@media (prefers-reduced-motion: reduce) {
  .entry-heading h2 a { transition: none; }
}

@media print {
  .page-blog,
  .page-post { --paper: #fff; --ink: #111; --muted: #555; --line: #bbb; --orange: #222; --journal-panel: #f1f1f1; --journal-code: #f3f3f3; --journal-code-line: #ccc; --journal-code-ink: #111; --journal-quote: #f3f3f3; }
  .post-sidebar,
  .post-breadcrumb,
  .post-related,
  .back-blog { display: none; }
  .post-layout { display: block; padding: 20px 0; border-top: 1px solid #bbb; }
  .post-header { padding: 10px 0 20px; }
  .post-header h1 { font-size: 30pt; }
  .post-content { font-size: 11pt; line-height: 1.7; }
  .post-content h2 { margin-top: 28px; font-size: 19pt; }
  .post-content h3 { font-size: 15pt; }
  .post-content h2,
  .post-content h3,
  .post-content h4 { break-after: avoid; }
  .post-content figure { break-inside: avoid; }
  .post-content pre { white-space: pre-wrap; overflow-wrap: anywhere; }
  .post-content pre code { width: auto; overflow-wrap: anywhere; }
  .post-content table { display: table; width: 100%; font-size: 9pt; }
  .post-source::after { content: " (" attr(href) ")"; font-size: 9pt; }
}
