/*
 * Melting_Pot · personal visual layer
 * Keep this file separate from hux-blog.css so theme updates stay painless.
 */
:root {
  --ink: #142033;
  --muted: #6b7890;
  --paper: #f5f8fc;
  --card: #ffffff;
  --line: #e4eaf2;
  --accent: #11a6a1;
  --accent-deep: #087875;
  --navy: #07111f;
  --shadow: 0 16px 45px rgba(27, 51, 82, .08);
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: .01em;
  transition: background-color .28s ease, color .28s ease;
}

body::selection {
  background: rgba(17, 166, 161, .22);
}

a {
  color: var(--accent-deep);
  transition: color .2s ease, opacity .2s ease;
}

a:hover,
a:focus {
  color: var(--accent);
}

/* A quiet glass navigation bar keeps the page identity visible while scrolling. */
.navbar-custom {
  background: rgba(7, 17, 31, .18);
  border: 0;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.navbar-custom .navbar-brand,
.navbar-custom .nav li a {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .08em;
}

.navbar-custom .navbar-brand {
  font-size: 15px;
  color: #fff;
}

.navbar-custom .nav li a {
  font-size: 12px;
}

.navbar-custom .nav li a:hover,
.navbar-custom .navbar-brand:hover {
  color: #8ff5e9;
}

.nav-label {
  margin-left: 7px;
  font-family: inherit;
  font-size: 11px;
}

.theme-toggle {
  display: flex;
  align-items: center;
  gap: 1px;
  margin: 0;
  padding: 20px 15px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 800;
  line-height: 20px;
  letter-spacing: .08em;
  transition: color .2s ease, transform .2s ease;
}

.theme-toggle:hover,
.theme-toggle:focus {
  color: #8ff5e9;
  transform: translateY(-1px);
}

.theme-toggle__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  font-size: 17px;
  font-weight: 400;
  line-height: 1;
}

.navbar-custom.invert .theme-toggle,
.navbar-custom.is-fixed .theme-toggle {
  color: #404040;
}

.navbar-custom.invert .theme-toggle:hover,
.navbar-custom.is-fixed .theme-toggle:hover {
  color: var(--accent);
}

/* Home and page headers */
header.intro-header {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  min-height: 520px;
  margin-bottom: 68px;
  background-color: var(--navy);
  background-position: center;
  background-size: cover;
  box-shadow: 0 22px 60px rgba(7, 17, 31, .18);
}

header.intro-header::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(125deg, rgba(7, 17, 31, .96) 0%, rgba(7, 17, 31, .78) 43%, rgba(7, 17, 31, .28) 100%),
    linear-gradient(rgba(17, 166, 161, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 166, 161, .06) 1px, transparent 1px);
  background-size: auto, 48px 48px, 48px 48px;
  z-index: 0;
}

header.intro-header .header-mask {
  background: transparent;
}

.intro-header .site-heading,
.intro-header .page-heading,
.intro-header .post-heading {
  position: relative;
  z-index: 1;
  text-align: left;
}

.intro-header > .container {
  position: relative;
  z-index: 2;
}

/* Home digital-lab scene */
.home-hero {
  min-height: 620px;
}

.home-hero::before {
  opacity: 1;
  background:
    radial-gradient(circle at 72% 32%, rgba(24, 217, 202, .22), transparent 31%),
    radial-gradient(circle at 24% 68%, rgba(62, 87, 190, .24), transparent 35%),
    linear-gradient(118deg, rgba(4, 10, 20, .97) 4%, rgba(7, 17, 31, .9) 52%, rgba(4, 24, 38, .76) 100%);
  background-size: 130% 130%, 130% 130%, auto;
  animation: lab-aurora 14s ease-in-out infinite alternate;
}

.home-hero::after {
  position: absolute;
  z-index: 0;
  top: 38%;
  right: -20%;
  bottom: -70%;
  left: -20%;
  content: "";
  pointer-events: none;
  opacity: .38;
  background-image:
    linear-gradient(rgba(114, 238, 224, .18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(114, 238, 224, .18) 1px, transparent 1px);
  background-size: 54px 54px;
  transform: perspective(480px) rotateX(62deg) translateY(8%);
  transform-origin: center top;
  animation: lab-grid 9s linear infinite;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 28%, #000 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 28%, #000 100%);
}

.hero-particles {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.home-hero .site-heading {
  padding-top: 178px;
  padding-bottom: 150px;
}

.home-hero .site-heading::before {
  content: "// MELTING_POT / DIGITAL LAB";
}

.home-hero .site-heading h1 {
  text-shadow: 0 0 42px rgba(114, 238, 224, .13);
}

.home-hero .site-heading .subheading {
  display: inline-flex;
  align-items: center;
  min-height: 35px;
  padding: 7px 13px;
  border: 1px solid rgba(114, 238, 224, .24);
  border-radius: 6px;
  background: rgba(3, 12, 23, .44);
  color: #8ff5e9;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  letter-spacing: .09em;
  box-shadow: inset 0 0 18px rgba(17, 166, 161, .05);
  backdrop-filter: blur(8px);
}

@keyframes lab-aurora {
  0% { background-position: 0% 45%, 100% 60%, center; }
  100% { background-position: 18% 60%, 82% 42%, center; }
}

@keyframes lab-grid {
  from { background-position: 0 0, 0 0; }
  to { background-position: 0 54px, 54px 0; }
}

/* Configurable home status panel */
.home-console {
  position: relative;
  margin: 0 0 30px;
  overflow: hidden;
  border: 1px solid rgba(17, 166, 161, .27);
  border-radius: 15px;
  background:
    linear-gradient(135deg, rgba(10, 25, 42, .98), rgba(5, 15, 28, .96)),
    var(--navy);
  color: #d6e8f1;
  box-shadow: 0 18px 52px rgba(7, 17, 31, .18);
}

.home-console::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  opacity: .35;
  background: linear-gradient(transparent 50%, rgba(114, 238, 224, .025) 50%);
  background-size: 100% 4px;
}

.home-console__bar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(114, 238, 224, .12);
  color: #8299ae;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  letter-spacing: .12em;
}

.home-console__lights {
  display: inline-flex;
  gap: 6px;
}

