@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../../fonts/SpaceGrotesk-400.woff2") format("woff2");
}

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../../fonts/SpaceGrotesk-500.woff2") format("woff2");
}

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../../fonts/SpaceGrotesk-600.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../../fonts/IBMPlexMono-400.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../../fonts/IBMPlexMono-500.woff2") format("woff2");
}

:root {
  color-scheme: dark;
  --font-sans: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
  --fs-xxs: clamp(0.52rem, 0.5rem + 0.15vw, 0.62rem);
  --fs-xs: clamp(0.6rem, 0.56rem + 0.2vw, 0.74rem);
  --fs-sm: clamp(0.72rem, 0.68rem + 0.22vw, 0.88rem);
  --fs-base: clamp(0.9rem, 0.86rem + 0.2vw, 1.03rem);
  --fs-md: clamp(1rem, 0.92rem + 0.32vw, 1.2rem);
  --fs-lg: clamp(1.2rem, 1.04rem + 0.6vw, 1.6rem);
  --fs-xl: clamp(1.45rem, 1.2rem + 1vw, 2.1rem);

  --tone-015: rgba(255, 255, 255, 0.015);
  --tone-02: rgba(255, 255, 255, 0.02);
  --tone-03: rgba(255, 255, 255, 0.03);
  --tone-04: rgba(255, 255, 255, 0.04);
  --tone-05: rgba(255, 255, 255, 0.05);
  --tone-06: rgba(255, 255, 255, 0.06);
  --tone-08: rgba(255, 255, 255, 0.08);
  --tone-10: rgba(255, 255, 255, 0.1);
  --tone-12: rgba(255, 255, 255, 0.12);
  --tone-20: rgba(255, 255, 255, 0.2);

  --color-bg: #000;
  --color-primary: #fafafa;
  --color-cta: #a3ffd8;
  --color-cta-border: rgba(163, 255, 216, 0.45);
  --color-cta-soft: rgba(163, 255, 216, 0.1);
  --color-cta-glow: rgba(163, 255, 216, 0.55);
  --color-secondary: #9f9fa9;
  --color-tertiary: #71717b;
  --mono-label-color: #8d93a3;
  --post-heading-color: #f4f5f7;
  --post-body-color: #d9dde5;
  --post-subtitle-color: #c2c8d3;
  --post-meta-color: #97a0b0;
  --post-facts-bg: #1f1f1f;
  --post-facts-chip-bg: #3a3a3a;
  --post-facts-text-color: #f4f5f7;
  --post-facts-title-color: #a5a5a5;
  --post-facts-link-hover: #ffffff;
  --chart-bg: rgba(255, 255, 255, 0.018);
  --chart-plot-bg: rgba(255, 255, 255, 0.01);
  --chart-grid: rgba(255, 255, 255, 0.12);
  --chart-axis: rgba(255, 255, 255, 0.38);
  --chart-label: #d3d9e4;
  --chart-title: #f4f5f7;
  --chart-tooltip-bg: #f4f5f7;
  --chart-tooltip-color: #121826;
  --chart-error-color: #ef9292;
  --chart-point-stroke: rgba(0, 0, 0, 0.18);
  --chart-legend-ring: rgba(255, 255, 255, 0.1);
  --chart-series-1: #8ac7b0;
  --chart-series-2: #9ab5e4;
  --chart-series-3: #b495d8;
  --chart-series-4: #d7a586;
  --chart-series-5: #85b7c8;
  --chart-series-6: #b5c98a;
  --code-keyword-color: #9fa8ff;
  --code-variable-color: #e0b07a;
  --code-subtle-color: #dbe4ef;
  --code-fade-start: rgba(0, 0, 0, 0);
  --code-fade-mid: rgba(0, 0, 0, 0.78);
  --code-fade-end: rgba(0, 0, 0, 0.95);
  --color-border: #27272a;
  --color-surface: #0a0a0a;
  --color-surface-2: #171717;

  --grid-line-1: var(--tone-02);
  --grid-line-2: var(--tone-015);
  --radial-1: var(--tone-05);
  --radial-2: var(--tone-04);

  --topbar-bg: rgba(2, 4, 8, 0.72);
  --topbar-strip: rgba(0, 0, 0, 0.25);
  --chip-shell-bg: var(--tone-03);
  --chip-shell-border: var(--tone-08);
  --shadow-elev-1: rgba(0, 0, 0, 0.22);
  --status-dot-light: #7d889a;
  --status-dot-shadow-light: rgba(125, 136, 154, 0.28);

  --nav-height: 82px;
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

:root[data-theme="light"] {
  color-scheme: light;
  --tone-015: rgba(60, 60, 67, 0.008);
  --tone-02: rgba(60, 60, 67, 0.012);
  --tone-03: rgba(60, 60, 67, 0.018);
  --tone-04: rgba(60, 60, 67, 0.024);
  --tone-05: rgba(60, 60, 67, 0.032);
  --tone-06: rgba(60, 60, 67, 0.04);
  --tone-08: rgba(60, 60, 67, 0.062);
  --tone-10: rgba(60, 60, 67, 0.082);
  --tone-12: rgba(60, 60, 67, 0.102);
  --tone-20: rgba(60, 60, 67, 0.16);

  --color-bg: #ffffff;
  --color-primary: #1d1d1f;
  --color-cta: #0f7b5a;
  --color-cta-border: rgba(15, 123, 90, 0.34);
  --color-cta-soft: rgba(15, 123, 90, 0.1);
  --color-cta-glow: rgba(15, 123, 90, 0.34);
  --color-secondary: #2e2f33;
  --color-tertiary: #6e6e73;
  --mono-label-color: #63656e;
  --post-heading-color: #1d1d1f;
  --post-body-color: #2e2f33;
  --post-subtitle-color: #4c4d54;
  --post-meta-color: #6e6e73;
  --post-facts-bg: #f7f7fa;
  --post-facts-chip-bg: #efeff4;
  --post-facts-text-color: #2e2f33;
  --post-facts-title-color: #6e6e73;
  --post-facts-link-hover: var(--color-cta);
  --chart-bg: rgba(60, 60, 67, 0.032);
  --chart-plot-bg: rgba(60, 60, 67, 0.018);
  --chart-grid: rgba(60, 60, 67, 0.11);
  --chart-axis: rgba(60, 60, 67, 0.24);
  --chart-label: #6e6e73;
  --chart-title: #1d1d1f;
  --chart-tooltip-bg: #ffffff;
  --chart-tooltip-color: #1d1d1f;
  --chart-error-color: #b42318;
  --chart-point-stroke: rgba(60, 60, 67, 0.22);
  --chart-legend-ring: rgba(60, 60, 67, 0.14);
  --chart-series-1: #1f7e5f;
  --chart-series-2: #3467b7;
  --chart-series-3: #7650b3;
  --chart-series-4: #b66a3d;
  --chart-series-5: #2d7893;
  --chart-series-6: #758e3a;
  --code-keyword-color: #2f4fd9;
  --code-variable-color: #7f4b10;
  --code-subtle-color: #2e2f33;
  --code-fade-start: rgba(255, 255, 255, 0);
  --code-fade-mid: rgba(255, 255, 255, 0.8);
  --code-fade-end: rgba(255, 255, 255, 0.96);
  --color-border: #dbdbe0;
  --color-surface: #ffffff;
  --color-surface-2: #f7f7fa;

  --grid-line-1: var(--tone-02);
  --grid-line-2: var(--tone-015);
  --radial-1: var(--tone-06);
  --radial-2: var(--tone-04);

  --topbar-bg: rgba(255, 255, 255, 0.9);
  --topbar-strip: rgba(60, 60, 67, 0.06);
  --chip-shell-bg: var(--tone-03);
  --chip-shell-border: var(--tone-10);
  --shadow-elev-1: rgba(17, 17, 17, 0.1);
  --status-dot-light: #8e8e93;
  --status-dot-shadow-light: rgba(142, 142, 147, 0.24);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    color-scheme: light;
    --tone-015: rgba(60, 60, 67, 0.008);
    --tone-02: rgba(60, 60, 67, 0.012);
    --tone-03: rgba(60, 60, 67, 0.018);
    --tone-04: rgba(60, 60, 67, 0.024);
    --tone-05: rgba(60, 60, 67, 0.032);
    --tone-06: rgba(60, 60, 67, 0.04);
    --tone-08: rgba(60, 60, 67, 0.062);
    --tone-10: rgba(60, 60, 67, 0.082);
    --tone-12: rgba(60, 60, 67, 0.102);
    --tone-20: rgba(60, 60, 67, 0.16);
    --color-bg: #ffffff;
    --color-primary: #1d1d1f;
    --color-cta: #0f7b5a;
    --color-cta-border: rgba(15, 123, 90, 0.34);
    --color-cta-soft: rgba(15, 123, 90, 0.1);
    --color-cta-glow: rgba(15, 123, 90, 0.34);
    --color-secondary: #2e2f33;
    --color-tertiary: #6e6e73;
    --mono-label-color: #63656e;
    --post-heading-color: #1d1d1f;
    --post-body-color: #2e2f33;
    --post-subtitle-color: #4c4d54;
    --post-meta-color: #6e6e73;
    --post-facts-bg: #f7f7fa;
    --post-facts-chip-bg: #efeff4;
    --post-facts-text-color: #2e2f33;
    --post-facts-title-color: #6e6e73;
    --post-facts-link-hover: var(--color-cta);
    --chart-bg: rgba(60, 60, 67, 0.032);
    --chart-plot-bg: rgba(60, 60, 67, 0.018);
    --chart-grid: rgba(60, 60, 67, 0.11);
    --chart-axis: rgba(60, 60, 67, 0.24);
    --chart-label: #6e6e73;
    --chart-title: #1d1d1f;
    --chart-tooltip-bg: #ffffff;
    --chart-tooltip-color: #1d1d1f;
    --chart-error-color: #b42318;
    --chart-point-stroke: rgba(60, 60, 67, 0.22);
    --chart-legend-ring: rgba(60, 60, 67, 0.14);
    --chart-series-1: #1f7e5f;
    --chart-series-2: #3467b7;
    --chart-series-3: #7650b3;
    --chart-series-4: #b66a3d;
    --chart-series-5: #2d7893;
    --chart-series-6: #758e3a;
    --code-keyword-color: #2f4fd9;
    --code-variable-color: #7f4b10;
    --code-subtle-color: #2e2f33;
    --code-fade-start: rgba(255, 255, 255, 0);
    --code-fade-mid: rgba(255, 255, 255, 0.8);
    --code-fade-end: rgba(255, 255, 255, 0.96);
    --color-border: #dbdbe0;
    --color-surface: #ffffff;
    --color-surface-2: #f7f7fa;
    --grid-line-1: var(--tone-02);
    --grid-line-2: var(--tone-015);
    --radial-1: var(--tone-06);
    --radial-2: var(--tone-04);
    --topbar-bg: rgba(255, 255, 255, 0.9);
    --topbar-strip: rgba(60, 60, 67, 0.06);
    --chip-shell-bg: var(--tone-03);
    --chip-shell-border: var(--tone-10);
    --shadow-elev-1: rgba(17, 17, 17, 0.1);
    --status-dot-light: #8e8e93;
    --status-dot-shadow-light: rgba(142, 142, 147, 0.24);
  }
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

a,
button,
[role="button"],
input,
select,
textarea,
summary {
  -webkit-tap-highlight-color: transparent;
}

body {
  min-height: 100vh;
  background: var(--color-bg);
  color: var(--color-secondary);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  position: relative;
  display: flex;
  flex-direction: column;
}

body::before {
  content: none;
  position: fixed;
  inset: 0;
  background-image: repeating-linear-gradient(
      0deg,
      var(--grid-line-1) 0,
      var(--grid-line-1) 1px,
      transparent 1px,
      transparent 4px
    ),
    repeating-linear-gradient(
      90deg,
      var(--grid-line-2) 0,
      var(--grid-line-2) 1px,
      transparent 1px,
      transparent 120px
    );
  opacity: 0.6;
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(1200px 600px at 10% -10%, var(--radial-1), transparent 60%),
    radial-gradient(1000px 500px at 90% 0%, var(--radial-2), transparent 55%);
  pointer-events: none;
  z-index: 0;
}

:root[data-theme="light"] body::before {
  opacity: 0;
}

:root[data-theme="light"] body::after {
  opacity: 0;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme]) body::before {
    opacity: 0;
  }

  :root:not([data-theme]) body::after {
    opacity: 0;
  }
}

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

