/* Generated by scripts/build-site-css.ts. Do not edit — run `bun run build:css`. */

/* --- remark-alerts/styles/github-base.css --- */
.markdown-alert {
  padding: 0.5rem 1rem;
  margin-bottom: 16px;
  color: inherit;
  border-left: .25em solid #888;
}

.markdown-alert>:first-child {
  margin-top: 0
}

.markdown-alert>:last-child {
  margin-bottom: 0
}

.markdown-alert .markdown-alert-title {
  display: flex;
  font-weight: 500;
  align-items: center;
  line-height: 1
}

.markdown-alert .markdown-alert-title .octicon {
  margin-right: 0.5rem;
  display: inline-block;
  overflow: visible !important;
  vertical-align: text-bottom;
  fill: currentColor;
}

.markdown-alert.markdown-alert-note {
  border-left-color: var(--color-note);
}

.markdown-alert.markdown-alert-note .markdown-alert-title {
  color: var(--color-note);
}

.markdown-alert.markdown-alert-important {
  border-left-color: var(--color-important);
}

.markdown-alert.markdown-alert-important .markdown-alert-title {
  color: var(--color-important);
}

.markdown-alert.markdown-alert-warning {
  border-left-color: var(--color-warning);
}

.markdown-alert.markdown-alert-warning .markdown-alert-title {
  color: var(--color-warning);
}

.markdown-alert.markdown-alert-tip {
  border-left-color: var(--color-tip);
}

.markdown-alert.markdown-alert-tip .markdown-alert-title {
  color: var(--color-tip);
}

.markdown-alert.markdown-alert-caution {
  border-left-color: var(--color-caution);
}

.markdown-alert.markdown-alert-caution .markdown-alert-title {
  color: var(--color-caution);
}


/* --- remark-alerts/styles/github-colors-light.css --- */
:root {
  --color-note: #0969da;
  --color-tip: #1a7f37;
  --color-warning: #9a6700;
  --color-severe: #bc4c00;
  --color-caution: #d1242f;
  --color-important: #8250df;
}


/* --- remark-alerts/styles/github-colors-dark-class.css --- */
.dark {
  --color-note: #2f81f7;
  --color-tip: #3fb950;
  --color-warning: #d29922;
  --color-severe: #db6d28;
  --color-caution: #f85149;
  --color-important: #a371f7;
}


/* --- remark-link-to-card/styles/link-card-base.css --- */
.markdown-link-card-link {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  font-size: 16.5px;
  height: 120px;
  line-height: 1.5;
  transition: .2s;
  color: rgba(0, 0, 0, .82);
  text-decoration: none;
  border: 1px solid rgba(92, 147, 187, .2);
  border-radius: 10px;
  overflow: hidden;
  background-color: #fff;
  margin: 1.5rem 0;
}

.markdown-link-card-link:hover {
  background: rgba(239, 246, 251, .7);
}

.markdown-link-card-main {
  flex: 1 1;
  padding: .8em 1.2em;
  min-width: 0;
}

.markdown-link-card-title {
  margin: 0;
  font-size: 1em;
  max-height: 3.05em;
  user-select: none;
  word-break: break-word;
  overflow: hidden;
  font-weight: bold;
  text-align: left;
}

.markdown-link-card-description {
  margin-top: .5em;
  color: #77838c;
  font-size: .8em;
  max-height: 1.55em;
  text-align: left;
  -webkit-line-clamp: 1;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
}

