:root {
  color-scheme: light;
  --bg: #FFFFFF;
  --ink: #1C1C1E;
  --muted: #62666E;
  --accent: #007A35;
  --surface: #F4F5F7;
  --surface-hover: #E9EBEE;
  --raised: #FFFFFF;
  --border: #DCE0E4;
  --border-hover: #C3C8CE;
  --ring: rgba(0, 122, 53, .2);
  --shadow: 0 12px 32px rgba(28, 28, 30, .12);
  --card-shadow: 0 8px 24px rgba(28, 28, 30, .06);
  --header-line: var(--border);
  --header-soft: var(--surface);
  --header-accent: var(--accent);
  --header-panel: var(--raised);
  --font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --gutter: 24px;
}

.dark {
  color-scheme: dark;
  --bg: #121214;
  --ink: #FFFFFF;
  --muted: #8E8E93;
  --accent: #55E58A;
  --surface: #232328;
  --surface-hover: #2D2D33;
  --raised: #1A1A1E;
  --border: #36363D;
  --border-hover: #4A4A53;
  --ring: rgba(85, 229, 138, .25);
  --shadow: 0 12px 32px rgba(0, 0, 0, .5);
  --card-shadow: 0 8px 24px rgba(0, 0, 0, .35);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

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

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  font-kerning: none;
  font-variant-ligatures: none;
  font-optical-sizing: none;
}

h1,
h2,
h3,
p,
ul,
ol,
figure,
blockquote,
pre {
  margin: 0;
}

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

button,
input {
  margin: 0;
  font: inherit;
  color: inherit;
}

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

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

.icon {
  display: block;
  flex: none;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.main,
.site-footer {
  width: 100%;
  max-width: calc(980px + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.main {
  flex: 1 0 auto;
}

.blog-intro {
  padding-top: 36px;
  text-align: center;
}

.blog-title {
  font-size: 40px;
  line-height: 48px;
  font-weight: 600;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.blog-lead {
  margin-top: 11px;
  color: var(--muted);
  font-size: 14px;
  line-height: 21px;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.blog-controls {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 46px;
}

.blog-tabs {
  display: flex;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  padding: 3px;
  list-style: none;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--surface);
  overflow-x: auto;
  scroll-padding-inline: 3px;
  scrollbar-width: none;
}

.blog-tabs::-webkit-scrollbar {
  display: none;
}

.blog-tabs > li {
  display: flex;
  flex: none;
}

.blog-tab {
  flex: 1 0 auto;
  min-width: 94px;
  padding: 0 25px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 13px;
  line-height: 44px;
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
  transition: color .15s;
}

.blog-tab:hover {
  color: var(--ink);
}

.blog-tab:focus-visible {
  outline-offset: -2px;
}

.blog-tab[aria-current] {
  background: var(--raised);
  color: var(--accent);
  font-weight: 600;
  scroll-initial-target: nearest;
}

.tab-count {
  color: var(--muted);
}

.blog-tab[aria-current] .tab-count {
  color: inherit;
}

.tab-short {
  display: none;
}

.blog-search {
  position: relative;
  flex: 0 0 308px;
  margin-left: auto;
}

.blog-search-icon {
  position: absolute;
  top: calc(50% - 9px);
  left: 16px;
  width: 16px;
  height: 16px;
  color: var(--muted);
  pointer-events: none;
}

.blog-search-input {
  display: block;
  width: 100%;
  height: 52px;
  padding: 0 16px 3px 41px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 20px;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color .15s, box-shadow .15s;
}

.blog-search-input::placeholder {
  color: var(--muted);
  opacity: 1;
}

.blog-search-input::-webkit-search-decoration,
.blog-search-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

.blog-search-input:hover {
  border-color: var(--border-hover);
}

.blog-search-input:focus-visible {
  outline: 2px solid transparent;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--ring);
}

.blog-results {
  padding: 38px 0 44px;
  transition: opacity .2s;
}

.blog-results[aria-busy="true"] {
  opacity: .6;
}

.blog-results > :first-child {
  margin-top: 0;
}

.blog-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 16px;
  min-height: 28px;
}

.blog-heading {
  min-width: 0;
  font-size: 20px;
  line-height: 28px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.blog-count {
  min-width: 0;
  margin-left: auto;
  padding-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 16px;
  overflow-wrap: anywhere;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
  padding: 0;
  list-style: none;
}

.blog-grid > li {
  display: flex;
  min-width: 0;
}

.card {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  min-height: 240px;
  padding: 19px 19px 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg);
  transition: border-color .15s, box-shadow .15s;
}

.card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--card-shadow);
}