::-moz-selection {
  background: var(--color-primary);
  color: var(--color-bg);
}

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

.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 10px 2rem 12px;
  border-bottom: none;
  background: var(--topbar-bg);
  backdrop-filter: blur(24px) saturate(145%);
  -webkit-backdrop-filter: blur(24px) saturate(145%);
}

.top-bar::before {
  content: none;
}

:root[data-theme="light"] .top-bar::before {
  opacity: 0;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme]) .top-bar::before {
    opacity: 0;
  }
}

.top-bar-main {
  width: 100%;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  position: relative;
  z-index: 1;
}

.top-bar-left {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  justify-self: start;
}

.profile-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
  border-radius: 999px;
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

.profile-picture {
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--tone-12);
}

.profile-link:hover {
  transform: translateY(-1px);
}

.site-title {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  min-width: 0;
  padding: 4px 8px;
  border-radius: 10px;
  text-align: center;
  transition: background var(--transition-fast);
  justify-self: center;
}

.site-title:hover,
.site-title:focus-visible {
  background: var(--tone-04);
}

.site-title-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.flip-text {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-primary);
  white-space: nowrap;
}

.site-title-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-tertiary);
  opacity: 0.4;
  transform: translateX(-2px);
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 4px;
  transition: opacity var(--transition-fast), transform var(--transition-fast),
    color var(--transition-fast), border-color var(--transition-fast),
    background var(--transition-fast);
}

.site-title:hover .site-title-icon,
.site-title:focus-visible .site-title-icon {
  color: var(--color-primary);
  opacity: 1;
  transform: translateX(2px);
  border-color: var(--tone-20);
  background: var(--tone-05);
}

