:root {
  color-scheme: light;
  --paper: #fbfaf7;
  --surface: #ffffff;
  --ink: #171717;
  --text: #333333;
  --muted: #6f6f6f;
  --line: #dedbd2;
  --tint: #f1efe8;
  --accent: #9c3f2f;
  --measure: 760px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: ui-serif, Georgia, "Times New Roman", "Noto Serif SC", "Songti SC", serif;
  font-size: 18px;
  line-height: 1.86;
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--ink);
  text-decoration-color: rgba(156, 63, 47, .45);
  text-decoration-thickness: .08em;
  text-underline-offset: .18em;
}

a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

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

.skip {
  position: absolute;
  left: -999px;
  top: 10px;
  z-index: 20;
  padding: 7px 10px;
  color: #fff;
  background: var(--ink);
}

.skip:focus {
  left: 10px;
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.header-inner,
.reader-shell {
  width: min(100% - 36px, var(--measure));
  margin-inline: auto;
}

.header-inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 22px;
  padding-block: 18px;
}

.brand {
  min-width: 0;
  color: var(--ink);
  text-decoration: none;
}

.brand-copy strong,
.brand-copy small {
  display: block;
}

.brand-copy strong {
  font-size: 18px;
  line-height: 1.2;
}

.brand-copy small {
  max-width: 410px;
  overflow: hidden;
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 16px;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--ink);
}

.page-title,
.article-header {
  padding-block: 46px 24px;
  border-bottom: 1px solid var(--line);
}

.page-title.compact {
  padding-block: 34px 20px;
}

.kicker {
  margin: 0 0 10px;
  color: var(--accent);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.4;
}

h1,
h2,
h3 {
  color: var(--ink);
  line-height: 1.32;
  letter-spacing: 0;
}

h1 {
  max-width: 720px;
  margin: 0;
  font-size: 38px;
  font-weight: 720;
}

.page-title p:not(.kicker),
.article-header p:not(.kicker) {
  max-width: 680px;
  margin: 16px 0 0;
  color: var(--text);
  font-size: 19px;
  line-height: 1.78;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 26px;
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
}

.breadcrumbs a {
  color: var(--muted);
  text-decoration: none;
}

.reader-article {
  padding-bottom: 42px;
}

.prose,
.content,
.imported-page {
  max-width: var(--measure);
}

.prose {
  padding-top: 28px;
}

.prose > *:first-child,
.content > *:first-child {
  margin-top: 0;
}

.prose > * + *,
.content > * + * {
  margin-top: 1.12rem;
}

.prose p,
.prose li,
.prose td,
.content p,
.content li,
.content td {
  color: var(--text);
}

.prose h2,
.content h2 {
  margin: 2.45rem 0 0;
  padding-top: .25rem;
  border-top: 1px solid var(--line);
  font-size: 27px;
  font-weight: 720;
}

.prose h3,
.content h3 {
  margin: 1.9rem 0 0;
  font-size: 21px;
  font-weight: 700;
}

.prose p,
.content p {
  margin-bottom: 0;
}

.lede {
  color: var(--ink);
  font-size: 20px;
  line-height: 1.82;
}

.home-prose {
  padding-top: 24px;
}

.note,
.editor-note {
  margin: 1.35rem 0;
  padding: 13px 15px;
  color: #2c2924;
  background: var(--tint);
  border-left: 3px solid var(--accent);
  font-size: 16px;
  line-height: 1.72;
}

.step-list {
  display: grid;
  gap: 0;
  padding-left: 0 !important;
  list-style: none;
}

.step-list li {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.step-list li:last-child {
  border-bottom: 1px solid var(--line);
}

.step-list strong {
  display: block;
  color: var(--ink);
  line-height: 1.45;
}

.step-list p {
  margin-top: 5px;
  color: var(--muted);
}

.sources {
  margin-top: 2.6rem;
  padding-top: 1.1rem;
  border-top: 2px solid var(--ink);
}

.sources h2 {
  margin-top: 0;
  border-top: 0;
}

.link-list {
  padding-left: 0 !important;
  list-style: none;
}

.link-list li {
  padding: 9px 0;
  border-top: 1px solid var(--line);
}

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

.prose li + li,
.content li + li {
  margin-top: .42rem;
}

.prose code,
.content code {
  padding: .08em .3em;
  color: #5d2820;
  background: var(--tint);
  border-radius: 4px;
  font-size: .92em;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  margin-block: 1.3rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.58;
}

th,
td {
  padding: 12px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--ink);
  background: var(--tint);
  font-weight: 700;
}

tr:last-child td {
  border-bottom: 0;
}

.button,
.button.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  margin-top: .8rem;
  padding: 8px 12px;
  color: #fff;
  background: var(--ink);
  border-radius: 3px;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}

.search-box {
  display: grid;
  gap: 8px;
  margin-top: 24px;
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  font-weight: 700;
}

.search-box input {
  width: 100%;
  min-height: 46px;
  padding: 9px 12px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 3px;
  font: inherit;
}

.article-list {
  display: grid;
  gap: 0;
  padding: 34px 0 22px;
}

.article-list + .article-list {
  padding-top: 12px;
}

.article-list.featured {
  margin-top: 14px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.article-list h2 {
  margin: 0 0 8px;
  font-size: 25px;
}

.article-row {
  padding: 17px 0;
  border-top: 1px solid var(--line);
}

.article-row:last-child {
  border-bottom: 1px solid var(--line);
}

.article-row time {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
}

.article-row h3 {
  margin: 0;
  font-size: 21px;
  font-weight: 700;
}

.article-row a {
  text-decoration: none;
}

.article-row p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

.article-row[hidden] {
  display: none;
}

.site-footer {
  margin-top: 28px;
  padding-block: 28px 38px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: grid;
  gap: 12px;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
}

.footer-inner p {
  margin: 0;
}

.footer-inner nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-inner a {
  color: var(--muted);
}

@media (max-width: 720px) {
  body {
    font-size: 17px;
  }

  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .site-nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .brand-copy small {
    max-width: calc(100vw - 36px);
  }

  .page-title,
  .article-header {
    padding-block: 34px 20px;
  }

  h1 {
    font-size: 31px;
  }

  .page-title p:not(.kicker),
  .article-header p:not(.kicker) {
    font-size: 17px;
  }

  .prose h2,
  .content h2 {
    font-size: 24px;
  }
}