.markdown-link-card-meta {
  margin-top: .5em;
  font-size: .78em;
  display: flex;
  align-items: center;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.markdown-link-card-favicon {
  margin-right: 6px;
  flex-shrink: 0;
}

.markdown-link-card-thumbnail {
  height: 120px;
  max-width: 230px;
}

@media only screen and (max-width: 480px) {
  .markdown-link-card-thumbnail {
    width: 120px;
  }    
}

.markdown-link-card-thumbnail-image {
  object-fit: cover;
  width: 100%;
  height: 100%;
}




/* --- resources/css/site.base.css --- */
/*
 * Styles for the public pages. Concatenated with the vendor stylesheets the
 * rendered post bodies depend on — see scripts/build-site-css.ts.
 *
 * The custom properties are carried over from the Astro site's global.css so
 * the palette does not shift during the migration.
 */

:root {
  /* Light theme (default) */
  --bg-primary: #eeeeee;
  --bg-secondary: #ffffff;
  --bg-card-light: #ffffff;
  --bg-card-dark: #2a4670;
  --text-primary: #000000;
  --text-secondary: #4b5563;
  --text-muted: #6b7280;
  --border-color: #e5e7eb;
  --code-bg: #e6e6e6;
  --title-gradient-start: rgba(89, 129, 189, 0.5);
  --title-gradient-end: rgba(255, 255, 255, 0.5);
  --content-width: 48rem;
  /* src/consts/colors.ts */
  --light-blue: #5981bd;
  --blue: #2a4670;
  /* --text-muted/--text-secondary drop to ~2.4:1–3.7:1 against the blue-tinted
     top of .post-hero's gradient — well under the 4.5:1 WCAG AA floor. This
     shade stays above 4.5:1 across the whole gradient, top to bottom. */
  --hero-text: #374151;
}

:root.dark {
  --bg-primary: #1a1a2e;
  --bg-secondary: #16213e;
  --bg-card-light: #1f2937;
  --bg-card-dark: #374151;
  --text-primary: #f3f4f6;
  --text-secondary: #d1d5db;
  --text-muted: #9ca3af;
  --border-color: #374151;
  --code-bg: #374151;
  --title-gradient-start: rgba(42, 70, 112, 0.7);
  --title-gradient-end: rgba(26, 26, 46, 0.7);
  /* The dark gradient never drops --text-muted below 4.5:1, so no override
     is needed here. */
  --hero-text: var(--text-muted);
}

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

body {
  margin: 0;
  font-family: 'Noto Sans JP', system-ui, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.75;
  word-wrap: break-word;
  overflow-wrap: break-word;
  transition: background-color 0.3s ease, color 0.3s ease;
}

a {
  color: inherit;
}

/* Reading progress: painted by site.js on scroll. */
#reading-progress {
  position: fixed;
  inset: 0 auto auto 0;
  height: 3px;
  width: 0;
  background: var(--bg-card-dark);
  z-index: 10;
}

.pagination {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  align-items: center;
  padding: 2rem 0;
}

.pagination a {
  color: var(--text-secondary);
  text-decoration: none;
}

.pagination a:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

.pagination [aria-current='page'] {
  font-weight: 700;
  text-decoration: underline;
}

/* Collapsed on small screens by site.js, which toggles this class. */
#table-of-contents.is-collapsed ul {
  display: none;
}

#back-to-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  color: inherit;
  cursor: pointer;
  display: none;
  z-index: 20;
}

#back-to-top.is-visible {
  display: block;
}

/* Ported from Header.astro: full-width bar, logo and text links at the left,
   icon links at the right. */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background-color: var(--bg-secondary);
  transition: background-color 0.3s ease;
}

@media (min-width: 48rem) {
  .site-header {
    padding: 1rem 2rem;
  }
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

@media (min-width: 48rem) {
  .site-nav {
    gap: 2rem;
  }
}

.site-nav a {
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.95rem;
}

.site-nav a:hover {
  text-decoration: underline;
}

.site-logo {
  display: inline-flex;
}

.site-logo img {
  width: 32px;
  height: 32px;
  min-width: 0;
}

.site-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

@media (min-width: 48rem) {
  .site-actions {
    gap: 1.5rem;
  }
}

/* Icon links and the theme toggle share one shape. */
.icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: none;
  background: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0;
  transition: color 0.2s ease;
}

.icon-link:hover {
  color: var(--text-primary);
}

.icon-link svg {
  width: 24px;
  height: 24px;
}