.site-subtitle {
  font-family: var(--font-mono);
  font-size: var(--fs-xxs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mono-label-color);
  white-space: nowrap;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.top-bar-right {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-shrink: 0;
}

.top-bar-home-link {
  height: 34px;
  min-width: 34px;
  padding: 0 12px;
  gap: 6px;
  border-radius: 10px;
  border: 1px solid var(--chip-shell-border);
  background: var(--chip-shell-bg);
  color: var(--color-secondary);
  font-family: var(--font-mono);
  font-size: var(--fs-xxs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition-fast), border-color var(--transition-fast),
    background var(--transition-fast);
}

.top-bar-home-icon {
  width: 12px;
  height: 12px;
  opacity: 0.85;
}

.top-bar-home-label {
  display: inline;
}

.top-bar-home-link:hover,
.top-bar-home-link:focus-visible {
  color: var(--color-primary);
  border-color: var(--tone-20);
  background: var(--color-surface-2);
}

.icon-label {
  position: relative;
}

.icon-label[data-label]::after,
.post-share-item[data-label]::after,
.post-video-control[data-label]::after,
.post-video-play[data-label]::after {
  content: attr(data-label);
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translate(-50%, -6px) scale(0.97);
  transform-origin: 50% 0%;
  padding: 8px 10px;
  border-radius: 999px;
  background: var(--color-bg);
  color: var(--color-secondary);
  font-family: var(--font-mono);
  font-size: var(--fs-xxs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  box-shadow: inset 0 0 0 1px var(--tone-10), 0 8px 18px var(--shadow-elev-1);
  transition: transform 220ms cubic-bezier(0.2, 0.78, 0.24, 1),
    opacity 150ms ease;
  z-index: 40;
}

.icon-label:hover::after,
.icon-label:focus-visible::after,
.icon-label:active::after,
.post-share-item[data-label]:hover::after,
.post-share-item[data-label]:focus-visible::after,
.post-share-item[data-label]:active::after,
.post-share-item.is-copied[data-label]::after,
.post-video-control[data-label]:hover::after,
.post-video-control[data-label]:focus-visible::after,
.post-video-control[data-label]:active::after,
.post-video-play[data-label]:hover::after,
.post-video-play[data-label]:focus-visible::after,
.post-video-play[data-label]:active::after {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.icon-label--mobile-only[data-label]::after {
  display: none;
}

.contact-quick {
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 4px;
  border-radius: 12px;
  border: 1px solid var(--chip-shell-border);
  background: var(--chip-shell-bg);
  box-shadow: inset 0 0 0 1px var(--tone-02);
}

.contact-quick--single,
.contact-quick:has(.contact-quick-link--primary:only-child) {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.contact-quick-link {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: var(--color-secondary);
  border: 1px solid transparent;
  position: relative;
  transition: color var(--transition-fast), border-color var(--transition-fast),
    background var(--transition-fast), transform var(--transition-fast);
}

.contact-quick--single .contact-quick-link,
.contact-quick:has(.contact-quick-link--primary:only-child) .contact-quick-link {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border-color: var(--chip-shell-border);
  background: var(--chip-shell-bg);
}

.contact-quick-link--primary {
  display: none;
}

.contact-quick-link--primary:only-child {
  display: inline-flex;
}

.contact-quick-link:not(:first-child)::before {
  content: "";
  position: absolute;
  left: -2px;
  top: 7px;
  bottom: 7px;
  width: 1px;
  background: var(--tone-12);
  pointer-events: none;
}

.contact-quick-link svg {
  width: 14px;
  height: 14px;
}

.contact-quick-link:hover,
.contact-quick-link:focus-visible {
  color: var(--color-primary);
  border-color: var(--chip-shell-border);
  background: var(--color-surface-2);
}

.contact-quick--single .contact-quick-link:hover,
.contact-quick--single .contact-quick-link:focus-visible,
.contact-quick:has(.contact-quick-link--primary:only-child) .contact-quick-link:hover,
.contact-quick:has(.contact-quick-link--primary:only-child) .contact-quick-link:focus-visible {
  border-color: var(--tone-20);
}

.theme-control {
  position: relative;
  display: inline-flex;
  align-items: center;
}

:root[data-theme-toggle="off"] .theme-control {
  display: none !important;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  color: var(--color-primary);
  border-color: var(--tone-20);
  background: var(--color-surface-2);
}

.theme-toggle {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid var(--chip-shell-border);
  background: var(--chip-shell-bg);
  color: var(--color-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color var(--transition-fast), border-color var(--transition-fast),
    background var(--transition-fast);
}

.theme-toggle svg {
  width: 15px;
  height: 15px;
}

.top-bar-left,
.site-title,
.top-bar-right,
.bottom-bar {
  opacity: 1;
  transform: translateY(0);
}

body.booting .top-bar-left,
body.booting .site-title,
body.booting .top-bar-right {
  opacity: 0;
  transform: translateY(-5px);
}

body.booting .page,
body.booting .bottom-bar {
  opacity: 0;
}

body.loaded .top-bar-left,
body.loaded .site-title,
body.loaded .top-bar-right {
  transition: opacity 0.38s ease, transform 0.38s ease;
}

body.loaded .top-bar-left {
  transition-delay: 0.02s;
}

body.loaded .site-title {
  transition-delay: 0.1s;
}

body.loaded .top-bar-right {
  transition-delay: 0.18s;
}

body.loaded .page,
body.loaded .bottom-bar {
  transition: opacity 0.42s ease;
  transition-delay: 0.14s;
}

.page {
  position: relative;
  z-index: 1;
  max-width: 88rem;
  margin: 0 auto;
  padding: calc(var(--nav-height) + 18px) 1.5rem 2.2rem;
  flex: 1 0 auto;
  width: 100%;
}

.blog-head {
  border-bottom: 1px solid var(--tone-10);
  background: transparent;
  padding: 2px 0 14px;
}

.blog-kicker {
  font-family: var(--font-mono);
  font-size: var(--fs-xxs);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--mono-label-color);
}

.blog-title {
  margin-top: 6px;
  color: var(--color-primary);
  font-size: var(--fs-xl);
  line-height: 1.2;
}

.blog-subtitle {
  margin-top: 8px;
  max-width: 70ch;
}

.blog-stream-title {
  color: var(--color-primary);
  font-size: clamp(2.2rem, 1.7rem + 2.2vw, 3.45rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  font-weight: 500;
}

.blog-head-row {
  margin-top: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
}

.blog-stream-controls {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.blog-control-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--color-secondary);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color var(--transition-fast);
}

.blog-control-item svg {
  width: 14px;
  height: 14px;
  opacity: 0.9;
  transition: color var(--transition-fast), opacity var(--transition-fast);
}

.blog-control-select-wrap {
  gap: 5px;
}

.blog-control-select-wrap:hover,
.blog-control-select-wrap:focus-within {
  color: var(--color-primary);
}

.blog-control-select-wrap:hover svg,
.blog-control-select-wrap:focus-within svg {
  opacity: 1;
}

.blog-control-select {
  appearance: none;
  border: 1px solid var(--tone-10);
  border-radius: 8px;
  background: var(--tone-02);
  color: var(--color-primary);
  font-family: var(--font-mono);
  font-size: var(--fs-xxs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 10px;
  min-width: 96px;
  cursor: pointer;
  transition: color var(--transition-fast), border-color var(--transition-fast),
    background var(--transition-fast), box-shadow var(--transition-fast);
}

.blog-control-select:hover,
.blog-control-select:focus-visible {
  border-color: var(--tone-20);
  background: var(--color-surface-2);
  color: var(--color-primary);
  box-shadow: inset 0 0 0 1px var(--tone-03);
}

.blog-list {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.blog-pagination {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pagination-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--tone-10);
  background: var(--tone-02);
  color: var(--color-secondary);
  font-family: var(--font-mono);
  font-size: var(--fs-xxs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color var(--transition-fast), border-color var(--transition-fast),
    background var(--transition-fast);
}

.pagination-btn:hover,
.pagination-btn:focus-visible {
  color: var(--color-primary);
  border-color: var(--tone-20);
  background: var(--color-surface-2);
}

.pagination-btn[aria-current="page"] {
  color: var(--color-primary);
  border-color: var(--tone-20);
  background: var(--color-surface-2);
}

.pagination-btn[disabled] {
  opacity: 0.45;
  cursor: default;
  pointer-events: none;
}

.pagination-ellipsis {
  color: var(--mono-label-color);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.12em;
  padding: 0 2px;
}

.blog-card {
  border: 1px solid var(--tone-10);
  border-radius: 12px;
  background: transparent;
  box-shadow: none;
}

.blog-card-link {
  display: block;
  padding: 14px 16px;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.blog-card:hover .blog-card-link,
.blog-card-link:focus-visible {
  background: var(--color-surface-2);
}

.blog-card-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: var(--fs-xxs);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--mono-label-color);
}

.blog-card-title {
  margin-top: 8px;
  color: var(--color-primary);
  font-size: var(--fs-lg);
  line-height: 1.25;
}

.blog-card-excerpt {
  margin-top: 8px;
}

.blog-card-title .katex,
.blog-card-excerpt .katex {
  color: currentColor;
  font-size: 1em;
}

/* Global KaTeX wrapping policy across blog surfaces */
.katex {
  max-width: 100%;
  white-space: normal !important;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.katex .base {
  white-space: normal !important;
  width: auto !important;
  max-width: 100%;
}

.katex-display {
  max-width: 100%;
  overflow-x: clip !important;
  overflow-y: visible !important;
}

.katex-display > .katex,
.katex-display > .katex > .katex-html {
  display: block;
  max-width: 100%;
  white-space: normal !important;
}

.blog-card-foot {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.blog-tags {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}

.blog-tag {
  border: 1px solid var(--tone-10);
  border-radius: 999px;
  padding: 3px 8px;
  font-family: var(--font-mono);
  font-size: var(--fs-xxs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mono-label-color);
  background: var(--tone-015);
}

.blog-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: var(--fs-xxs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-primary);
}

.blog-cta svg {
  width: 10px;
  height: 10px;
}

.blog-empty {
  border: 1px dashed var(--tone-12);
  border-radius: 12px;
  padding: 16px;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--mono-label-color);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.post-back-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

.post-share {
  position: fixed;
  right: clamp(10px, 2vw, 22px);
  top: auto;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  z-index: 120;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 5px;
  border-radius: 18px;
  border: 1px solid var(--chip-shell-border);
  background: var(--topbar-bg);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: inset 0 0 0 1px var(--tone-02);
  opacity: 1;
  transform: none;
  transition: border-color var(--transition-fast), background var(--transition-fast),
    transform var(--transition-fast);
}

.post-share.is-hidden {
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
}

.post-share-item {
  appearance: none;
  -webkit-appearance: none;
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--color-secondary);
  cursor: pointer;
  font: inherit;
  position: relative;
  transition: color var(--transition-fast), border-color var(--transition-fast),
    background var(--transition-fast), transform var(--transition-fast);
}

.post-share-item:not(:first-child)::before {
  content: "";
  position: absolute;
  left: 7px;
  right: 7px;
  top: -2px;
  height: 1px;
  background: var(--tone-12);
  pointer-events: none;
}

.post-share-item svg {
  width: 14px;
  height: 14px;
}

.post-share-item .icon-check {
  display: none;
}

.post-share-item--x svg {
  width: 13px;
  height: 13px;
}

.post-share-item:hover,
.post-share-item:focus-visible {
  color: var(--color-primary);
  border-color: var(--chip-shell-border);
  background: var(--color-surface-2);
  transform: translateX(-1px);
}

.post-share-item:focus {
  outline: none;
}

.post-share-item.is-copied {
  color: var(--color-cta);
  border-color: var(--color-cta-border);
  background: var(--color-cta-soft);
}

.post-share-item.is-copied .icon-copy {
  display: none;
}

.post-share-item.is-copied .icon-check {
  display: block;
}

.post-toc-shell {
  --toc-bleed: clamp(0px, 7vw, 110px);
  position: fixed;
  left: 50%;
  transform: translate(-50%, -6px);
  width: min(calc(78ch + var(--toc-bleed)), calc(100vw - 2rem));
  z-index: 96;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.post-toc-shell.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.post-toc-toggle {
  position: relative;
  width: 100%;
  border: 0;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
  background: var(--topbar-bg);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  color: var(--color-primary);
  min-height: 38px;
  padding: 8px 12px 14px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  font: inherit;
  cursor: pointer;
  text-align: left;
  transition: background var(--transition-fast);
}

.post-toc-toggle:hover,
.post-toc-toggle:focus-visible {
  background: var(--color-surface-2);
}

.post-toc-kicker {
  font-family: var(--font-mono);
  font-size: var(--fs-xxs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mono-label-color);
  white-space: nowrap;
}

.post-toc-current {
  min-width: 0;
  font-size: var(--fs-sm);
  color: var(--color-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.post-toc-chevron {
  width: 16px;
  height: 16px;
  justify-self: end;
  flex-shrink: 0;
  color: var(--color-secondary);
  transition: transform var(--transition-fast), color var(--transition-fast);
}

.post-toc-chevron svg {
  width: 100%;
  height: 100%;
}

.post-toc-shell.is-open .post-toc-chevron {
  transform: rotate(180deg);
  color: var(--color-primary);
}

.post-toc-panel {
  margin-top: 0;
  border: 0;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
  background: var(--topbar-bg);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  max-height: min(48vh, 360px);
  overflow: auto;
}

.post-toc-shell.is-open .post-toc-toggle {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom-color: transparent;
}

.post-toc-shell.is-open .post-toc-panel {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.post-toc-list {
  list-style: none;
  padding: 6px;
  margin: 0;
  display: grid;
  gap: 4px;
}

.post-toc-item {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--color-secondary);
  padding: 8px 10px;
  text-align: left;
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  line-height: 1.35;
  cursor: pointer;
  transition: color var(--transition-fast), border-color var(--transition-fast),
    background var(--transition-fast);
}

.post-toc-shell.is-open .post-toc-item {
  opacity: 0;
  transform: translateY(-3px);
  animation: tocItemReveal 220ms ease-out forwards;
  animation-delay: var(--toc-delay, 0ms);
}

.post-toc-item:hover,
.post-toc-item:focus-visible {
  color: var(--color-primary);
  border-color: var(--tone-10);
  background: var(--tone-03);
}

.post-toc-item.is-active {
  color: var(--color-primary);
  border-color: var(--tone-12);
  background: var(--tone-04);
}

@keyframes tocItemReveal {
  from {
    opacity: 0;
    transform: translateY(-3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .post-toc-shell.is-open .post-toc-item {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

.post-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: clamp(0.68rem, 0.64rem + 0.18vw, 0.82rem);
  letter-spacing: 0.11em;
  font-weight: 500;
  line-height: 1.25;
  padding: 4px 0;
  text-transform: uppercase;
  color: var(--mono-label-color);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.post-back-link:hover,
.post-back-link:focus-visible {
  color: var(--color-primary);
}

.post-wrap {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 16px 18px;
}

.page-post {
  max-width: 72rem;
}

.page-post .post-back-wrap,
.page-post .post-wrap {
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: clamp(0.64rem, 0.6rem + 0.16vw, 0.78rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--post-meta-color);
}

.page-post .post-meta {
  justify-content: center;
}

.post-title {
  margin-top: 8px;
  color: var(--post-heading-color);
  font-size: clamp(2.2rem, 1.52rem + 2.45vw, 3.65rem);
  line-height: 1.07;
  max-width: 24ch;
  letter-spacing: -0.016em;
}

.page-post .post-title {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.post-subtitle {
  margin-top: 10px;
  max-width: 70ch;
  color: var(--post-subtitle-color);
  font-size: clamp(1rem, 0.94rem + 0.28vw, 1.2rem);
  line-height: 1.62;
}

.page-post .post-subtitle {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.post-content {
  margin-top: clamp(24px, 1.85vw, 38px);
  display: block;
  max-width: 78ch;
}

.page-post .post-content {
  margin-left: auto;
  margin-right: auto;
}

.post-content > * {
  margin: 0;
}

.post-content > * + * {
  margin-top: clamp(16px, 1.2vw, 24px);
}

.post-content h2 {
  font-size: clamp(1.56rem, 1.24rem + 1.06vw, 2.24rem);
  color: var(--post-heading-color);
  line-height: 1.18;
  margin-top: clamp(36px, 2.6vw, 54px);
  letter-spacing: -0.014em;
}

.post-content h3 {
  font-size: clamp(1.22rem, 1.11rem + 0.5vw, 1.54rem);
  color: var(--post-heading-color);
  line-height: 1.24;
  margin-top: clamp(26px, 1.9vw, 38px);
}

.post-content p,
.post-content li {
  color: var(--post-body-color);
  font-size: clamp(1.03rem, 0.98rem + 0.25vw, 1.18rem);
  line-height: 1.76;
}

.post-content h2:first-child,
.post-content h3:first-child {
  margin-top: 0;
}

.post-content h2 + p,
.post-content h3 + p {
  margin-top: clamp(11px, 0.8vw, 16px);
}

.post-content .post-chart-row + h2,
.post-content .post-media.post-media-chart + h2 {
  margin-top: clamp(26px, 1.8vw, 36px);
}

.post-content .post-chart-row + h3,
.post-content .post-media.post-media-chart + h3 {
  margin-top: clamp(20px, 1.4vw, 30px);
}

.post-content p + p {
  margin-top: clamp(13px, 0.95vw, 19px);
}

@media (min-width: 1200px) {
  .page-post .post-content {
    margin-top: clamp(34px, 2.25vw, 50px);
  }

  .post-content > * + * {
    margin-top: clamp(18px, 1.35vw, 28px);
  }

  .post-content h2 {
    margin-top: clamp(44px, 3vw, 66px);
  }

  .post-content h3 {
    margin-top: clamp(32px, 2.2vw, 46px);
  }

  .post-content .post-chart-row + h2,
  .post-content .post-media.post-media-chart + h2 {
    margin-top: clamp(30px, 2vw, 40px);
  }

  .post-content .post-chart-row + h3,
  .post-content .post-media.post-media-chart + h3 {
    margin-top: clamp(24px, 1.6vw, 34px);
  }
}

.post-content .katex {
  color: var(--post-body-color);
  font-size: 1.02em;
}

.post-title .katex,
.post-subtitle .katex,
.post-content h2 .katex,
.post-content h3 .katex {
  color: currentColor;
}

.post-content .katex-display {
  margin: 1.05em auto;
  overflow-x: clip;
  overflow-y: visible;
  padding: 0.1rem 0;
}

.post-content ul {
  margin-left: 0.28rem;
  margin-top: clamp(10px, 0.7vw, 14px);
  padding-left: 1.28rem;
  display: grid;
  gap: 10px;
}

.post-content ol {
  margin-left: 0.28rem;
  margin-top: clamp(10px, 0.7vw, 14px);
  padding-left: 1.32rem;
  display: grid;
  gap: 10px;
}

.post-content ul li::marker,
.post-content ol li::marker {
  color: var(--post-body-color);
}

.post-content a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.post-content a:hover,
.post-content a:focus-visible {
  color: var(--color-secondary);
}

.post-content blockquote {
  border-left: 2px solid var(--tone-20);
  margin: clamp(8px, 0.7vw, 14px) 0;
  padding: 2px 0 2px 12px;
}

.post-table-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  margin: clamp(10px, 0.8vw, 16px) auto;
  overflow-x: auto;
}

.post-table {
  width: min(100%, 860px);
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--tone-10);
  border-radius: 12px;
  overflow: hidden;
  background: transparent;
}

.post-table th,
.post-table td {
  padding: 14px 16px;
  border-right: 1px solid var(--tone-10);
  border-top: 1px solid var(--tone-10);
  vertical-align: middle;
  font-size: clamp(0.95rem, 0.91rem + 0.18vw, 1.06rem);
  line-height: 1.55;
}

.post-table thead th {
  border-top: 0;
  color: var(--post-heading-color);
  font-weight: 600;
}

.post-table tbody td {
  color: var(--post-body-color);
}

.post-table th:last-child,
.post-table td:last-child {
  border-right: 0;
}

.post-table .is-left {
  text-align: left;
}

.post-table .is-center {
  text-align: center;
}

.post-table .is-right {
  text-align: right;
}

@media (max-width: 640px) {
  .post-table th,
  .post-table td {
    padding: 12px 12px;
  }
}

.post-content code {
  font-family: var(--font-mono);
  font-size: 0.95em;
  padding: 2px 5px;
  border-radius: 5px;
  border: 1px solid var(--tone-10);
  background: var(--tone-03);
}

.post-result {
  border: 1px solid var(--tone-10);
  border-radius: 10px;
  background: var(--tone-03);
  margin: 12px 0;
  overflow: hidden;
  cursor: pointer;
}

.post-result-toggle {
  min-height: 44px;
  padding: 12px 14px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  user-select: none;
}

.post-result-summary {
  color: var(--color-primary);
  font-weight: 560;
  flex: 1 1 auto;
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.35;
}

.post-result-summary .katex {
  color: currentColor;
  white-space: normal;
  max-width: 100%;
  font-size: 1em;
}

.post-result-summary .katex-display {
  display: inline;
  margin: 0;
  overflow: visible;
  padding: 0;
}

.post-result-indicator {
  color: var(--mono-label-color);
  font-family: var(--font-mono);
  font-size: 1rem;
  line-height: 1;
  transition: transform var(--transition-fast), color var(--transition-fast);
}

.post-result.is-open .post-result-indicator {
  transform: rotate(45deg);
  color: var(--color-cta);
}

.post-result-body {
  border-top: 1px solid var(--tone-10);
  padding: 12px 14px 14px;
  position: relative;
}

.post-result-content {
  color: var(--post-body-color);
  padding-right: 30px;
}

.post-result-content p:last-child {
  margin-bottom: 0;
}

.post-result-copy {
  appearance: none;
  border: 1px solid var(--tone-12);
  background: var(--tone-02);
  color: var(--color-secondary);
  width: 24px;
  height: 24px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: absolute;
  top: 10px;
  right: 10px;
  transition: color var(--transition-fast), border-color var(--transition-fast),
    background var(--transition-fast), transform var(--transition-fast);
}

.post-result-copy svg {
  width: 13px;
  height: 13px;
}

.post-result-copy .icon-check {
  display: none;
}

.post-result-copy:hover,
.post-result-copy:focus-visible {
  color: var(--color-primary);
  border-color: var(--tone-20);
  background: var(--color-surface-2);
  transform: translateY(-1px);
}

.post-result-copy::after {
  content: attr(data-label);
  position: absolute;
  top: -10px;
  right: 0;
  transform: translate(0, -6px) scale(0.97);
  transform-origin: 100% 100%;
  padding: 8px 10px;
  border-radius: 999px;
  background: var(--color-bg);
  box-shadow: inset 0 0 0 1px var(--tone-10), 0 8px 18px var(--shadow-elev-1);
  font-family: var(--font-mono);
  font-size: var(--fs-xxs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
  color: var(--color-secondary);
  opacity: 0;
  pointer-events: none;
  transition: transform 220ms cubic-bezier(0.2, 0.78, 0.24, 1),
    opacity 150ms ease;
  z-index: 10;
}

.post-result-copy:hover::after,
.post-result-copy:focus-visible::after,
.post-result-copy:active::after,
.post-result-copy.is-copied::after {
  opacity: 1;
  transform: translate(0, 0) scale(1);
}

.post-result-copy.is-copied {
  color: var(--color-cta);
  border-color: var(--color-cta-border);
  background: var(--color-cta-soft);
}

.post-result-copy.is-copied .icon-copy {
  display: none;
}

.post-result-copy.is-copied .icon-check {
  display: block;
}

.post-content pre {
  border: 1px solid var(--tone-10);
  border-radius: 10px;
  background: var(--tone-03);
  padding: 12px 42px 10px 12px;
  overflow: auto;
  position: relative;
  scrollbar-gutter: stable both-edges;
}

.post-content pre.is-collapsible {
  --code-collapsed-height: 186px;
  max-height: none;
  padding-bottom: 40px;
  transition: none;
}

.post-content pre.is-collapsible:not(.is-collapsed) {
  padding-bottom: 58px;
}

.post-content pre.is-collapsible.is-collapsed {
  max-height: var(--code-collapsed-height);
  overflow: hidden;
}

.post-content pre.is-collapsible .code-collapse-fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 74px;
  background: linear-gradient(
    180deg,
    var(--code-fade-start) 0%,
    var(--code-fade-mid) 74%,
    var(--code-fade-end) 100%
  );
  pointer-events: none;
  opacity: 0;
  transition: none;
  z-index: 4;
}

.post-content pre.is-collapsible.is-collapsed .code-collapse-fade {
  opacity: 1;
}

.code-expand-btn {
  appearance: none;
  -webkit-appearance: none;
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--color-secondary);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 2px;
  white-space: nowrap;
  cursor: pointer;
  transition: color var(--transition-fast),
    text-decoration-color var(--transition-fast), transform var(--transition-fast);
  z-index: 5;
}

.code-expand-btn:hover,
.code-expand-btn:focus-visible {
  color: var(--color-cta);
  text-decoration-color: var(--color-cta);
}

.code-expand-btn:focus {
  outline: none;
}

.post-content pre.is-collapsible:not(.is-collapsed) .code-collapse-fade {
  display: none;
}

.post-content pre code {
  border: 0;
  background: transparent;
  padding: 0;
}

.post-content pre code.hljs {
  display: block;
  background: transparent !important;
  color: var(--color-primary) !important;
  padding: 0 !important;
  margin: 0 !important;
  line-height: 1.6;
}

.post-content pre.is-collapsible code.hljs {
  padding-bottom: 10px !important;
}

.code-actions {
  position: absolute;
  top: 7px;
  right: 8px;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.code-actions.is-sticky {
  position: fixed;
  top: 0;
  right: auto;
  z-index: 120;
}

.code-copy-btn,
.code-download-btn {
  appearance: none;
  border: 1px solid var(--tone-12);
  background: var(--tone-02);
  color: var(--color-secondary);
  width: 24px;
  height: 24px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: color var(--transition-fast), border-color var(--transition-fast),
    background var(--transition-fast), transform var(--transition-fast);
}

.code-copy-btn svg,
.code-download-btn svg {
  width: 13px;
  height: 13px;
}

.code-copy-btn .icon-check {
  display: none;
}

.code-copy-btn:hover,
.code-copy-btn:focus-visible,
.code-download-btn:hover,
.code-download-btn:focus-visible {
  color: var(--color-primary);
  border-color: var(--tone-20);
  background: var(--color-surface-2);
  transform: translateY(-1px);
}

.code-copy-btn::after,
.code-download-btn::after {
  content: attr(data-label);
  position: absolute;
  top: -10px;
  right: 0;
  transform: translate(0, -6px) scale(0.97);
  transform-origin: 100% 100%;
  padding: 8px 10px;
  border-radius: 999px;
  background: var(--color-bg);
  box-shadow: inset 0 0 0 1px var(--tone-10), 0 8px 18px var(--shadow-elev-1);
  font-family: var(--font-mono);
  font-size: var(--fs-xxs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
  color: var(--color-secondary);
  opacity: 0;
  pointer-events: none;
  transition: transform 220ms cubic-bezier(0.2, 0.78, 0.24, 1),
    opacity 150ms ease;
  z-index: 10;
}

.code-copy-btn:hover::after,
.code-copy-btn:focus-visible::after,
.code-copy-btn:active::after,
.code-copy-btn.is-copied::after,
.code-download-btn:hover::after,
.code-download-btn:focus-visible::after,
.code-download-btn:active::after,
.code-download-btn.is-downloaded::after {
  opacity: 1;
  transform: translate(0, 0) scale(1);
}

.code-copy-btn.is-copied {
  color: var(--color-cta);
  border-color: var(--color-cta-border);
  background: var(--color-cta-soft);
}

.code-copy-btn.is-copied .icon-copy {
  display: none;
}

.code-copy-btn.is-copied .icon-check {
  display: block;
}

.code-download-btn.is-downloaded {
  color: var(--color-cta);
  border-color: var(--color-cta-border);
  background: var(--color-cta-soft);
}

.post-content pre .hljs-comment,
.post-content pre .hljs-quote {
  color: var(--color-tertiary);
}

.post-content pre .hljs-keyword,
.post-content pre .hljs-selector-tag,
.post-content pre .hljs-built_in,
.post-content pre .hljs-title,
.post-content pre .hljs-type {
  color: var(--code-keyword-color);
}

.post-content pre .hljs-string,
.post-content pre .hljs-literal,
.post-content pre .hljs-number,
.post-content pre .hljs-symbol {
  color: var(--color-cta);
}

.post-content pre .hljs-variable,
.post-content pre .hljs-attr,
.post-content pre .hljs-property,
.post-content pre .hljs-params {
  color: var(--code-variable-color);
}

.post-content pre .hljs-subst,
.post-content pre .hljs-template-variable {
  color: var(--code-subtle-color);
  font-weight: 650;
}

.post-content pre.has-code-gutter {
  padding-left: 52px;
}

.post-content pre.has-code-gutter::before {
  content: attr(data-line-numbers);
  position: absolute;
  left: 0;
  top: 12px;
  width: 34px;
  text-align: right;
  color: var(--color-tertiary);
  font-family: var(--font-mono);
  font-size: 0.92em;
  line-height: 1.55;
  opacity: 1;
  white-space: pre;
  user-select: none;
  pointer-events: none;
}

.post-content pre.has-code-gutter::after {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 42px;
  width: 1px;
  background: var(--tone-10);
  pointer-events: none;
}

@media (max-width: 640px) {
  .post-content pre.has-code-gutter {
    padding-left: 46px;
  }

  .post-content pre.has-code-gutter::before {
    width: 29px;
  }

  .post-content pre.has-code-gutter::after {
    left: 36px;
  }
}

.post-media {
  width: 100%;
  margin: clamp(10px, 0.8vw, 16px) 0;
  border: 1px solid var(--tone-10);
  border-radius: 12px;
  background: var(--tone-02);
  box-shadow: inset 0 0 0 1px var(--tone-02);
  overflow: hidden;
}

.post-media:not(.post-media-video) {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.post-media.post-media-chart {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.post-chart-row {
  --post-chart-cols: 2;
  display: grid;
  grid-template-columns: repeat(var(--post-chart-cols), minmax(0, 1fr));
  gap: clamp(12px, 1vw, 18px);
  align-items: start;
  margin: clamp(10px, 0.8vw, 16px) 0;
}

.page-post .post-content .post-chart-row {
  --media-bleed: clamp(0px, 7vw, 110px);
  width: calc(100% + var(--media-bleed));
  margin-left: calc(var(--media-bleed) * -0.5);
  margin-right: calc(var(--media-bleed) * -0.5);
}

.page-post .post-content .post-chart-row > .post-media.post-media-chart {
  width: 100%;
  margin: 0;
}

.post-chart-shell {
  display: grid;
  gap: clamp(8px, 0.65vw, 12px);
  padding: clamp(14px, 1.2vw, 20px) clamp(12px, 1.2vw, 20px)
    clamp(12px, 1vw, 16px);
}

.post-chart-head {
  display: grid;
  gap: 6px;
}

.post-chart-title {
  margin: 0;
  font-family: var(--font-sans);
  font-size: clamp(1rem, 0.96rem + 0.28vw, 1.2rem);
  line-height: 1.3;
  color: var(--chart-title);
  font-weight: 600;
}

.post-chart-subtitle {
  margin: 0;
  font-family: var(--font-sans);
  font-size: clamp(0.84rem, 0.8rem + 0.2vw, 0.98rem);
  line-height: 1.4;
  color: var(--post-meta-color);
}

.post-chart-legend {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  padding-top: 0;
  text-align: center;
}

.post-chart-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 22px;
  font-family: var(--font-sans);
  font-size: clamp(0.74rem, 0.7rem + 0.18vw, 0.86rem);
  line-height: 1.2;
  color: var(--chart-label);
}

.post-chart-legend-mark {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  flex: 0 0 auto;
  box-shadow: 0 0 0 1px var(--chart-legend-ring);
}

.post-chart-canvas {
  position: relative;
  width: 100%;
  min-height: clamp(200px, 30vw, 340px);
  aspect-ratio: 16 / 8.2;
  border: 0;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(180deg, var(--chart-plot-bg) 0%, transparent 100%);
}

.post-chart-canvas svg {
  display: block;
  width: 100%;
  height: 100%;
}

.post-chart-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  height: 0;
  margin-top: -2px;
  margin-bottom: -4px;
  position: relative;
  z-index: 3;
  pointer-events: none;
}

.chart-download-btn {
  appearance: none;
  border: 1px solid var(--tone-12);
  background: var(--tone-02);
  color: var(--color-secondary);
  width: 24px;
  height: 24px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  pointer-events: auto;
  transition: color var(--transition-fast), border-color var(--transition-fast),
    background var(--transition-fast), transform var(--transition-fast);
}

.chart-download-btn svg {
  width: 13px;
  height: 13px;
}

.chart-download-btn:hover,
.chart-download-btn:focus-visible {
  color: var(--color-primary);
  border-color: var(--tone-20);
  background: var(--color-surface-2);
  transform: translateY(-1px);
}

.chart-download-btn::after {
  content: attr(data-label);
  position: absolute;
  top: -10px;
  right: 0;
  transform: translate(0, -6px) scale(0.97);
  transform-origin: 100% 100%;
  padding: 8px 10px;
  border-radius: 999px;
  background: var(--color-bg);
  box-shadow: inset 0 0 0 1px var(--tone-10), 0 8px 18px var(--shadow-elev-1);
  font-family: var(--font-mono);
  font-size: var(--fs-xxs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
  color: var(--color-secondary);
  opacity: 0;
  pointer-events: none;
  transition: transform 220ms cubic-bezier(0.2, 0.78, 0.24, 1),
    opacity 150ms ease;
  z-index: 10;
}

.chart-download-btn:hover::after,
.chart-download-btn:focus-visible::after,
.chart-download-btn:active::after,
.chart-download-btn.is-downloaded::after {
  opacity: 1;
  transform: translate(0, 0) scale(1);
}

.chart-download-btn.is-downloaded {
  color: var(--color-cta);
  border-color: var(--color-cta-border);
  background: var(--color-cta-soft);
}

.post-chart-tooltip {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 5;
  max-width: min(280px, calc(100% - 12px));
  padding: 8px 10px;
  border-radius: 12px;
  border: 0;
  background: var(--chart-tooltip-bg);
  color: var(--chart-tooltip-color);
  font-family: var(--font-sans);
  font-size: clamp(0.72rem, 0.68rem + 0.16vw, 0.84rem);
  line-height: 1.35;
  pointer-events: none;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.25);
}

.post-chart-tooltip > div + div {
  margin-top: 3px;
}

.post-chart-inline-error {
  margin: 0;
  padding: 8px 12px;
  border-top: 1px solid var(--tone-10);
  font-family: var(--font-mono);
  font-size: var(--fs-xxs);
  letter-spacing: 0.06em;
  color: var(--chart-error-color);
}

.post-chart-svg .chart-grid-line {
  stroke: var(--chart-grid);
  stroke-width: 1;
}

.post-chart-svg .chart-axis-line {
  stroke: var(--chart-axis);
  stroke-width: 1.2;
}

.post-chart-svg .chart-tick-label {
  fill: var(--chart-label);
  font-family: var(--font-mono);
  font-size: clamp(0.58rem, 0.56rem + 0.14vw, 0.72rem);
  letter-spacing: 0.04em;
}

.post-chart-svg .chart-axis-label {
  fill: var(--chart-label);
  font-family: var(--font-sans);
  font-size: clamp(0.74rem, 0.72rem + 0.16vw, 0.88rem);
}

.post-chart-svg .chart-series-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.post-chart-svg .chart-series-point {
  stroke: var(--chart-point-stroke);
  stroke-width: 1;
}

.post-chart-svg .chart-reference-line {
  stroke: var(--chart-label);
  stroke-opacity: 0.6;
  stroke-dasharray: 7 7;
  stroke-width: 1.2;
}

.post-chart-svg .chart-reference-label {
  fill: var(--chart-label);
  font-family: var(--font-sans);
  font-size: clamp(0.7rem, 0.68rem + 0.14vw, 0.82rem);
}

.post-chart-svg .chart-pie-label {
  fill: var(--chart-label);
  font-family: var(--font-sans);
  font-size: clamp(0.66rem, 0.64rem + 0.14vw, 0.8rem);
}

.post-chart-svg .chart-pie-guide {
  stroke: var(--chart-grid);
  stroke-width: 1;
}

@media (max-width: 780px) {
  .post-chart-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .post-chart-shell {
    gap: 8px;
    padding: 12px;
  }

  .post-chart-canvas {
    min-height: 196px;
  }

  .post-chart-legend {
    gap: 6px 10px;
  }
}

.page-post .post-content .post-media {
  --media-bleed: clamp(0px, 7vw, 110px);
  width: calc(100% + var(--media-bleed));
  margin-left: calc(var(--media-bleed) * -0.5);
  margin-right: calc(var(--media-bleed) * -0.5);
}

.page-post .post-content .post-chart-row > .post-media.post-media-chart {
  width: 100%;
  margin-left: 0;
  margin-right: 0;
}

.post-media img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 645px;
  margin: 0 auto;
}

.post-media video {
  display: block;
  width: 100%;
  height: auto;
  max-height: 645px;
  margin: 0 auto;
  background: #000;
}

.post-media iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  margin: 0 auto;
  background: #000;
}

.post-video-shell {
  position: relative;
  background: #000;
}

.post-video-shell video,
.post-video-shell iframe {
  display: block;
  width: 100%;
}

.post-video-shell-youtube {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
}

.post-video-shell-youtube .post-video-thumb,
.post-video-shell-youtube iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.post-video-shell-youtube .post-video-thumb {
  object-fit: cover;
  z-index: 1;
}

.post-video-shell-youtube iframe {
  opacity: 0;
  pointer-events: none;
  z-index: 2;
}

.post-video-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  display: grid;
  gap: 0;
  padding: clamp(8px, 1vw, 12px) clamp(10px, 1.1vw, 16px);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.02) 0%, rgba(0, 0, 0, 0.8) 72%);
  opacity: 1;
  transform: translateY(0);
  transition: opacity 220ms ease, transform 220ms ease;
}

.post-video-shell.is-controls-hidden .post-video-controls {
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
}

.post-video-progress {
  --progress-ratio: 0%;
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0.96) 0%,
    rgba(255, 255, 255, 0.96) var(--progress-ratio),
    rgba(255, 255, 255, 0.35) var(--progress-ratio),
    rgba(255, 255, 255, 0.35) 100%
  );
  cursor: pointer;
}

.post-video-progress:focus {
  outline: none;
}

.post-video-progress::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 0;
  height: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
}

.post-video-progress::-moz-range-thumb {
  width: 0;
  height: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
}

.post-video-progress::-moz-range-track {
  border: 0;
  background: transparent;
}

.post-video-progress-inline {
  width: auto;
  margin-left: 10px;
  flex: 1 1 auto;
  min-width: 72px;
  max-width: none;
}

.post-video-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.post-video-controls-left,
.post-video-controls-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.post-video-controls-left {
  flex: 1 1 auto;
  min-width: 0;
}

.post-video-controls-right {
  flex: 0 0 auto;
}

.post-video-control {
  appearance: none;
  -webkit-appearance: none;
  width: 28px;
  height: 28px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.92);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color var(--transition-fast), border-color var(--transition-fast),
    background var(--transition-fast), transform var(--transition-fast);
}

.post-video-control svg {
  width: 15px;
  height: 15px;
}

.post-video-control .icon-pause,
.post-video-control .icon-volume-off,
.post-video-control .icon-fullscreen-exit {
  display: none;
}

.post-video-control-play.is-playing .icon-play,
.post-video-control-mute.is-muted .icon-volume-on {
  display: none;
}

.post-video-control-play.is-playing .icon-pause,
.post-video-control-mute.is-muted .icon-volume-off {
  display: block;
}

.post-video-control-fullscreen.is-fullscreen .icon-fullscreen-enter {
  display: none;
}

.post-video-control-fullscreen.is-fullscreen .icon-fullscreen-exit {
  display: block;
}

.post-video-control-more svg {
  width: 14px;
  height: 14px;
}

.post-video-control-mute svg {
  width: 15px;
  height: 15px;
}

.post-video-control:hover,
.post-video-control:focus-visible {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.12);
}

.post-video-control:focus {
  outline: none;
}

.post-video-control-more.is-active {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.14);
}

.post-video-menu {
  position: absolute;
  right: clamp(10px, 1.1vw, 16px);
  bottom: clamp(46px, 5vw, 64px);
  z-index: 5;
  width: min(184px, calc(100% - 20px));
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  background: rgba(245, 245, 245, 0.98);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.34);
  padding: 0 0 6px;
}

.post-video-menu-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 10px 14px 8px;
}