.home-console__lights i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #33475d;
}

.home-console__lights i:first-child { background: #e46b78; }
.home-console__lights i:nth-child(2) { background: #d9ad5c; }
.home-console__lights i:last-child { background: #4ec7a0; }

.home-console__signal {
  margin-left: auto;
  color: #72eee0;
}

.home-console__signal::before {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 7px;
  border-radius: 50%;
  background: #72eee0;
  content: "";
  box-shadow: 0 0 0 0 rgba(114, 238, 224, .45);
  animation: signal-pulse 2s ease-out infinite;
}

.home-console__body {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(240px, 1fr);
  align-items: center;
  gap: 26px;
  padding: 27px 28px 29px;
}

.home-console__status {
  display: flex;
  align-items: center;
  gap: 16px;
}

.home-console__prompt {
  color: #72eee0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 25px;
  text-shadow: 0 0 18px rgba(114, 238, 224, .35);
}

.home-console__label {
  display: block;
  margin-bottom: 5px;
  color: #6f899e;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 9px;
  letter-spacing: .16em;
}

.home-console__status strong {
  color: #f2fbff;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: .03em;
}

.home-console__principles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.home-console__principles span {
  padding: 11px 8px;
  border: 1px solid rgba(114, 238, 224, .1);
  border-radius: 8px;
  background: rgba(114, 238, 224, .035);
  color: #a9becd;
  text-align: center;
  font-size: 11px;
}

.home-console__principles i {
  display: block;
  margin-bottom: 4px;
  color: #3faea8;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 8px;
  font-style: normal;
}

@keyframes signal-pulse {
  70% { box-shadow: 0 0 0 7px rgba(95, 168, 121, 0); }
  100% { box-shadow: 0 0 0 0 rgba(95, 168, 121, 0); }
}

.intro-header .site-heading h1,
.intro-header .page-heading h1,
.intro-header .post-heading h1 {
  max-width: 760px;
  margin-bottom: 24px;
  color: #fff;
  font-size: clamp(42px, 7vw, 78px);
  font-weight: 800;
  letter-spacing: -.055em;
  line-height: 1.05;
}

.intro-header .site-heading .subheading,
.intro-header .page-heading .subheading,
.intro-header .post-heading .subheading {
  color: #a9bed1;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: .05em;
}

.intro-header .site-heading::before,
.intro-header .page-heading::before,
.intro-header .post-heading::before {
  display: block;
  margin-bottom: 18px;
  color: #72eee0;
  content: "// personal knowledge base";
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.intro-header .post-heading::before {
  content: "// field notes";
}

.home-hero .site-heading::before {
  content: "// MELTING_POT / DIGITAL LAB";
}

/* Article list */
.postlist-container {
  position: relative;
}

.post-preview {
  margin: 0 0 22px;
  padding: 30px 34px 26px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--shadow);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.post-preview:hover {
  border-color: rgba(17, 166, 161, .38);
  box-shadow: 0 22px 55px rgba(27, 51, 82, .13);
  transform: translateY(-4px);
}

.post-preview.tilt-card {
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  --glow-x: 50%;
  --glow-y: 50%;
  overflow: hidden;
  transform: perspective(900px) translateY(0) rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
  transform-style: preserve-3d;
  will-change: transform;
}

.post-preview.tilt-card::before {
  position: absolute;
  z-index: 0;
  inset: 0;
  border-radius: inherit;
  content: "";
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at var(--glow-x) var(--glow-y), rgba(17, 166, 161, .16), transparent 34%);
  transition: opacity .25s ease;
}

.post-preview.tilt-card:hover {
  transform: perspective(900px) translateY(-5px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
}

.post-preview.tilt-card:hover::before {
  opacity: 1;
}

.post-preview.tilt-card > * {
  position: relative;
  z-index: 1;
}

.post-preview > a > .post-title {
  margin-top: 0;
  color: var(--ink);
  font-size: 25px;
  font-weight: 750;
  letter-spacing: -.025em;
  line-height: 1.35;
}

.post-preview > a > .post-subtitle {
  color: var(--accent-deep);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.7;
}

.post-preview .post-content-preview {
  color: var(--muted);
  font-size: 14px;
  font-style: normal;
  line-height: 1.9;
}

.post-preview > .post-meta {
  margin: 20px 0 0;
  color: #98a5b6;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  letter-spacing: .04em;
}

.postlist-container > hr,
.post-preview + hr {
  display: none;
}

/* Sidebar and tags */
.sidebar-container {
  color: var(--muted);
}

.sidebar-container > section,
.sidebar-container > .short-about {
  padding: 24px 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, .75);
  box-shadow: 0 10px 30px rgba(27, 51, 82, .05);
}

.sidebar-container h5,
.sidebar-container h5 a {
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  letter-spacing: .12em;
}

.sidebar-container .short-about img {
  width: 84px;
  height: 84px;
  border: 0;
  box-shadow: 0 10px 24px rgba(17, 166, 161, .2);
}

.avatar-orbit {
  position: relative;
  width: 94px;
  height: 94px;
  margin: 2px 0 22px;
  padding: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .95);
  box-shadow: 0 12px 32px rgba(17, 166, 161, .2);
  transition: transform .3s ease, box-shadow .3s ease;
}

.avatar-orbit::before,
.avatar-orbit::after {
  position: absolute;
  content: "";
  pointer-events: none;
  border-radius: 50%;
}

.avatar-orbit::before {
  inset: -5px;
  border: 1px solid rgba(17, 166, 161, .32);
  border-top-color: #72eee0;
  border-right-color: transparent;
  animation: avatar-orbit 9s linear infinite;
}

.avatar-orbit::after {
  inset: -10px;
  border: 1px dashed rgba(17, 166, 161, .17);
  animation: avatar-orbit 15s linear infinite reverse;
}

.sidebar-container .short-about .avatar-orbit img {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: none;
  transition: transform .35s ease;
}

.avatar-orbit:hover {
  box-shadow: 0 15px 38px rgba(17, 166, 161, .3);
  transform: scale(1.035);
}

.avatar-orbit:hover img {
  transform: scale(1.035);
}

@keyframes avatar-orbit {
  to { transform: rotate(360deg); }
}

.sidebar-container .short-about p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

.sidebar-container .tags a {
  border-color: var(--line);
  color: var(--accent-deep);
  background: #fff;
}

/* Long-form reading */
.post-container {
  color: #36455c;
  font-size: 16px;
  line-height: 1.95;
}

.post-container h1,
.post-container h2,
.post-container h3,
.post-container h4 {
  color: var(--ink);
  font-weight: 750;
  letter-spacing: -.025em;
}

.post-container blockquote {
  margin: 28px 0;
  padding: 16px 22px;
  border-left: 3px solid var(--accent);
  border-radius: 0 10px 10px 0;
  background: rgba(17, 166, 161, .07);
  color: #51627a;
}

.post-container code {
  border-radius: 4px;
  background: #eaf2f5;
  color: var(--accent-deep);
}

.post-container table {
  display: block;
  width: 100%;
  margin: 28px 0 34px;
  overflow-x: auto;
  border-collapse: collapse;
  border-spacing: 0;
  font-size: 14px;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}

.post-container th,
.post-container td {
  padding: 12px 16px;
  border: 1px solid var(--line);
  text-align: left;
}

.post-container th {
  background: #eaf2f5;
  color: var(--ink);
  font-weight: 700;
}

.post-container tr:nth-child(even) td {
  background: rgba(255, 255, 255, .58);
}

.post-container .MathJax_SVG_Display {
  max-width: 100%;
  padding: 8px 0;
  overflow-x: auto;
  overflow-y: hidden;
}

/* Progressive enhancement: content is visible until JavaScript opts in. */
.motion-ready [data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity .58s ease var(--reveal-delay, 0ms),
    transform .68s cubic-bezier(.2, .72, .2, 1) var(--reveal-delay, 0ms);
}

.motion-ready [data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

.motion-ready [data-chapter-reveal] {
  transform: translateX(-12px);
}

.motion-ready [data-chapter-reveal].is-visible {
  transform: translateX(0);
}

.reading-progress {
  position: fixed;
  z-index: 1040;
  top: 59px;
  right: 0;
  left: 0;
  height: 2px;
  overflow: hidden;
  pointer-events: none;
  background: rgba(7, 17, 31, .08);
}

.reading-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #087875, #72eee0);
  box-shadow: 0 0 10px rgba(114, 238, 224, .55);
  transform: scaleX(0);
  transform-origin: left center;
  will-change: transform;
}

footer {
  margin-top: 80px;
  border-top: 1px solid var(--line);
  background: var(--navy);
}

footer .copyright,
footer .copyright a {
  color: #8ca1b8;
}

footer .copyright a:hover {
  color: #72eee0;
}

/* Day/night theme. The digital-lab hero intentionally remains dark. */
html[data-theme="dark"] {
  --ink: #e7f2f7;
  --muted: #94a8b8;
  --paper: #07111f;
  --card: #0d1b2b;
  --line: #20364a;
  --accent: #32c9c0;
  --accent-deep: #72eee0;
  --shadow: 0 18px 48px rgba(0, 0, 0, .22);
}

html[data-theme="dark"] body {
  background: var(--paper);
  color: var(--ink);
}

html[data-theme="dark"] .post-preview,
html[data-theme="dark"] .sidebar-container > section,
html[data-theme="dark"] .sidebar-container > .short-about {
  border-color: var(--line);
  background: rgba(13, 27, 43, .92);
  box-shadow: 0 16px 42px rgba(0, 0, 0, .2);
}

html[data-theme="dark"] .post-preview:hover {
  border-color: rgba(50, 201, 192, .48);
  box-shadow: 0 22px 55px rgba(0, 0, 0, .28);
}

html[data-theme="dark"] .post-preview .post-content-preview,
html[data-theme="dark"] .post-container,
html[data-theme="dark"] .sidebar-container,
html[data-theme="dark"] .sidebar-container .short-about p {
  color: #a8bac8;
}

html[data-theme="dark"] .post-preview > .post-meta {
  color: #71889b;
}

html[data-theme="dark"] .sidebar-container .tags a,
html[data-theme="dark"] #tag_cloud a,
html[data-theme="dark"] #tag_cloud .tag {
  border-color: var(--line);
  background: #102235;
  color: #91dcd7 !important;
}

html[data-theme="dark"] .post-container blockquote {
  background: rgba(50, 201, 192, .09);
  color: #a8bdca;
}

html[data-theme="dark"] .post-container code {
  background: #10283a;
  color: #8ff5e9;
}

html[data-theme="dark"] .post-container th {
  background: #10283a;
  color: var(--ink);
}

html[data-theme="dark"] .post-container th,
html[data-theme="dark"] .post-container td {
  border-color: var(--line);
}

html[data-theme="dark"] .post-container tr:nth-child(even) td {
  background: rgba(255, 255, 255, .025);
}

html[data-theme="dark"] hr,
html[data-theme="dark"] .post-container h2::before {
  border-color: var(--line);
}

html[data-theme="dark"] select,
html[data-theme="dark"] .pager li > a,
html[data-theme="dark"] .pager li > span {
  border-color: var(--line);
  background: var(--card);
  color: var(--ink);
}

html[data-theme="dark"] .side-catalog .catalog-body .active {
  background: #10283a;
}

html[data-theme="dark"] .search-page {
  background: #07111f;
}

html[data-theme="dark"] .search-page #search-input {
  color: var(--ink);
  background: transparent;
}