/* Content columns stay narrow even though the header bar is full width. */
main {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Off-screen until focused, so a keyboard/screen-reader user can jump past
   the header nav straight to the article without it being visible to everyone
   else. */
.skip-link {
  position: absolute;
  top: -3rem;
  left: 1rem;
  z-index: 50;
  padding: 0.6rem 1rem;
  border-radius: 0.5rem;
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 1rem;
}

.post,
.prose-page,
.profile-page,
.search-page,
.breadcrumb {
  max-width: var(--content-width);
  margin-inline: auto;
}

/* Ported from Footer.astro. */
.site-footer {
  max-width: none;
  padding: 2rem 1rem;
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  border-top: 1px solid var(--border-color);
  transition: background-color 0.3s ease, color 0.3s ease;
}

.footer-content {
  max-width: 1024px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-link {
  color: var(--text-muted);
  font-size: 0.875rem;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: var(--text-primary);
}

.footer-social {
  display: flex;
  gap: 1rem;
}

.footer-social a {
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.footer-social a:hover {
  color: var(--text-primary);
}

.footer-social svg {
  width: 1.25rem;
  height: 1.25rem;
}

.footer-copyright {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
  margin: 0;
}

/* Profile page — ported from profile.astro. */
.profile-page {
  padding: 3rem 1rem;
}

.profile-title {
  font-size: 2.25rem;
  font-weight: 700;
  margin: 0 0 1.5rem;
}

.profile-bio {
  color: var(--text-secondary);
  line-height: 1.9;
  margin: 0;
}

.social-section {
  margin-top: 6rem;
}

.social-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.social-links {
  display: flex;
  gap: 2rem;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-primary);
  text-decoration: none;
}

.social-link:hover {
  text-decoration: underline;
}

.social-link svg {
  width: 1.15rem;
  height: 1.15rem;
}

/* Links page — ported from links.astro, ProfileHeader, LinkButton, OSSCard. */
.links-container {
  max-width: 36rem;
  margin: 0 auto;
  padding: 3rem 1rem;
}

.profile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.avatar-container {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--border-color);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-header .name {
  margin: 1.5rem 0 0;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
}

.profile-header .bio {
  margin: 0.5rem 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.links-content {
  margin-top: 3rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.section-title {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin: 0 0 1rem;
}

.links-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.link-button {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-radius: 1rem;
  background-color: var(--bg-secondary);
  border: 2px solid var(--border-color);
  color: var(--text-primary);
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.link-button:hover {
  transform: translateY(-4px);
  border-color: var(--light-blue);
  box-shadow: 0 8px 24px rgba(89, 129, 189, 0.2);
}

.link-button:hover .icon {
  transform: scale(1.15);
}

.link-button:hover .arrow {
  transform: translateX(4px);
  color: var(--light-blue);
}

.link-button .icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.link-button .label {
  flex: 1;
  font-weight: 600;
}

.link-button .arrow {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  transition: transform 0.3s ease, color 0.3s ease;
}

.oss-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: 1rem;
  background-color: var(--bg-secondary);
  border: 2px solid var(--border-color);
  color: var(--text-primary);
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.oss-card:hover {
  transform: translateY(-4px);
  border-color: var(--light-blue);
  box-shadow: 0 8px 24px rgba(89, 129, 189, 0.2);
}

.logo-container {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-container .logo {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.oss-card .content {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
  flex: 1;
}

.oss-card .label {
  font-weight: 700;
  font-size: 0.9rem;
}

.oss-card .description {
  font-size: 0.75rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.oss-card .external-icon {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* Search page — ported from search.astro. */
.search-page {
  padding: 3rem 1rem;
}

.search-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 1.5rem;
}

.search-form {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.25rem;
  border-radius: 0.75rem;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
}

.search-form .search-icon {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.search-form input {
  flex: 1;
  border: none;
  background: none;
  color: var(--text-primary);
  font-size: 1rem;
  outline: none;
}

.search-count,
.search-empty {
  margin-top: 1.5rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.search-results {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}

.search-results li {
  border-bottom: 1px solid var(--border-color);
}

.search-results a {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem 0;
  text-decoration: none;
  color: inherit;
}

.search-results a:hover .result-title {
  text-decoration: underline;
}

.result-title {
  font-weight: 600;
}

.result-description {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/*
 * Breadcrumb, share buttons and related posts — ported from the Astro site's
 * Breadcrumb.astro, ShareButtons.astro and RelatedPosts.astro, whose scoped
 * <style> blocks these rules come from.
 */

.card-icon svg {
  width: 1.75rem;
  height: 1.75rem;
  color: var(--bg-card-dark);
}

.breadcrumb-list {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--hero-text);
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
}

.breadcrumb-link {
  color: var(--hero-text);
  text-decoration: none;
  transition: color 0.2s ease;
}

.breadcrumb-link:hover {
  color: var(--text-primary);
}

.breadcrumb-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.breadcrumb-current {
  color: var(--text-primary);
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (min-width: 768px) {
  .breadcrumb-current {
    max-width: 400px;
  }
}

.share-buttons {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
  border-top: 1px solid var(--border-color);
  margin-top: 2rem;
}

.share-label {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.share-icons {
  display: flex;
  gap: 0.5rem;
}

.share-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  transition: all 0.2s ease;
  color: #fff;
  border: none;
  cursor: pointer;
  text-decoration: none;
}

.share-button svg {
  width: 1.25rem;
  height: 1.25rem;
}

.share-button.twitter {
  background-color: #000;
}

.share-button.twitter:hover {
  background-color: #333;
}

.share-button.hatena {
  background-color: #00a4de;
}

.share-button.hatena:hover {
  background-color: #0090c4;
}

.hatena-icon {
  font-weight: 700;
  font-size: 1rem;
}

.share-button.line {
  background-color: #06c755;
}

.share-button.line:hover {
  background-color: #05a648;
}

.related-posts {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.related-posts h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.related-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 48rem) {
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.related-post-card {
  display: block;
  padding: 1rem;
  background-color: var(--bg-card-light);
  border-radius: 0.5rem;
  border: 1px solid var(--border-color);
  text-decoration: none;
  transition: all 0.2s ease;
}

.related-post-card:hover {
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  transform: translateY(-2px);
}

.related-post-card h3 {
  font-weight: 600;
  font-size: 0.875rem;
  margin: 0 0 0.5rem;
  color: var(--text-primary);
}

.related-post-card p {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0;
}

.related-post-card span {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  display: block;
}

.share-button.copy {
  background-color: var(--bg-card-dark);
}

.share-button.copy:hover {
  filter: brightness(1.15);
}

.hidden {
  display: none;
}

/* Two-line truncation, as the Astro cards used. */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/*
 * Post list — ported from Card.astro.
 *
 * (Restored: an earlier edit that rewrote the footer section removed this
 * block along with the article styles below it.)
 */
.cards-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  padding: 2rem 0;
}

@media (min-width: 48rem) {
  .cards-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 64rem) {
  .cards-container {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  display: flex;
  padding: 2rem;
  border-radius: 1.5rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  text-decoration: none;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.card:hover .circle-icon {
  transform: scale(1.1);
}

.card:hover .icon {
  transform: rotate(10deg);
}

.card:hover::before {
  opacity: 1;
}

.card-light {
  background-color: var(--bg-card-light);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.card-light::before {
  background: linear-gradient(135deg, rgba(89, 129, 189, 0.1) 0%, transparent 50%);
}

.card-dark {
  background-color: var(--bg-card-dark);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.card-dark::before {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
}

.card-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  width: 100%;
  position: relative;
  z-index: 1;
}

.circle-icon {
  width: 85px;
  height: 85px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
}

.circle-icon .icon {
  color: #fff;
  width: 36px;
  height: 36px;
  transition: transform 0.3s ease;
}

.icon-light {
  background-color: var(--blue);
}

.icon-dark {
  background-color: var(--light-blue);
}

.text-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.card .title {
  font-size: 14px;
  font-weight: 700;
  line-height: 160%;
  text-align: center;
  min-height: 3.5rem;
}

.card .description {
  font-size: 12px;
  font-weight: 400;
  line-height: 160%;
  text-align: center;
  min-height: 3rem;
}

.text-light {
  color: var(--text-primary);
}

.text-dark {
  color: #fff;
}

/* Article */
.post header h1 {
  font-size: 1.9rem;
  line-height: 1.4;
  margin-bottom: 0.25rem;
}

.post header time {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.post-body h2 {
  margin-top: 2.5rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--border-color);
}

.post-body h3 {
  margin-top: 2rem;
}

.post-body img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
}

.post-body :not(pre) > code,
.post-body pre {
  /* Chromium quietly shrinks anything sized in `em`/`rem` under the bare
     `monospace` generic keyword to its "fixed-width font" preference
     (13px by default, vs. the 16px "standard font" default) — so
     `font-size: 0.9em` here was rendering at ~11.7px, well under the 16px
     body copy, rather than the ~14.4px the CSS actually asks for. Naming
     real monospace fonts first sidesteps that adjustment. */
  font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;
}

.post-body :not(pre) > code {
  background: var(--code-bg);
  padding: 0.15em 0.4em;
  border-radius: 0.3em;
  font-size: 0.9em;
}

.post-body pre {
  padding: 1rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  font-size: 0.9em;
}

.post-body table {
  display: block;
  overflow-x: auto;
  border-collapse: collapse;
}

.post-body th,
.post-body td {
  border: 1px solid var(--border-color);
  padding: 0.4rem 0.75rem;
}

.post-body blockquote {
  margin-inline: 0;
  padding-left: 1rem;
  border-left: 4px solid var(--border-color);
  color: var(--text-secondary);
}

/*
 * Article header — ported from the post page's own <style> block: a gradient
 * band running the full width, with the breadcrumb, a centred title and the
 * date/reading-time line over it.
 */
.post-hero {
  background: linear-gradient(180deg, var(--title-gradient-start) 0%, var(--title-gradient-end) 100%);
  padding: 1rem 1rem 2.5rem;
  margin-bottom: 2rem;
}

@media (min-width: 48rem) {
  .post-hero {
    padding: 1rem 3rem 2.5rem;
  }
}

.post-hero-inner {
  /* 1024px, matching the Astro page's `max-w-[1024px]`. */
  max-width: 64rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.post-hero .breadcrumb {
  align-self: flex-start;
  width: 100%;
  max-width: none;
}

.post-title {
  color: var(--text-primary);
  font-size: 2rem;
  font-weight: 700;
  line-height: 160%;
  text-align: center;
  max-width: 64rem;
  margin: 0;
}

@media (min-width: 48rem) {
  .post-title {
    font-size: 2.8rem;
  }
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--hero-text);
  margin-top: 0.5rem;
}

/*
 * Table of contents — rows separated by hairlines rather than bullets, the
 * heading centred. From the post page's `is:global` block.
 */
#table-of-contents {
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  background: var(--bg-secondary);
  margin: 2rem 0;
  padding: 1.5rem 1rem 0.5rem;
}

@media (min-width: 48rem) {
  #table-of-contents {
    padding: 1.5rem 2rem 0.5rem;
  }
}

#table-of-contents-heading {
  margin: 0;
  cursor: pointer;
  font-size: 1.25rem;
  font-weight: 700;
  text-align: center;
}

#table-of-contents-heading:focus-visible {
  outline: 2px solid var(--light-blue);
  outline-offset: 2px;
}

#table-of-contents ul {
  padding-left: 0;
  list-style: none;
  margin-top: 0.5rem;
  font-size: 1rem;
}

#table-of-contents li {
  list-style: none;
  margin-bottom: 0;
}

#table-of-contents li a {
  display: inline-block;
  width: 100%;
  padding: 1rem 0;
  text-decoration: none;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
}

#table-of-contents li:last-child a {
  border-bottom: 0;
}

#table-of-contents li a:hover {
  color: var(--light-blue);
}