.post-video-menu-title {
  color: #151515;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
}

.post-video-menu-current {
  color: #8f8f8f;
  font-family: var(--font-sans);
  font-size: 0.98rem;
  font-weight: 500;
  line-height: 1.2;
  justify-self: end;
}

.post-video-menu-item {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #141414;
  text-align: left;
  padding: 8px 16px;
  font-family: var(--font-sans);
  font-size: 0.98rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.post-video-menu-item:hover,
.post-video-menu-item:focus-visible {
  color: #0f0f0f;
  background: rgba(0, 0, 0, 0.06);
}

.post-video-menu-item.is-active {
  color: #0a0a0a;
  font-weight: 600;
}

.post-video-time {
  font-family: var(--font-mono);
  font-size: clamp(0.66rem, 0.62rem + 0.16vw, 0.78rem);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.92);
  white-space: nowrap;
  flex: 0 0 auto;
}

.post-video-time-sep {
  opacity: 0.7;
}

.post-video-play {
  appearance: none;
  -webkit-appearance: none;
  position: absolute;
  left: 50%;
  top: 50%;
  width: clamp(132px, 13vw, 194px);
  height: clamp(132px, 13vw, 194px);
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  transform: translate(-50%, -50%);
  background: transparent;
  color: rgba(255, 255, 255, 0.95);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
  z-index: 3;
  transition: transform var(--transition-fast), opacity var(--transition-fast),
    background var(--transition-fast), box-shadow var(--transition-fast),
    color var(--transition-fast);
}

