@font-face {
  font-family: 'Fredoka';
  src: url('/fonts/fredoka-latin-700.ttf') format('truetype');
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  --site-bg: #f4ebdd;
  --site-panel: #fff9ee;
  --site-panel-alt: #f6ead8;
  --site-ink: #3b3a35;
  --site-muted: #5a5045;
  --site-faint: #8a7666;
  --site-accent: #9a5138;
  --site-seam: #dccbb4;
  --site-radius: 18px;
  --site-font:
    'Nunito', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;
  --site-display: 'Fredoka', 'Avenir Next', ui-rounded, system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--site-bg);
  color: var(--site-ink);
  font-family: var(--site-font);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  background:
    radial-gradient(90% 50% at 10% -10%, rgb(255 249 238 / 0.8), transparent 60%),
    radial-gradient(70% 45% at 100% 105%, rgb(232 179 156 / 0.22), transparent 60%), var(--site-bg);
  color: var(--site-ink);
  line-height: 1.75;
}

a {
  color: var(--site-accent);
  text-underline-offset: 0.18em;
}

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

.site-main {
  width: min(100% - 32px, 760px);
  margin: 0 auto;
  padding: 28px 0 64px;
}

.site-crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-bottom: 34px;
  color: var(--site-muted);
  font-size: 13px;
  font-weight: 700;
}

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

.site-crumbs a:hover {
  color: var(--site-accent);
}

.crumb-sep {
  color: var(--site-seam);
}

.site-header {
  margin-bottom: 30px;
  padding-bottom: 22px;
  border-bottom: 1px dashed color-mix(in srgb, var(--site-seam) 82%, transparent);
}

.site-header h1 {
  margin: 0;
  font-family: var(--site-display);
  font-size: clamp(34px, 6vw, 52px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
}

.site-header--long h1 {
  font-size: clamp(30px, 4.2vw, 44px);
  line-height: 1.16;
}

.site-lede {
  max-width: 58ch;
  margin: 12px 0 0;
  color: var(--site-muted);
  font-size: 16px;
  line-height: 1.7;
}

.site-meta {
  margin: 14px 0 0;
  color: var(--site-faint);
  font-size: 12px;
  font-weight: 700;
}

.prose {
  font-size: 16px;
  line-height: 1.85;
}

.prose h2 {
  margin: 2.1em 0 0.7em;
  font-family: var(--site-display);
  font-size: 28px;
  line-height: 1.2;
}

.prose h3 {
  margin: 1.7em 0 0.5em;
  font-size: 19px;
  line-height: 1.35;
}

.prose p {
  margin: 0 0 1.1em;
}

.prose ul,
.prose ol {
  margin: 0 0 1.2em;
  padding-left: 1.35em;
}

.prose li {
  margin: 0.35em 0;
}

.prose code {
  padding: 0.12em 0.35em;
  border-radius: 5px;
  background: color-mix(in srgb, var(--site-seam) 40%, transparent);
  font-size: 0.9em;
}

.prose pre {
  overflow-x: auto;
  padding: 14px;
  border: 1px solid var(--site-seam);
  border-radius: 10px;
  background: var(--site-panel-alt);
}

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

.prose hr {
  margin: 2em 0;
  border: 0;
  border-top: 1px dashed var(--site-seam);
}

.prose table {
  width: 100%;
  margin: 1.3em 0 1.8em;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.55;
}

.prose th,
.prose td {
  padding: 10px 12px;
  border-bottom: 1px dashed var(--site-seam);
  text-align: left;
  vertical-align: top;
}

.prose th {
  color: var(--site-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

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

.prose blockquote {
  margin: 1.5em 0;
  padding: 12px 18px;
  border-left: 3px solid var(--site-accent);
  border-radius: 0 8px 8px 0;
  background: color-mix(in srgb, var(--site-panel-alt) 64%, transparent);
  color: var(--site-muted);
  font-size: 17px;
  line-height: 1.7;
}

.index-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.index-card {
  display: grid;
  gap: 4px;
  padding: 18px 20px;
  border: 1px solid color-mix(in srgb, var(--site-seam) 80%, transparent);
  border-radius: var(--site-radius);
  background: color-mix(in srgb, var(--site-panel) 86%, transparent);
  color: var(--site-ink);
  text-decoration: none;
  box-shadow: 0 12px 28px -24px rgb(80 60 40 / 0.5);
}

.index-card:hover {
  border-color: color-mix(in srgb, var(--site-accent) 42%, var(--site-seam));
  color: var(--site-ink);
}

.index-card strong {
  font-family: var(--site-display);
  font-size: 21px;
  line-height: 1.2;
}

.index-card > span:last-child {
  color: var(--site-muted);
  font-size: 13px;
  line-height: 1.6;
}

.index-card__category {
  color: var(--site-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.site-related {
  margin-top: 40px;
  padding: 18px 20px;
  border: 1px dashed color-mix(in srgb, var(--site-seam) 88%, transparent);
  border-radius: var(--site-radius);
  background: color-mix(in srgb, var(--site-panel-alt) 46%, transparent);
}

.site-related h2 {
  margin: 0 0 8px;
  font-size: 15px;
}

.site-related ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-back {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 34px;
  font-size: 13px;
  font-weight: 700;
}

.site-back a {
  text-decoration: none;
}

.site-back__sep {
  color: var(--site-seam);
}

@media (max-width: 560px) {
  .site-main {
    width: min(100% - 28px, 760px);
    padding-top: 20px;
  }

  .site-crumbs {
    margin-bottom: 26px;
  }

  .prose {
    font-size: 15px;
  }

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