html[data-theme="dark"] .search-icon a,
html[data-theme="dark"] .search-icon-close {
  color: var(--ink);
}

html[data-theme="dark"] .navbar-custom.is-fixed,
html[data-theme="dark"] .navbar-custom.invert {
  border-bottom-color: rgba(114, 238, 224, .12);
  background: rgba(7, 17, 31, .92);
}

html[data-theme="dark"] .navbar-custom.is-fixed .navbar-brand,
html[data-theme="dark"] .navbar-custom.is-fixed .nav li a,
html[data-theme="dark"] .navbar-custom.invert .navbar-brand,
html[data-theme="dark"] .navbar-custom.invert .nav li a,
html[data-theme="dark"] .navbar-custom.is-fixed .theme-toggle,
html[data-theme="dark"] .navbar-custom.invert .theme-toggle {
  color: #e7f2f7;
}

html[data-theme="dark"] .navbar-custom.is-fixed .nav li a:hover,
html[data-theme="dark"] .navbar-custom.invert .nav li a:hover,
html[data-theme="dark"] .navbar-custom.is-fixed .theme-toggle:hover,
html[data-theme="dark"] .navbar-custom.invert .theme-toggle:hover {
  color: #8ff5e9;
}

html[data-theme="dark"] .avatar-orbit {
  background: #102235;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .32);
}