.post-video-play::before {
  content: none;
}

.post-video-play-core {
  position: relative;
  z-index: 1;
  width: clamp(74px, 5.8vw, 94px);
  height: clamp(74px, 5.8vw, 94px);
  border-radius: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.post-video-play-core::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  border: 2.5px solid rgba(255, 255, 255, 0.28);
  border-top-color: rgba(255, 255, 255, 0.95);
  border-right-color: rgba(255, 255, 255, 0.95);
  opacity: 0;
  pointer-events: none;
  z-index: 2;
}

.post-video-shell.is-loading .post-video-play-core::after {
  opacity: 1;
  animation: postVideoRingSpin 920ms linear infinite;
}

.post-video-play-core svg {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 72%;
  height: 72%;
  margin-left: 0;
  color: #fff;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.22));
  display: block;
  pointer-events: none;
  will-change: opacity;
  transition: opacity 150ms ease;
}

.post-video-play-core .icon-center-pause {
  opacity: 0;
}

.post-video-play-core .icon-center-play {
  transform: translate(-51.2%, -50%);
}

.post-video-shell.is-playing .post-video-play-core .icon-center-play {
  opacity: 0;
}

.post-video-shell.is-playing .post-video-play-core .icon-center-pause {
  opacity: 1;
}

.post-video-play:hover,
.post-video-play:focus-visible {
  color: #fff;
  transform: translate(-50%, -50%) scale(1.03);
  box-shadow: none;
}

