:root {
  color-scheme: light;
  --bg: #edf3f7;
  --surface: #f9fbfd;
  --surface-strong: #ffffff;
  --text: #1c2730;
  --heading: #121a21;
  --muted: #607080;
  --border: #d6e2ea;
  --border-strong: #bccfdb;
  --link: #215f8f;
  --link-hover: #153d5f;
  --button-bg: transparent;
  --button-text: var(--text);
  --button-border: var(--border-strong);
  --button-hover-bg: #e5eef4;
  --selection-bg: rgba(33, 95, 143, 0.18);
  --shadow: 0 18px 40px rgba(23, 44, 62, 0.06);
}

* {
  box-sizing: border-box;
}

html {
  font-size: 17px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  line-height: 1.7;
  transition: background-color 180ms ease, color 180ms ease;
}

::selection {
  background: var(--selection-bg);
}

.site-shell {
  width: min(72ch, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.5rem 0 4rem;
}

.site-header,
.site-footer {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.site-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.site-header__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  flex-wrap: wrap;
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.site-title {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.1;
}

.site-title a {
  color: inherit;
  text-decoration: none;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  margin-top: 0.9rem;
}

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

.site-nav a {
  padding-bottom: 0.1rem;
  border-bottom: 1px solid transparent;
}

.site-nav a:hover,
.site-nav a.is-current {
  border-bottom-color: currentColor;
}

.feed-link {
  color: var(--muted);
  font-size: 0.95rem;
}

a:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}

main {
  min-width: 0;
}

.page-header,
.intro,
.entry-header {
  margin-bottom: 1.75rem;
}

.page-header h1,
.entry-header h1,
.prose h1,
.item-card h2 {
  color: var(--heading);
}

.page-header h1,
.entry-header h1,
.prose h1 {
  margin: 0 0 0.65rem;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.page-header h1,
.prose h1 {
  font-size: clamp(1.9rem, 5vw, 2.8rem);
}

.entry-header h1 {
  font-size: clamp(2.1rem, 6vw, 3.25rem);
}

.lede {
  margin: 0;
  max-width: 60ch;
  font-size: 1.18rem;
  line-height: 1.65;
}

.item-list {
  display: block;
}

.item-card {
  padding: 1.2rem 0;
  border-top: 1px solid var(--border);
}

.item-list > .item-card:first-child {
  padding-top: 0;
  border-top: 0;
}

.entry {
  padding: 0;
}

.entry.page {
  padding: 0;
}

.item-card h2 {
  margin: 0.3rem 0 0.45rem;
  line-height: 1.18;
  font-size: clamp(1.4rem, 4vw, 1.85rem);
}

.summary,
.external-link,
.meta {
  margin: 0;
}

.summary {
  color: var(--text);
}

.external-link {
  margin: 0 0 0.45rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.95rem;
}

.meta {
  color: var(--muted);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.92rem;
}

.prose {
  overflow-wrap: anywhere;
}

.prose > * {
  max-width: 66ch;
}

.prose p,
.prose ul,
.prose ol,
.prose blockquote,
.prose pre,
.prose hr {
  margin: 0 0 1.15rem;
}

.prose h2,
.prose h3,
.prose h4 {
  margin: 2rem 0 0.8rem;
  line-height: 1.15;
  color: var(--heading);
}

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

.prose li + li {
  margin-top: 0.4rem;
}

a {
  color: var(--link);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--link-hover);
}

code,
pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

code {
  background: var(--surface-strong);
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
}

pre {
  padding: 1rem;
  background: var(--surface-strong);
  border-radius: 12px;
  overflow-x: auto;
  border: 1px solid var(--border);
}

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

blockquote {
  margin-left: 0;
  padding: 0.15rem 0 0.15rem 1rem;
  border-left: 3px solid var(--border-strong);
  color: var(--muted);
}

hr {
  border: 0;
  border-top: 1px solid var(--border);
}

img,
video,
iframe {
  display: block;
  max-width: 100%;
  height: auto;
}

.site-footer {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

@media (max-width: 40rem) {
  html {
    font-size: 16px;
  }

  .site-shell {
    width: min(72ch, calc(100% - 1.25rem));
    padding-top: 1rem;
  }

  .site-header {
    margin-bottom: 2rem;
  }

  .site-title {
    font-size: 1.25rem;
  }

  .site-nav {
    gap: 0.3rem 0.85rem;
  }

  .site-header__actions {
    gap: 0.55rem;
  }

  .lede {
    font-size: 1.08rem;
  }
}