@media (max-width: 767px) {
  .navbar-custom {
    background: rgba(7, 17, 31, .84);
  }

  .theme-toggle {
    width: 100%;
    padding: 10px 15px;
    color: #404040;
    text-align: left;
  }

  .theme-toggle .nav-label {
    display: inline;
  }

  html[data-theme="dark"] .navbar-default .navbar-collapse {
    background: #0d1b2b;
  }

  html[data-theme="dark"] .theme-toggle {
    color: #e7f2f7;
  }

  header.intro-header {
    min-height: 450px;
    margin-bottom: 42px;
  }

  .home-hero {
    min-height: 520px;
  }

  .home-hero .site-heading {
    padding-top: 142px;
    padding-bottom: 116px;
  }

  .home-hero::after {
    top: 46%;
    opacity: .26;
  }

  .home-console__bar {
    padding: 0 13px;
    font-size: 9px;
  }

  .home-console__body {
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 23px 20px 24px;
  }

  .home-console__principles {
    grid-template-columns: repeat(3, 1fr);
  }

  .home-console__principles span {
    padding: 10px 4px;
    font-size: 10px;
  }

  .avatar-orbit::before,
  .avatar-orbit::after {
    animation: none;
  }

  .reading-progress {
    top: 55px;
  }

  .intro-header .site-heading,
  .intro-header .page-heading,
  .intro-header .post-heading {
    text-align: left;
  }

  .intro-header .site-heading h1,
  .intro-header .page-heading h1,
  .intro-header .post-heading h1 {
    font-size: 46px;
  }

  .post-preview {
    padding: 24px 22px 21px;
    border-radius: 13px;
  }

  .post-preview > a > .post-title {
    font-size: 22px;
  }

  .nav-label {
    display: none;
  }

  .theme-toggle .theme-toggle__label {
    display: inline;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .home-hero::before,
  .home-hero::after,
  .home-console__signal::before,
  .avatar-orbit::before,
  .avatar-orbit::after {
    animation: none;
  }

  .hero-particles {
    display: none;
  }

  .motion-ready [data-reveal],
  .motion-ready [data-chapter-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .post-preview,
  .avatar-orbit,
  .avatar-orbit img {
    transition-duration: .01ms;
  }
}

/* Neutral editorial palette: charcoal, paper white and layered grays. */
:root {
  --ink: #242424;
  --muted: #707070;
  --paper: #f5f5f3;
  --card: #ffffff;
  --line: #dededb;
  --accent: #4a4a4a;
  --accent-deep: #242424;
  --navy: #181818;
  --shadow: 0 16px 45px rgba(0, 0, 0, .08);
}

html[data-theme="dark"] {
  --ink: #e6e6e6;
  --muted: #a0a0a0;
  --paper: #202126;
  --card: #292a30;
  --line: #3b3c43;
  --accent: #c7c7c7;
  --accent-deep: #ededed;
  --navy: #18191e;
  --shadow: 0 18px 48px rgba(0, 0, 0, .28);
}

body::selection {
  background: rgba(0, 0, 0, .18);
}

a,
.post-container a,
.sidebar-container a,
.post-container a:hover,
.post-container a:focus {
  color: var(--accent-deep) !important;
}

a:hover,
a:focus {
  color: var(--accent) !important;
}

/* The brand sits on the permanently dark header, so it stays white in both themes. */
.navbar-custom .navbar-brand,
.navbar-custom .navbar-brand:hover,
.navbar-custom .navbar-brand:focus {
  color: #fff !important;
}

/* Social icons keep the daytime contrast in both themes. */
footer .list-inline .fa-circle,
.sidebar-container .short-about .list-inline .fa-circle {
  color: #000000 !important;
}

footer .list-inline .fa-inverse,
.sidebar-container .short-about .list-inline .fa-inverse {
  color: #fafafac2 !important;
}

footer .list-inline a:hover .fa-circle,
.sidebar-container .short-about .list-inline a:hover .fa-circle {
  color: #060606 !important;
}

.navbar-custom .navbar-brand:hover,
.navbar-custom .nav li a:hover,
.theme-toggle:hover,
.theme-toggle:focus {
  color: #e5e5e5;
}

.navbar-custom {
  background: rgba(24, 24, 24, .35);
}

header.intro-header::before {
  background:
    linear-gradient(125deg, rgba(10, 10, 10, .96) 0%, rgba(20, 20, 20, .8) 43%, rgba(20, 20, 20, .3) 100%),
    linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
}

.home-hero::before {
  background:
    radial-gradient(circle at 72% 32%, rgba(255, 255, 255, .09), transparent 31%),
    radial-gradient(circle at 24% 68%, rgba(180, 180, 180, .08), transparent 35%),
    linear-gradient(118deg, rgba(5, 5, 5, .98) 4%, rgba(20, 20, 20, .93) 52%, rgba(27, 27, 27, .84) 100%);
}

.home-hero::after {
  background-image:
    linear-gradient(rgba(255, 255, 255, .1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .1) 1px, transparent 1px);
}

.home-hero .site-heading .subheading {
  border-color: rgba(255, 255, 255, .28);
  background: rgba(0, 0, 0, .34);
  color: #e1e1e1;
  box-shadow: inset 0 0 18px rgba(255, 255, 255, .025);
}

.home-hero .site-heading::before {
  color: #d0d0d0;
}

.home-console {
  border-color: #484848;
  background: linear-gradient(135deg, #1d1d1d, #111111);
  color: #d8d8d8;
  box-shadow: 0 18px 52px rgba(0, 0, 0, .2);
}

.home-console::after {
  background: linear-gradient(transparent 50%, rgba(255, 255, 255, .025) 50%);
}

.home-console__bar {
  border-bottom-color: #353535;
  color: #909090;
}

/* .home-console__lights i, */
.home-console__lights i:first-child {
  background: #ff5f57;
}
.home-console__lights i:nth-child(2) {
  background: #32c759; /* 绿色 */
}
.home-console__lights i:last-child {
  background: #0a84ff; /* 蓝色 */
}

.home-console__signal,
.home-console__signal::before,
.home-console__prompt,
.home-console__prompt + div strong {
  color: #ededed;
}

.home-console__signal::before {
  background: #ededed;
  box-shadow: 0 0 0 0 rgba(255, 255, 255, .28);
}

.home-console__label,
.home-console__principles i {
  color: #929292;
}

.home-console__principles span {
  border-color: #3b3b3b;
  background: rgba(255, 255, 255, .035);
  color: #c5c5c5;
}

.post-preview:hover {
  border-color: #a3a3a3;
  box-shadow: 0 22px 55px rgba(0, 0, 0, .13);
}

.post-preview.tilt-card::before {
  background: radial-gradient(circle at var(--glow-x) var(--glow-y), rgba(0, 0, 0, .08), transparent 34%);
}

.sidebar-container .tags a,
#tag_cloud a,
#tag_cloud .tag {
  border-color: var(--line) !important;
  background: var(--card) !important;
  color: var(--accent-deep) !important;
}

.avatar-orbit {
  border-color: #d0d0d0;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .16);
}

.avatar-orbit::before {
  border-color: #777;
  border-top-color: #1f1f1f;
  border-right-color: transparent;
}

.avatar-orbit::after {
  border-color: rgba(80, 80, 80, .34);
}

.post-container blockquote {
  border-left-color: #555;
  background: rgba(0, 0, 0, .045);
  color: #606060;
}

.post-container code {
  background: #eeeeec;
  color: #333;
}

.post-container th {
  background: #e9e9e7;
}

.reading-progress span {
  background: linear-gradient(90deg, #333, #999);
  box-shadow: 0 0 10px rgba(0, 0, 0, .28);
}

footer .copyright a:hover {
  color: #f0f0f0 !important;
}

html[data-theme="dark"] .post-container blockquote {
  background: rgba(255, 255, 255, .055);
  color: #bdbdbd;
}

html[data-theme="dark"] .post-container code {
  background: #36373d;
  color: #e2e2e2;
}

html[data-theme="dark"] .post-container th {
  background: #36373d;
}

html[data-theme="dark"] .post-container tr:nth-child(even) td {
  background: rgba(255, 255, 255, .035);
}

html[data-theme="dark"] .avatar-orbit {
  border-color: #4a4a4a;
  background: #292a30;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .36);
}

html[data-theme="dark"] .avatar-orbit::before {
  border-color: #8a8a8a;
  border-top-color: #efefef;
  border-right-color: transparent;
}

html[data-theme="dark"] .avatar-orbit::after {
  border-color: rgba(210, 210, 210, .2);
}

html[data-theme="dark"] .post-preview:hover {
  border-color: #777;
}

html[data-theme="dark"] .post-preview.tilt-card::before {
  background: radial-gradient(circle at var(--glow-x) var(--glow-y), rgba(255, 255, 255, .08), transparent 34%);
}

html[data-theme="dark"] .navbar-custom,
html[data-theme="dark"] .navbar-custom.is-fixed,
html[data-theme="dark"] .navbar-custom.invert {
  background: rgba(24, 25, 30, .94);
}

html[data-theme="dark"] .navbar-custom .navbar-brand:hover,
html[data-theme="dark"] .navbar-custom .nav li a:hover,
html[data-theme="dark"] .theme-toggle:hover,
html[data-theme="dark"] .theme-toggle:focus {
  color: #fff;
}

html[data-theme="dark"] .search-page {
  background: #202126;
}

html[data-theme="dark"] .post-preview,
html[data-theme="dark"] .sidebar-container > section,
html[data-theme="dark"] .sidebar-container > .short-about {
  border-color: #3b3c43 !important;
  background: #292a30 !important;
}

html[data-theme="dark"] .sidebar-container .tags a,
html[data-theme="dark"] #tag_cloud a,
html[data-theme="dark"] #tag_cloud .tag {
  border-color: #4a4b51 !important;
  background: #292a30 !important;
  color: #d6d6d6 !important;
}

/* A restrained green accent is reserved for the home status console. */
.home-console {
  border-color: rgba(84, 145, 105, .58);
}

.home-console__signal,
.home-console__prompt,
.home-console__principles i {
  color: #4f8f68;
}

.home-console__signal::before {
  background: #5fa879;
  box-shadow: 0 0 0 0 rgba(95, 168, 121, .25);
}

.home-console__principles span {
  border-color: rgba(84, 145, 105, .22);
}

html[data-theme="dark"] .home-console {
  border-color: rgba(126, 179, 143, .52);
}

html[data-theme="dark"] .home-console__signal,
html[data-theme="dark"] .home-console__prompt,
html[data-theme="dark"] .home-console__principles i {
  color: #98c5a3;
}

html[data-theme="dark"] .home-console__signal::before {
  background: #98c5a3;
  box-shadow: 0 0 0 0 rgba(152, 197, 163, .25);
}

html[data-theme="dark"] .home-console__principles span {
  border-color: rgba(126, 179, 143, .22);
}

/*
 * Theme contrast contract
 *
 * The original theme, the digital-lab layer and the later neutral palette all
 * define colors.  This final section is intentionally authoritative: every
 * reusable surface reads from the same semantic variables, while the header,
 * footer and console remain dark in both modes.
 */
:root {
  --ink: #242424;
  --muted: #626262;
  --paper: #f5f5f3;
  --card: #ffffff;
  --surface-soft: #ececea;
  --line: #d8d8d4;
  --accent: #3d7755;
  --accent-deep: #2f6849;
  --accent-soft: #e5efe8;
  --header-bg: #18191b;
  --header-ink: #f7f7f7;
  --header-muted: #d0d0d0;
  --code-bg: #ececea;
  --code-ink: #303030;
  --shadow: 0 16px 45px rgba(0, 0, 0, .08);
}

html[data-theme="dark"] {
  --ink: #ececee;
  --muted: #b4b4b7;
  --paper: #202126;
  --card: #292a30;
  --surface-soft: #34353b;
  --line: #45464e;
  --accent: #91c39f;
  --accent-deep: #9bcaa8;
  --accent-soft: #303e35;
  --header-bg: #18191e;
  --header-ink: #f7f7f7;
  --header-muted: #d0d0d2;
  --code-bg: #36373d;
  --code-ink: #ececee;
  --shadow: 0 18px 48px rgba(0, 0, 0, .28);
}

body,
.post-container,
.sidebar-container {
  color: var(--ink);
}

body,
.post-preview,
.sidebar-container > section,
.sidebar-container > .short-about,
.search-page,
.pager li > a,
.pager li > span,
select {
  transition: background-color .24s ease, border-color .24s ease, color .24s ease, box-shadow .24s ease;
}

body::selection,
::selection {
  background: var(--accent-soft);
  color: var(--ink);
}

/* Avoid the browser's rectangular click ring while keeping quieter focus feedback. */
a,
button,
summary,
[role="button"] {
  -webkit-tap-highlight-color: transparent;
}

a:focus,
a:focus-visible,
button:focus,
button:focus-visible,
summary:focus,
summary:focus-visible,
[role="button"]:focus,
[role="button"]:focus-visible {
  outline: 0;
  box-shadow: none;
}

a:focus-visible {
  text-decoration-color: currentColor;
  text-decoration-thickness: 2px;
}

button:focus-visible,
summary:focus-visible,
[role="button"]:focus-visible {
  filter: brightness(1.08);
}

button::-moz-focus-inner {
  border: 0;
}

/* Navigation always sits on a dark bar, independent of the reading theme. */
.navbar-custom,
.navbar-custom.invert,
html[data-theme="dark"] .navbar-custom,
html[data-theme="dark"] .navbar-custom.invert {
  border-bottom-color: rgba(255, 255, 255, .09) !important;
  background: rgba(24, 25, 27, .88) !important;
}

.navbar-custom .navbar-brand,
.navbar-custom .navbar-brand:hover,
.navbar-custom .navbar-brand:focus,
.navbar-custom .nav li a,
.navbar-custom .nav li a:hover,
.navbar-custom .nav li a:focus,
.navbar-custom.invert .navbar-brand,
.navbar-custom.invert .nav li a,
.navbar-custom.is-fixed .navbar-brand,
.navbar-custom.is-fixed .nav li a,
.theme-toggle,
.navbar-custom.invert .theme-toggle,
.navbar-custom.is-fixed .theme-toggle {
  color: var(--header-ink) !important;
}

.navbar-custom .nav li a:hover,
.navbar-custom .nav li a:focus,
.navbar-custom .navbar-brand:hover,
.navbar-custom .navbar-brand:focus,
.theme-toggle:hover,
.theme-toggle:focus {
  color: #d8e7dc !important;
}

.navbar-custom .navbar-toggle,
.navbar-custom.invert .navbar-toggle {
  border-color: rgba(255, 255, 255, .32);
}

.navbar-custom .navbar-toggle .icon-bar,
.navbar-custom.invert .navbar-toggle .icon-bar {
  background-color: var(--header-ink);
}

.navbar-custom .navbar-toggle:hover,
.navbar-custom .navbar-toggle:focus,
.navbar-custom .navbar-toggle:active {
  background: rgba(255, 255, 255, .1);
}

@media only screen and (min-width: 1170px) {
  .navbar-custom.is-fixed,
  html[data-theme="dark"] .navbar-custom.is-fixed {
    border-bottom-color: rgba(255, 255, 255, .1) !important;
    background: rgba(24, 25, 27, .96) !important;
  }
}

@media only screen and (max-width: 767px) {
  .navbar-default .navbar-collapse,
  html[data-theme="dark"] .navbar-default .navbar-collapse {
    border: 1px solid rgba(255, 255, 255, .1);
    background: #202126;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .3);
  }

  .navbar-custom .nav li a,
  .navbar-custom.invert .nav li a,
  .navbar-custom .theme-toggle,
  html[data-theme="dark"] .navbar-custom .theme-toggle {
    color: var(--header-ink) !important;
  }
}

/* Header copy is designed against the permanent dark image mask. */
.intro-header .site-heading h1,
.intro-header .page-heading h1,
.intro-header .post-heading h1 {
  color: var(--header-ink);
}

.intro-header .site-heading .subheading,
.intro-header .page-heading .subheading,
.intro-header .post-heading .subheading,
.intro-header .post-heading .meta {
  color: var(--header-muted);
}

.intro-header .site-heading::before,
.intro-header .page-heading::before,
.intro-header .post-heading::before,
.home-hero .site-heading::before {
  color: #91c39f;
}

.intro-header .tags a,
.intro-header .tags .tag,
.intro-header .post-heading .meta a {
  border-color: rgba(255, 255, 255, .68) !important;
  background: rgba(0, 0, 0, .18) !important;
  color: var(--header-ink) !important;
}

.intro-header .tags a:hover,
.intro-header .tags a:focus,
.intro-header .tags .tag:hover,
.intro-header .tags .tag:focus {
  border-color: #b5d4bd !important;
  background: rgba(145, 195, 159, .18) !important;
  color: #f7fff9 !important;
}

/* Home cards and metadata use the active reading palette. */
.post-preview,
.sidebar-container > section,
.sidebar-container > .short-about,
html[data-theme="dark"] .post-preview,
html[data-theme="dark"] .sidebar-container > section,
html[data-theme="dark"] .sidebar-container > .short-about {
  border-color: var(--line) !important;
  background: var(--card) !important;
  color: var(--ink);
  box-shadow: var(--shadow);
}

.post-preview > a > .post-title,
.mini-post-list .post-preview > a .post-title,
.sidebar-container h5,
.sidebar-container h5 a {
  color: var(--ink) !important;
}

.post-preview > a > .post-subtitle,
.mini-post-list .post-preview > a .post-subtitle {
  color: var(--muted) !important;
}

.post-preview .post-content-preview,
.post-preview > .post-meta,
.sidebar-container,
.sidebar-container .short-about p,
html[data-theme="dark"] .post-preview .post-content-preview,
html[data-theme="dark"] .post-preview > .post-meta,
html[data-theme="dark"] .sidebar-container,
html[data-theme="dark"] .sidebar-container .short-about p {
  color: var(--muted);
}

.post-preview:hover,
html[data-theme="dark"] .post-preview:hover {
  border-color: var(--accent) !important;
}

.post-preview.tilt-card::before,
html[data-theme="dark"] .post-preview.tilt-card::before {
  background: radial-gradient(circle at var(--glow-x) var(--glow-y), rgba(79, 143, 104, .12), transparent 36%);
}

.sidebar-container .tags a,
html[data-theme="dark"] .sidebar-container .tags a {
  border-color: var(--line) !important;
  background: var(--card) !important;
  color: var(--ink) !important;
}

.sidebar-container .tags a:hover,
.sidebar-container .tags a:focus,
html[data-theme="dark"] .sidebar-container .tags a:hover,
html[data-theme="dark"] .sidebar-container .tags a:focus {
  border-color: var(--accent) !important;
  background: var(--accent-soft) !important;
  color: var(--accent-deep) !important;
}

/* The console is intentionally the same dark component in both modes. */
.home-console,
html[data-theme="dark"] .home-console {
  border-color: rgba(126, 179, 143, .58);
  background: linear-gradient(135deg, #1d1d1d, #111111);
  color: #dedede;
}

.home-console__signal,
.home-console__prompt,
.home-console__principles i,
html[data-theme="dark"] .home-console__signal,
html[data-theme="dark"] .home-console__prompt,
html[data-theme="dark"] .home-console__principles i {
  color: #91c39f;
}

.home-console__signal::before,
html[data-theme="dark"] .home-console__signal::before {
  background: #91c39f;
  box-shadow: 0 0 0 0 rgba(145, 195, 159, .25);
}

.home-console__label,
.home-console__bar {
  color: #a3a3a3;
}

.home-console__status strong {
  color: #f2f2f2;
}

.home-console__principles span,
html[data-theme="dark"] .home-console__principles span {
  border-color: rgba(145, 195, 159, .24);
  background: rgba(145, 195, 159, .035);
  color: #d0d0d0;
}

.avatar-orbit::before,
html[data-theme="dark"] .avatar-orbit::before {
  border-color: rgba(61, 119, 85, .5);
  border-top-color: var(--accent);
  border-right-color: transparent;
}

.avatar-orbit::after,
html[data-theme="dark"] .avatar-orbit::after {
  border-color: rgba(61, 119, 85, .28);
}

/* Long-form content, controls and generated MathJax inherit readable colors. */
.post-container,
html[data-theme="dark"] .post-container {
  color: var(--ink);
}

.post-container h1,
.post-container h2,
.post-container h3,
.post-container h4,
.post-container h5,
.post-container h6 {
  color: var(--ink);
}

.post-container a:not(.anchorjs-link) {
  color: var(--accent-deep) !important;
  text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent);
  text-underline-offset: .16em;
}

.post-container a:not(.anchorjs-link):hover,
.post-container a:not(.anchorjs-link):focus {
  color: var(--accent) !important;
  text-decoration-color: currentColor;
}

.post-container blockquote,
html[data-theme="dark"] .post-container blockquote {
  border-left-color: var(--accent);
  background: var(--accent-soft);
  color: var(--muted);
}

.post-container code,
html[data-theme="dark"] .post-container code {
  background: var(--code-bg);
  color: var(--code-ink);
}

.post-container pre,
.post-container .highlight,
.post-container .highlighter-rouge .highlight {
  border-color: #45464e;
  background: #222329;
  color: #e5e5e7;
}

.post-container pre code,
.post-container .highlight code,
html[data-theme="dark"] .post-container pre code,
html[data-theme="dark"] .post-container .highlight code {
  background: transparent;
  color: inherit;
}

.post-container th,
html[data-theme="dark"] .post-container th {
  border-color: var(--line);
  background: var(--surface-soft);
  color: var(--ink);
}

.post-container td,
html[data-theme="dark"] .post-container td {
  border-color: var(--line);
  color: var(--ink);
}

.post-container tr:nth-child(even) td,
html[data-theme="dark"] .post-container tr:nth-child(even) td {
  background: color-mix(in srgb, var(--card) 68%, transparent);
}

.post-container mark {
  border-radius: 3px;
  background: var(--accent-soft);
  color: var(--ink);
}

.post-container .MathJax,
.post-container .MathJax_Display,
.post-container .MathJax_SVG_Display {
  color: var(--ink) !important;
}

.reading-progress {
  background: rgba(36, 36, 36, .12);
}

html[data-theme="dark"] .reading-progress {
  background: rgba(255, 255, 255, .1);
}

.reading-progress span,
html[data-theme="dark"] .reading-progress span {
  background: linear-gradient(90deg, #3d7755, #91c39f);
  box-shadow: 0 0 10px rgba(79, 143, 104, .32);
}

hr,
.post-container h2::before,
html[data-theme="dark"] hr,
html[data-theme="dark"] .post-container h2::before {
  border-color: var(--line);
}

select,
html[data-theme="dark"] select {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
}

.pager li > a,
.pager li > span,
html[data-theme="dark"] .pager li > a,
html[data-theme="dark"] .pager li > span {
  border-color: var(--line);
  background: var(--card);
  color: var(--ink) !important;
}

.pager li > a > span,
html[data-theme="dark"] .pager li > a > span {
  color: var(--muted);
}

.pager li > a:hover,
.pager li > a:focus,
html[data-theme="dark"] .pager li > a:hover,
html[data-theme="dark"] .pager li > a:focus {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff !important;
}

.pager li > a:hover > span,
.pager li > a:focus > span {
  color: #fff;
}

.side-catalog,
.side-catalog .catalog-body li a {
  color: var(--muted) !important;
}

.side-catalog .catalog-body .active,
html[data-theme="dark"] .side-catalog .catalog-body .active {
  background: var(--accent-soft);
}

.side-catalog .catalog-body .active a,
html[data-theme="dark"] .side-catalog .catalog-body .active a {
  color: var(--accent-deep) !important;
}

/* Archive filters override the old tag-cloud script's inline blue colors. */
#tag_cloud a,
#tag_cloud .tag,
html[data-theme="dark"] #tag_cloud a,
html[data-theme="dark"] #tag_cloud .tag {
  border: 1px solid var(--line) !important;
  background: var(--card) !important;
  color: var(--ink) !important;
}

#tag_cloud a:hover,
#tag_cloud a:focus,
#tag_cloud a:active,
#tag_cloud a.focus,
#tag_cloud .tag:hover,
#tag_cloud .tag:focus,
#tag_cloud .tag:active,
#tag_cloud .tag.focus,
#tag_cloud a.tag-button--all:hover,
#tag_cloud a.tag-button--all:focus,
#tag_cloud a.tag-button--all:active,
#tag_cloud a.tag-button--all.focus {
  border-color: var(--accent) !important;
  background: var(--accent-soft) !important;
  color: var(--accent-deep) !important;
}

#tag_cloud a.tag-button--all,
#tag_cloud .tag.tag-button--all,
.listing-seperator,
.mini-post-list .tag-text {
  color: var(--accent-deep) !important;
}

#tag_cloud sup {
  color: var(--muted);
}