.post-video-play:focus {
  outline: none;
}

.post-video-shell.is-playing .post-video-play {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.96);
}

.post-video-shell.is-playing:not(.is-controls-hidden):hover .post-video-play,
.post-video-shell.is-playing:not(.is-controls-hidden):focus-within .post-video-play {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.post-video-shell-youtube.is-playing .post-video-thumb {
  opacity: 0;
  pointer-events: none;
}

.post-video-shell-youtube.is-started .post-video-thumb {
  opacity: 0;
  pointer-events: none;
}

.post-video-shell-youtube.is-playing iframe {
  opacity: 1;
  pointer-events: none;
}

.post-video-shell-youtube.is-started iframe {
  opacity: 1;
  pointer-events: none;
}

.post-video-shell.is-fallback .post-video-controls,
.post-video-shell.is-fallback .post-video-play {
  display: none;
}

.post-video-shell.is-fallback iframe {
  pointer-events: auto;
}

.post-video-shell.is-loading .post-video-play {
  opacity: 1;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(1);
}

.post-video-shell.is-loading .post-video-play-core .icon-center-play,
.post-video-shell.is-loading .post-video-play-core .icon-center-pause {
  opacity: 0;
}

@keyframes postVideoRingSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 640px) {
  .post-video-menu {
    width: min(176px, calc(100% - 18px));
    right: 9px;
    bottom: 46px;
  }

  .post-video-menu-item {
    padding: 8px 14px;
    font-size: 0.95rem;
  }

  .post-video-progress-inline {
    width: auto;
    margin-left: 6px;
    height: 9px;
    min-width: 48px;
  }

  .post-video-play {
    width: clamp(104px, 28vw, 136px);
    height: clamp(104px, 28vw, 136px);
  }

  .post-video-play::before {
    content: none;
  }

  .post-video-play-core::after {
    inset: 0;
    border-width: 2px;
  }

  .post-video-play-core {
    width: clamp(58px, 16vw, 76px);
    height: clamp(58px, 16vw, 76px);
    border-radius: 20px;
  }

  .post-video-play-core svg {
    width: 70%;
    height: 70%;
    margin-left: 0;
  }

  .post-video-controls {
    gap: 6px;
    padding: 8px 10px;
  }

  .post-video-control {
    width: 25px;
    height: 25px;
  }

  .post-video-time {
    font-size: 0.62rem;
    letter-spacing: 0.08em;
  }
}