.card-category {
  color: var(--accent);
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.card-title {
  margin-top: 14px;
  font-size: 18px;
  line-height: 25px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.card-link::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 16px;
}

.card-link:focus-visible {
  outline: none;
}

.card-link:focus-visible::after {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.card-excerpt {
  margin-top: 11px;
  color: var(--muted);
  font-size: 14px;
  line-height: 21px;
  overflow-wrap: anywhere;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 16px;
  color: var(--muted);
  font-size: 12px;
  line-height: 16px;
}

.card-footer > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.card-arrow {
  margin-left: auto;
  color: var(--ink);
  transition: transform .2s;
}

.card:hover .card-arrow {
  transform: translateX(3px);
}

.blog-note {
  margin-top: 28px;
  color: var(--muted);
  font-size: 12px;
  line-height: 16px;
  text-align: center;
}

.blog-more,
.support-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 186px;
  min-height: 52px;
  padding: 8px 24px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--raised);
  color: var(--ink);
  font-size: 14px;
  line-height: 16px;
  font-weight: 600;
  text-align: center;
  overflow-wrap: anywhere;
  transition: border-color .15s, box-shadow .15s;
}

.blog-more:hover,
a.support-button:hover {
  border-color: var(--border-hover);
  box-shadow: var(--card-shadow);
}

.blog-more {
  width: fit-content;
  max-width: 100%;
  margin: 28px auto 0;
}

.blog-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 16px;
  padding: 56px 24px;
  border: 1px solid var(--border);
  border-radius: 16px;
  text-align: center;
}

.blog-empty-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
}

.blog-empty-icon .icon {
  stroke-width: 1.1;
}