/* Search is a full-page reading surface and must switch as a unit. */
.search-page,
html[data-theme="dark"] .search-page {
  background: var(--paper);
  color: var(--ink);
}

.search-page #search-input,
html[data-theme="dark"] .search-page #search-input {
  background: transparent;
  color: var(--ink);
  caret-color: var(--accent);
}

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

.search-icon-close,
html[data-theme="dark"] .search-icon-close {
  color: var(--ink);
}

.search-page .post-preview {
  border-color: var(--line) !important;
  background: var(--card) !important;
}

/* Social symbols use one neutral high-contrast pair in both themes. */
footer .list-inline .fa-circle,
.sidebar-container .short-about .list-inline .fa-circle,
html[data-theme="dark"] footer .list-inline .fa-circle,
html[data-theme="dark"] .sidebar-container .short-about .list-inline .fa-circle {
  color: #707070 !important;
}

footer .list-inline .fa-inverse,
.sidebar-container .short-about .list-inline .fa-inverse,
html[data-theme="dark"] footer .list-inline .fa-inverse,
html[data-theme="dark"] .sidebar-container .short-about .list-inline .fa-inverse {
  color: #fff !important;
}

footer .list-inline a:hover .fa-circle,
.sidebar-container .short-about .list-inline a:hover .fa-circle {
  color: #4f8f68 !important;
}