.post-media-link {
  display: block;
}

.post-media figcaption {
  padding: 10px 12px;
  border-top: 1px solid var(--tone-10);
  font-family: var(--font-mono);
  font-size: var(--fs-xxs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--post-body-color);
  text-align: center;
}

.post-media:not(.post-media-video) figcaption {
  border-top: 0;
}

.post-facts {
  margin: 24px 0 0;
  width: 100%;
  border: 1px solid var(--tone-08);
  border-radius: 12px;
  background: var(--post-facts-bg);
  box-shadow: none;
  padding: clamp(22px, 2.4vw, 42px);
  display: grid;
  gap: clamp(18px, 1.8vw, 32px);
}

.page-post .post-facts {
  --facts-bleed: clamp(0px, 7vw, 110px);
  width: calc(100% + var(--facts-bleed));
  margin-left: calc(var(--facts-bleed) * -0.5);
  margin-right: calc(var(--facts-bleed) * -0.5);
}

.post-facts-tags {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.post-facts-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  border: 0;
  background: var(--post-facts-chip-bg);
  color: var(--post-facts-text-color);
  font-size: clamp(0.88rem, 0.82rem + 0.2vw, 1.06rem);
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: 0;
}

.post-facts-block {
  display: grid;
  gap: 10px;
}