.blog-empty-title {
  margin-top: 20px;
  font-size: 18px;
  line-height: 25px;
  font-weight: 600;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.blog-empty-text {
  max-width: 420px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 21px;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.support {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 16px 24px;
  padding: 15px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: var(--surface);
}

.support-copy {
  flex: 1 1 240px;
  min-width: 0;
  margin-top: -1px;
}

.support-title {
  font-size: 14px;
  line-height: 18px;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.support-text {
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 16px;
  overflow-wrap: anywhere;
}

.support-button {
  flex: 0 1 auto;
  max-width: 100%;
  margin-left: auto;
  padding-inline: 21px 27px;
}

.support-button .icon {
  margin-top: -2px;
}

.footer-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 24px;
  padding: 30px 0 28px;
  color: var(--muted);
  font-size: 12px;
  line-height: 16px;
}

.footer-copy {
  overflow-wrap: anywhere;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  margin-left: auto;
  padding: 0;
  list-style: none;
}

.footer-links > li + li::before {
  content: "·";
  content: "·" / "";
  padding: 0 .55em;
}

.footer-link {
  display: inline-block;
  margin: -12px -2px;
  padding: 12px 2px;
  border-radius: 8px;
  overflow-wrap: anywhere;
}

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

.reading {
  max-width: 720px;
  margin: 0 auto;
  padding-top: 36px;
}

.article {
  padding-bottom: 56px;
}

.article-back {
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  min-height: 40px;
  margin: 0 -2px -4px;
  padding: 0 2px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  transition: color .15s;
}

.article-back:hover {
  color: var(--ink);
}

.article-back > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 24px;
  color: var(--muted);
  font-size: 13px;
  line-height: 18px;
  font-weight: 500;
}

.article-meta:first-child {
  margin-top: 0;
}

.article-category {
  margin: -11px -2px;
  padding: 11px 2px;
  border-radius: 8px;
  color: var(--accent);
  overflow-wrap: anywhere;
}

.article-category:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-time {
  min-width: 0;
  overflow-wrap: anywhere;
}

.article-time::before {
  content: "·";
  content: "·" / "";
  padding: 0 .55em;
}

.article-title {
  margin-top: 12px;
  font-size: 40px;
  line-height: 1.2;
  font-weight: 600;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.article-lead {
  margin-top: 16px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.article-cover {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 32px;
  border-radius: 16px;
  background: var(--surface);
}

.prose {
  margin-top: 40px;
  font-size: 17px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.prose > * + * {
  margin-top: 20px;
}

.prose > :is(h2, h3) + * {
  margin-top: 12px;
}

.prose > :is(figure, pre, table, blockquote, iframe),
.prose > :is(figure, pre, table, blockquote, iframe) + * {
  margin-top: 28px;
}

.prose > h2 {
  margin-top: 48px;
}

.prose > h3 {
  margin-top: 36px;
}

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

.prose h2 {
  font-size: 24px;
  line-height: 1.3;
  font-weight: 600;
}

.prose h3 {
  font-size: 20px;
  line-height: 1.35;
  font-weight: 600;
}

.prose strong {
  font-weight: 600;
}

.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.prose a:hover {
  text-decoration-thickness: 2px;
}

.prose ul,
.prose ol {
  padding-left: 1.5em;
}

.prose li + li {
  margin-top: 8px;
}

.prose li::marker {
  color: var(--accent);
}

.prose ol > li::marker {
  font-weight: 600;
}

.prose li > * + * {
  margin-top: 8px;
}

.prose blockquote {
  padding: 16px 20px;
  border-left: 3px solid var(--accent);
  border-radius: 0 12px 12px 0;
  background: var(--surface);
}

.prose blockquote > * + * {
  margin-top: 12px;
}

.prose code {
  padding: .15em .4em;
  border-radius: 6px;
  background: var(--surface);
  font-family: var(--mono);
  font-size: .88em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.prose pre {
  padding: 16px 20px;
  border-radius: 12px;
  background: var(--surface);
  font-size: 14px;
  line-height: 1.6;
  overflow-x: auto;
  overflow-wrap: normal;
}

.prose pre code {
  padding: 0;
  border-radius: 0;
  background: none;
  font-size: inherit;
  white-space: pre;
}

.prose table {
  display: block;
  width: fit-content;
  max-width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.5;
  overflow-x: auto;
  overflow-wrap: normal;
}

.prose table:has(> :only-child) {
  width: auto;
}

.prose table > :only-child {
  display: table;
  width: 100%;
}

.prose :is(th, td) {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.prose table > :first-child > tr:first-child > * {
  border-top: 0;
}

.prose tr > :first-child {
  border-left: 0;
}

.prose th {
  background: var(--surface);
  font-weight: 600;
}

.prose img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}

.prose figure img {
  margin: 0 auto;
}

.prose figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

.prose iframe {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 12px;
  background: var(--surface);
}

@media (max-width: 1023px) {
  .blog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 899px) {
  .blog-controls {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .blog-search {
    flex: none;
    align-self: stretch;
    order: -1;
    margin-left: 0;
  }
}

@media (min-width: 600px) {
  .blog-lead br {
    display: none;
  }
}

@media (max-width: 599px) {
  :root {
    --gutter: 16px;
  }

  .blog-intro {
    padding-top: 32px;
  }

  .blog-title {
    font-size: 32px;
    line-height: 40px;
  }

  .blog-lead {
    margin-top: 7px;
  }

  .blog-controls {
    margin-top: 19px;
  }

  .blog-search-input {
    height: 48px;
  }

  .blog-tabs {
    align-self: stretch;
  }

  .blog-tabs > li {
    flex: 1 0 auto;
  }

  .blog-tab {
    min-width: 0;
    padding: 0 10px;
    font-size: 12px;
    line-height: 40px;
  }

  .tab-full {
    display: none;
  }

  .tab-short {
    display: inline;
  }

  .blog-results {
    padding-top: 30px;
  }

  .blog-grid {
    grid-template-columns: minmax(0, 1fr);
    margin-top: 18px;
  }

  .blog-empty {
    margin-top: 18px;
  }

  .card {
    min-height: 220px;
  }

  .support {
    row-gap: 22px;
  }

  .support-copy {
    flex-basis: 100%;
  }

  .support-button {
    flex: 1 1 100%;
  }

  .reading {
    padding-top: 24px;
  }

  .article-title {
    font-size: 32px;
  }

  .article-lead {
    font-size: 16px;
  }

  .prose {
    margin-top: 32px;
    font-size: 16px;
  }

  .prose table {
    font-size: 14px;
  }

  .prose pre {
    padding: 14px 16px;
    font-size: 13px;
  }
}

@media (pointer: coarse) {
  .blog-search-input {
    font-size: 16px;
  }

  .blog-search-input::placeholder {
    font-size: 14px;
  }
}

@media (forced-colors: active) {
  .blog-tab[aria-current] {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