footer,
html[data-theme="dark"] footer {
  border-top-color: #3a3a3d;
  background: var(--header-bg);
}

footer .copyright,
footer .copyright a,
html[data-theme="dark"] footer .copyright,
html[data-theme="dark"] footer .copyright a {
  color: #bcbcc0 !important;
}

footer .copyright a:hover,
footer .copyright a:focus {
  color: #e1eee5 !important;
}

.post-view-counter,
.site-view-counter {
  font-variant-numeric: tabular-nums;
}

.post-view-counter > span,
.site-view-counter > span {
  font-family: "Fira Code", Menlo, Monaco, Consolas, "Courier New", monospace;
  font-weight: 600;
}

/* Password-protected posts: neutral reading surface with the site's green accent. */
.encrypted-post-gate {
  max-width: 680px;
  margin: 18px auto 56px;
  padding: clamp(26px, 5vw, 44px);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: 12px;
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--shadow);
  text-align: center;
}

.encrypted-post-gate__icon {
  display: grid;
  width: 50px;
  height: 50px;
  margin: 0 auto 14px;
  place-items: center;
  border: 1px solid var(--accent);
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font: 700 25px/1 "Fira Code", Menlo, Monaco, Consolas, monospace;
}

.encrypted-post-gate__eyebrow {
  margin: 0 0 7px;
  color: var(--accent-deep);
  font: 700 11px/1.2 "Fira Code", Menlo, Monaco, Consolas, monospace;
  letter-spacing: .14em;
}