.post-facts-title {
  font-size: clamp(0.96rem, 0.9rem + 0.18vw, 1.08rem);
  line-height: 1.35;
  font-weight: 400;
  color: var(--post-facts-title-color);
}

.post-facts-text {
  color: var(--post-facts-text-color);
  font-size: clamp(1rem, 0.95rem + 0.16vw, 1.08rem);
  line-height: 1.6;
}

.post-facts-list {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 10px;
}

.post-facts-list li {
  color: var(--post-facts-text-color);
  font-size: clamp(1rem, 0.95rem + 0.16vw, 1.08rem);
  line-height: 1.6;
}

.post-facts-numbered {
  display: grid;
  gap: 8px;
}

.post-facts-numbered-line {
  color: var(--post-facts-text-color);
  font-size: clamp(1rem, 0.95rem + 0.16vw, 1.08rem);
  line-height: 1.6;
}

.post-facts-number {
  color: var(--post-facts-text-color);
  font-variant-numeric: tabular-nums;
  margin-right: 3px;
}

.post-facts a {
  color: var(--post-facts-text-color);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.post-facts a:hover,
.post-facts a:focus-visible {
  color: var(--post-facts-link-hover);
}

.bottom-bar {
  position: relative;
  z-index: 1;
  width: 100%;
  margin: 20px 0 0;
  padding: 14px 2rem 20px;
  border-top: 1px solid var(--tone-10);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: var(--fs-xxs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mono-label-color);
  flex-shrink: 0;
}

.bottom-bar-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.bottom-bar-item::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-cta);
  box-shadow: 0 0 6px var(--color-cta-glow);
}

.bottom-bar-item span {
  color: var(--color-primary);
}

@media (max-width: 900px) {
  .top-bar {
    padding: 8px 1rem;
  }

  .page {
    padding: calc(var(--nav-height) + 12px) 1rem 1.6rem;
  }

  .page-post .post-content .post-media {
    --media-bleed: clamp(0px, 4vw, 30px);
  }

  .post-toc-shell {
    --toc-bleed: clamp(0px, 4vw, 30px);
  }

  .page-post .post-facts {
    --facts-bleed: clamp(0px, 4vw, 30px);
  }

  .post-facts {
    padding: 16px;
  }

  .post-facts-chip {
    min-height: 36px;
    padding: 0 16px;
    font-size: clamp(0.82rem, 0.8rem + 0.14vw, 0.94rem);
  }

  .post-share-item {
    width: 30px;
    height: 30px;
  }
}

@media (max-width: 700px) {
  :root {
    --nav-height: 96px;
  }

  .page-post {
    padding-top: calc(var(--nav-height) + 2px);
  }

  .post-share {
    position: static;
    margin: 12px auto 0;
    width: fit-content;
    flex-direction: row;
    transform: none;
    opacity: 1;
  }

  .post-share-item:not(:first-child)::before {
    left: -2px;
    top: 7px;
    bottom: 7px;
    width: 1px;
    height: auto;
    right: auto;
  }

  .top-bar-main {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px;
  }

  .site-title {
    padding: 4px 6px;
    align-items: flex-start;
    text-align: left;
    justify-self: start;
  }

  .site-title-row {
    gap: 6px;
  }

  .flip-text {
    font-size: var(--fs-xxs);
    letter-spacing: 0.14em;
  }

  .site-subtitle {
    display: block;
    font-size: var(--fs-xxs);
    letter-spacing: 0.12em;
    line-height: 1.2;
    white-space: normal;
    max-width: 180px;
  }

  .top-bar-right {
    gap: 8px;
  }

  .top-bar-home-link {
    min-width: 30px;
    width: 30px;
    height: 30px;
    padding: 0;
    gap: 0;
  }

  .top-bar-home-label {
    display: none;
  }

  .top-bar-right .icon-label[data-label]::after {
    display: none !important;
  }

  .contact-quick {
    padding: 2px;
    border: 1px solid var(--chip-shell-border);
    background: var(--chip-shell-bg);
    box-shadow: inset 0 0 0 1px var(--tone-02);
  }

  .contact-quick--single,
  .contact-quick:has(.contact-quick-link--primary:only-child) {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .contact-quick-link {
    width: 26px;
    height: 26px;
    border-radius: 8px;
  }

  .contact-quick--single .contact-quick-link,
  .contact-quick:has(.contact-quick-link--primary:only-child) .contact-quick-link {
    width: 30px;
    height: 30px;
    border-radius: 8px;
  }

  .contact-quick-link:not(:first-child)::before {
    display: none;
  }

  .contact-quick-link:not(.contact-quick-link--primary) {
    display: none;
  }

  .contact-quick-link--primary {
    display: inline-flex;
  }

  .theme-toggle {
    width: 30px;
    height: 30px;
  }

  .blog-head {
    padding: 0 0 12px;
  }

  .blog-stream-title {
    font-size: clamp(1.9rem, 1.4rem + 3vw, 2.5rem);
  }

  .blog-head-row {
    margin-top: 2px;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
  }

  .blog-stream-controls {
    gap: 10px;
    width: 100%;
    justify-content: flex-start;
  }

  .page-post .post-content .post-media {
    --media-bleed: 0px;
  }

  .page-post .post-facts {
    --facts-bleed: 0px;
  }

  .blog-control-item {
    font-size: var(--fs-xxs);
    letter-spacing: 0.06em;
  }

  .blog-control-item svg {
    width: 12px;
    height: 12px;
  }

  .blog-control-select {
    min-width: 84px;
    padding: 5px 22px 5px 8px;
  }

  .post-wrap {
    padding: 14px;
  }

  .post-meta {
    font-size: clamp(0.62rem, 0.6rem + 0.13vw, 0.72rem);
    letter-spacing: 0.1em;
  }

  .post-title {
    font-size: clamp(1.88rem, 1.56rem + 1.35vw, 2.34rem);
    line-height: 1.1;
  }

  .post-subtitle {
    font-size: clamp(0.96rem, 0.92rem + 0.24vw, 1.06rem);
    line-height: 1.64;
  }

  .post-content h2 {
    font-size: clamp(1.34rem, 1.2rem + 0.72vw, 1.68rem);
    line-height: 1.22;
    margin-top: clamp(24px, 1.9vw, 34px);
  }

  .post-content h3 {
    font-size: clamp(1.12rem, 1.04rem + 0.4vw, 1.3rem);
    line-height: 1.26;
    margin-top: clamp(18px, 1.3vw, 24px);
  }

  .post-content p,
  .post-content li {
    font-size: clamp(1.01rem, 0.97rem + 0.24vw, 1.1rem);
    line-height: 1.74;
  }

  .post-content > * + * {
    margin-top: clamp(13px, 0.95vw, 18px);
  }

  .post-toc-shell {
    --toc-bleed: 0px;
    width: calc(100vw - 1rem);
  }

  .post-toc-toggle {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 38px;
    padding: 8px 10px;
    gap: 8px;
  }

  .post-toc-kicker {
    display: none;
  }

  .post-toc-current {
    grid-column: 1;
    font-size: var(--fs-sm);
  }

  .post-toc-chevron {
    grid-column: 2;
  }

  .post-toc-item {
    font-size: clamp(0.84rem, 0.8rem + 0.2vw, 0.95rem);
  }

  .blog-card-link {
    padding: 12px 13px;
  }

  .blog-card-foot {
    flex-direction: column;
    align-items: flex-start;
  }

  .post-back-wrap {
    margin-bottom: 10px;
  }

  .bottom-bar {
    margin-top: 16px;
    padding: 12px 1rem 18px;
  }
}

:root[data-theme="light"] .bottom-bar-item::before {
  background: var(--status-dot-light);
  box-shadow: 0 0 4px var(--status-dot-shadow-light);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme]) .bottom-bar-item::before {
    background: var(--status-dot-light);
    box-shadow: 0 0 4px var(--status-dot-shadow-light);
  }
}

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