.encrypted-post-gate h2 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: clamp(25px, 5vw, 34px);
}

.encrypted-post-gate > p:not(.encrypted-post-gate__eyebrow) {
  margin: 0 auto 25px;
  color: var(--muted);
  font-size: 15px;
}

.encrypted-post-form {
  max-width: 490px;
  margin: 0 auto;
  text-align: left;
}

.encrypted-post-form label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.encrypted-post-form__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
}

.encrypted-post-form input,
.encrypted-post-form button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.encrypted-post-form input {
  min-width: 0;
  padding: 10px 12px;
  background: var(--paper);
  color: var(--ink);
  caret-color: var(--accent);
}

.encrypted-post-form input:focus {
  border-color: var(--accent);
  outline: 2px solid var(--accent-soft);
  outline-offset: 1px;
}

.encrypted-post-form button {
  padding: 10px 18px;
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.encrypted-post-form button:hover,
.encrypted-post-form button:focus {
  background: var(--accent-deep);
}

.encrypted-post-form button:disabled {
  cursor: wait;
  opacity: .68;
}

.encrypted-post-error {
  min-height: 20px;
  margin: 8px 0 0;
  color: #a13f38;
  font-size: 12px;
}

html[data-theme="dark"] .encrypted-post-error {
  color: #efaaa4;
}

.protected-post-content[hidden] {
  display: none !important;
}

.encrypted-post-noscript {
  padding: 14px;
  border-left: 3px solid #a13f38;
  background: var(--surface-soft);
  color: var(--ink);
}

.protected-post-label {
  display: inline-block;
  margin-right: 6px;
  color: var(--accent-deep);
  font-size: .88em;
  font-weight: 700;
}

.archive-lock {
  margin-right: .28em;
  color: var(--accent-deep);
  font-size: .72em;
  vertical-align: .1em;
}

.protected-post-content .tok-keyword { color: #c586c0; }
.protected-post-content .tok-string { color: #9fca90; }
.protected-post-content .tok-number { color: #b5cea8; }
.protected-post-content .tok-comment { color: #8d998b; font-style: italic; }

@media (max-width: 560px) {
  .encrypted-post-gate { margin-bottom: 38px; }
  .encrypted-post-form__row { grid-template-columns: 1fr; }
  .encrypted-post-form button { width: 100%; }
}
