:root {
  --fk-bg: #0b1116;
  --fk-surface: #101820;
  --fk-ink: #e7edf0;
  --fk-muted: #8e9ca5;
  --fk-soft: #17232b;
  --fk-line: rgba(203, 225, 228, .14);
  --fk-accent: #77d5bb;
  --fk-accent-dim: #2b806d;
}

/* Use one quiet scrollbar treatment everywhere: page, panels, tables and code. */
html,
body,
* {
  scrollbar-color: rgba(119, 213, 187, .72) rgba(16, 24, 32, .9);
  scrollbar-width: thin;
}

*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

*::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(16, 24, 32, .9);
}

*::-webkit-scrollbar-thumb {
  border: 2px solid rgba(16, 24, 32, .9);
  border-radius: 999px;
  background: rgba(119, 213, 187, .72);
}

*::-webkit-scrollbar-thumb:hover {
  background: var(--fk-accent);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 58px;
}

body {
  background: var(--fk-bg);
  color: var(--fk-ink);
  font-family: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.8;
}

a,
#logo,
.post-title a {
  color: var(--fk-ink);
}

a:hover,
a:active,
.post-title a:hover {
  color: var(--fk-accent);
}

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

#header {
  position: relative;
  padding: 28px 0 0;
  border: 0;
  background: var(--fk-bg);
}

.topbar-shell {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(119, 213, 187, .28);
  background: rgba(11, 17, 22, .9);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .24);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.topbar-shell > .container {
  padding-top: 13px;
  padding-bottom: 13px;
}

#header::after {
  position: absolute;
  top: -15rem;
  right: -5rem;
  z-index: 0;
  width: 30rem;
  height: 30rem;
  border: 1px solid rgba(119, 213, 187, .14);
  border-radius: 50%;
  content: "";
  box-shadow: 0 0 0 3rem rgba(119, 213, 187, .025), 0 0 0 7rem rgba(119, 213, 187, .02);
}

#header > .container,
#body > .container {
  position: relative;
  z-index: 1;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  float: none;
  width: 32%;
  box-sizing: border-box;
}

.site-avatar {
  display: block;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  overflow: hidden;
  border: 1px solid rgba(119, 213, 187, .28);
  border-radius: 50%;
  background: var(--fk-surface);
}

.site-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-copy {
  min-width: 0;
}

.topbar-shell > .container > .row {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  margin: 0;
}

#logo {
  font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", serif;
  font-size: 1.95rem;
  font-weight: 700;
  letter-spacing: -.05em;
}

.description {
  margin: 0;
  color: var(--fk-muted);
  font-size: .8rem;
  font-style: normal;
}

.site-search {
  display: flex;
  flex: 0 0 210px;
  width: 210px;
  justify-content: flex-end;
}

#search {
  width: 40px;
  height: 38px;
  margin-top: 0;
}

#search input {
  position: absolute;
  top: 0;
  right: 0;
  width: 210px;
  height: 38px;
  padding: 0 42px 0 14px;
  border: 1px solid var(--fk-line);
  border-radius: 999px;
  background: transparent;
  color: var(--fk-ink);
  opacity: 0;
  pointer-events: none;
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform .28s ease, opacity .2s ease, border-color .2s ease;
}

#search button {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
  width: 40px;
  height: 38px;
  padding: 0;
  border: 0;
  background: transparent !important;
  color: var(--fk-muted);
  cursor: pointer;
  direction: ltr;
  font-size: 0;
  text-indent: -9999px;
}

#search button::before,
#search button::after {
  position: absolute;
  display: block;
  content: "";
  transition: border-color .2s ease, background-color .2s ease;
}

#search button::before {
  top: 10px;
  left: 11px;
  width: 12px;
  height: 12px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

#search button::after {
  top: 24px;
  left: 25px;
  width: 8px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transform: rotate(45deg);
}

#search:hover input,
#search:focus-within input {
  opacity: 1;
  pointer-events: auto;
  transform: scaleX(1);
}

#search:hover input,
#search:focus-within input,
#search input:focus {
  border-color: rgba(119, 213, 187, .55);
  outline: none;
}

#search:hover button,
#search:focus-within button {
  color: var(--fk-accent);
}

#nav-menu {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  gap: 22px;
  margin: 0;
  padding: 0;
  border: 0;
}

#nav-menu a {
  float: none;
  height: auto;
  padding: 0;
  border: 0;
  color: var(--fk-muted);
  font-size: .86rem;
  line-height: 1.6;
}

#nav-menu a:hover,
#nav-menu .current {
  background: none;
  color: var(--fk-accent);
}

.hero-panel {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: calc(100svh - 128px);
  padding: 72px 0 88px;
  box-sizing: border-box;
  border-bottom: 1px solid var(--fk-line);
  background: transparent;
}

.hero-panel::before,
.hero-panel::after {
  position: absolute;
  z-index: -1;
  display: block;
  border-radius: 50%;
  content: "";
  pointer-events: none;
  transform: translate3d(var(--hero-scroll-drift, 0px), var(--hero-scroll-shift, 0px), 0);
  will-change: transform;
}

.hero-panel::before {
  top: 12%;
  right: 14%;
  width: 26rem;
  height: 26rem;
  border: 1px solid rgba(119, 213, 187, .14);
  box-shadow: 0 0 0 3rem rgba(119, 213, 187, .025), 0 0 0 7rem rgba(119, 213, 187, .018);
}

.hero-panel::after {
  bottom: -18rem;
  left: -8rem;
  width: 34rem;
  height: 34rem;
  background: radial-gradient(circle, rgba(35, 93, 91, .24), transparent 68%);
  transform: translate3d(var(--hero-scroll-drift-reverse, 0px), var(--hero-scroll-shift-reverse, 0px), 0);
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 690px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 14px;
  color: var(--fk-accent);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .2em;
}

.hero-panel h1 {
  margin: 0;
  color: var(--fk-ink);
  font-family: "STKaiti", "KaiTi", "FZKai-Z03", "SimKai", serif;
  font-size: clamp(2.4rem, 6vw, 5.3rem);
  font-weight: 500;
  letter-spacing: -.075em;
  line-height: 1.05;
}

.hero-quote-line {
  display: inline-block;
  min-height: 1.05em;
}

.hero-quote-line.is-typing::after {
  display: inline-block;
  width: 2px;
  height: .9em;
  margin-left: 7px;
  vertical-align: -.06em;
  background: var(--fk-accent);
  content: "";
  animation: hero-typing-caret 1s steps(1, end) infinite;
}

@keyframes hero-typing-caret {
  0%, 45% { opacity: 1; }
  46%, 100% { opacity: 0; }
}

.hero-quote-accent {
  background: linear-gradient(
    to bottom,
    #b7f3dc 0%,
    var(--fk-accent) 48%,
    var(--fk-accent-dim) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-description {
  max-width: 34rem;
  margin: 22px 0 0;
  color: var(--fk-muted);
  font-size: .98rem;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 26px;
}

.hero-button {
  display: inline-flex;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--fk-accent);
  color: var(--fk-accent);
  font-size: .86rem;
}

.hero-button:hover {
  transform: translateX(4px);
}

.hero-button span {
  font-size: 1rem;
}

.hero-status {
  color: var(--fk-muted);
  font-size: .78rem;
}

.hero-status i {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--fk-accent);
}

#body {
  border: 0;
  background: var(--fk-bg);
}

#body > .container > .row {
  display: flex;
  align-items: flex-start;
  gap: 54px;
  padding-top: 48px;
}

#main {
  float: none;
  width: calc(100% - 270px);
  padding: 0;
  scroll-margin-top: 58px;
}

#secondary {
  float: none;
  width: 216px;
  margin: 0;
  padding: 0;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 10px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--fk-line);
}

.section-heading h2 {
  margin: 0;
  color: var(--fk-ink);
  font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", serif;
  font-size: 1.75rem;
  font-weight: 500;
  letter-spacing: -.05em;
}

.section-count {
  color: var(--fk-muted);
  font-size: .75rem;
}

.post,
.post-single {
  margin: 0;
  padding: 30px 0 34px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.home-post + .home-post {
  border-top: 1px solid var(--fk-line);
}

.post-title {
  margin: 3px 0 8px;
  font-family: Georgia, "Songti SC", serif;
  font-size: 1.7rem;
  font-weight: 500;
  letter-spacing: -.045em;
  line-height: 1.25;
}

.post-meta {
  margin: 0 0 15px;
  color: var(--fk-muted);
  font-size: .75rem;
}

.post-meta li {
  margin-right: 9px;
  padding-left: 0;
  border: 0;
}

.post-content {
  color: #b9c6cc;
  font-size: 1rem;
  line-height: 1.95;
  overflow-wrap: anywhere;
}

.post-read-more {
  display: inline-flex;
  gap: 10px;
  margin-top: 16px;
  color: var(--fk-accent);
  font-size: .82rem;
}

.home-post-link {
  display: block;
  width: 100%;
  color: inherit;
  border: 0 !important;
  text-decoration: none;
}

.home-post-link:hover {
  color: inherit;
}

.post-meta .post-category-tag {
  display: inline-block;
  margin-left: 12px;
  padding: 1px 8px;
  border: 1px solid rgba(119, 213, 187, .45);
  border-radius: 999px;
  color: var(--fk-accent);
  font-size: .7rem;
  line-height: 1.55;
}

.post-category-tag a {
  color: inherit;
  border-bottom: 0 !important;
}

.post-read-more:hover {
  transform: translateX(4px);
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4 {
  color: var(--fk-ink);
  font-weight: 600;
}

.post-content img,
.post-content video,
.post-content iframe {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.code-block-shell {
  position: relative;
}

.post-content pre {
  position: relative;
  overflow-x: auto;
  border: 1px solid var(--fk-line);
  border-radius: 8px;
  background: #111b22;
  color: #d6e7e6;
}

.post-content pre code {
  display: block;
  min-width: max-content;
  padding-top: 18px;
  background: transparent;
}

.code-copy-button {
  position: absolute;
  top: 8px;
  z-index: 1;
  right: 10px;
  opacity: 0;
  padding: 2px 0;
  border: 0;
  background: transparent;
  color: var(--fk-muted);
  font: inherit;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: .65rem;
  line-height: 1.35;
  cursor: pointer;
  transition: opacity .18s ease, color .18s ease;
}

.code-language {
  position: absolute;
  top: 8px;
  left: 10px;
  z-index: 1;
  padding: 2px 0;
  border: 0;
  background: transparent;
  color: var(--fk-accent);
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: .65rem;
  line-height: 1.35;
  pointer-events: none;
}

.code-block-shell:hover .code-copy-button,
.code-block-shell:focus-within .code-copy-button {
  opacity: 1;
}

.code-copy-button:hover,
.code-copy-button:focus-visible {
  outline: none;
  color: var(--fk-accent);
}

.code-copy-button.is-copied {
  opacity: 1;
  color: var(--fk-accent);
}

/* Keep the old state class harmless for cached markup from an earlier version. */
.code-copy-state {
  display: none;
}

/* The button owns the interaction; the code itself remains selectable. */
.post-content pre code {
  cursor: text;
}

/* Prevent inherited button rules from changing the compact copy control. */
.code-block-shell .code-copy-button {
  min-height: 0;
  width: auto;
  box-sizing: border-box;
}

/* Shared label geometry for any cached state node. */
.code-copy-state {
  padding: 2px 7px;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: .65rem;
  line-height: 1.35;
  pointer-events: none;
}

.post-content code {
  background: #17232b;
  color: #98e1cc;
}

/* Prism tokens mapped to the VS Code Dark+ visual vocabulary. */
.post-content pre[class*="language-"],
.post-content code[class*="language-"] {
  color: #d4d4d4;
  text-shadow: none;
}

.post-content code[class*="language-"] {
  background: transparent;
}

.post-content .token.comment,
.post-content .token.prolog,
.post-content .token.doctype,
.post-content .token.cdata {
  color: #6a9955;
}

.post-content .token.punctuation,
.post-content .token.operator {
  color: #d4d4d4;
}

.post-content .token.namespace,
.post-content .token.class-name,
.post-content .token.builtin,
.post-content .token.type-declaration {
  color: #4ec9b0;
}

.post-content .token.keyword,
.post-content .token.atrule,
.post-content .token.tag,
.post-content .token.selector {
  color: #569cd6;
}

.post-content .token.boolean,
.post-content .token.constant,
.post-content .token.symbol,
.post-content .token.number {
  color: #b5cea8;
}

.post-content .token.string,
.post-content .token.char,
.post-content .token.attr-value,
.post-content .token.regex {
  color: #ce9178;
}

.post-content .token.function,
.post-content .token.function-variable {
  color: #dcdcaa;
}

.post-content .token.variable,
.post-content .token.property,
.post-content .token.attr-name {
  color: #9cdcfe;
}

.post-content .token.important,
.post-content .token.deleted {
  color: #c586c0;
}

.post-content .token.inserted {
  color: #b5cea8;
}

.post-content .token.entity,
.post-content .token.url {
  color: #4fc1ff;
}

.post-content blockquote {
  margin-left: 0;
  padding: 5px 0 5px 20px;
  border-left: 2px solid var(--fk-accent-dim);
  color: #94a6ad;
}

.post-content hr {
  width: 100%;
  height: 1px;
  margin: 2.5rem 0;
  border: 0;
  background: linear-gradient(
    to right,
    rgba(119, 213, 187, .42),
    var(--fk-line) 42%,
    transparent
  );
}

.post-content table {
  display: block;
  overflow-x: auto;
  border-color: var(--fk-line);
  white-space: nowrap;
  scrollbar-color: rgba(119, 213, 187, .72) rgba(16, 24, 32, .9);
  scrollbar-width: thin;
}

.post-content table::-webkit-scrollbar {
  height: 7px;
}

.post-content table::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(16, 24, 32, .9);
}

.post-content table::-webkit-scrollbar-thumb {
  border: 2px solid rgba(16, 24, 32, .9);
  border-radius: 999px;
  background: rgba(119, 213, 187, .72);
}

.post-content table::-webkit-scrollbar-thumb:hover {
  background: var(--fk-accent);
}

.post-content th,
.post-content td {
  border-color: var(--fk-line);
}

.post-content th {
  background: var(--fk-soft);
  color: var(--fk-ink);
}

.archive-page {
  padding-top: 8px;
}

.archive-page > .post-title {
  margin-bottom: 28px;
}

.archive-years {
  display: grid;
  gap: 28px;
}

.archive-year {
  display: grid;
  grid-template-columns: 5rem 1fr;
  gap: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--fk-line);
}

.archive-year h3 {
  margin: 0;
  color: var(--fk-accent);
  font-family: Georgia, serif;
  font-size: 1.35rem;
  font-weight: 500;
}

.archive-months {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.archive-months a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 5px 0;
  color: var(--fk-muted);
  border-bottom: 1px solid transparent;
}

.archive-months a:hover {
  border-bottom-color: var(--fk-accent-dim);
  color: var(--fk-accent);
}

.archive-months small {
  color: var(--fk-muted);
  font-size: .72rem;
}

.archive-heatmap-wrap {
  margin: 18px 0 10px;
  padding: 18px;
  border: 1px solid var(--fk-line);
  border-radius: 10px;
  background: rgba(16, 24, 32, .5);
}

.archive-month-summary {
  margin: 22px 0 36px;
}

.archive-month-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.archive-month-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--fk-line);
  color: var(--fk-muted);
  font-size: .8rem;
  text-decoration: none;
}

a.archive-month-card:hover {
  border-bottom-color: var(--fk-accent-dim);
  color: var(--fk-accent);
}

.archive-month-card strong {
  color: var(--fk-ink);
  font-weight: 500;
}

.archive-heatmap-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  color: var(--fk-muted);
  font-size: .75rem;
}

.heatmap-legend {
  display: flex;
  align-items: center;
  gap: 5px;
  line-height: 0;
}

.archive-heatmap {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  overflow-x: auto;
  padding: 2px 1px 8px;
  scrollbar-color: rgba(119, 213, 187, .72) rgba(16, 24, 32, .9);
  scrollbar-width: thin;
}

.archive-heatmap::-webkit-scrollbar {
  height: 7px;
}

.archive-heatmap::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(16, 24, 32, .9);
}

.archive-heatmap::-webkit-scrollbar-thumb {
  border: 2px solid rgba(16, 24, 32, .9);
  border-radius: 999px;
  background: rgba(119, 213, 187, .72);
}

.archive-heatmap::-webkit-scrollbar-thumb:hover {
  background: var(--fk-accent);
}

.heatmap-week {
  display: grid;
  align-items: start;
  flex: 0 0 auto;
  gap: 4px;
  grid-template-rows: repeat(7, 12px);
}

.heatmap-cell {
  display: block;
  width: 12px;
  height: 12px;
  box-sizing: border-box;
  border-radius: 3px;
  background: rgba(203, 225, 228, .08);
  border: 0;
  cursor: default;
}

a.heatmap-cell {
  cursor: pointer;
  border-bottom: 0 !important;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease;
}

a.heatmap-cell:hover {
  transform: scale(1.25);
  box-shadow: 0 0 0 2px var(--fk-bg), 0 0 0 3px var(--fk-accent);
}

.heatmap-cell.level-1 {
  background: rgba(119, 213, 187, .28);
}

.heatmap-cell.level-2 {
  background: rgba(119, 213, 187, .48);
}

.heatmap-cell.level-3 {
  background: rgba(119, 213, 187, .7);
}

.heatmap-cell.level-4 {
  background: var(--fk-accent);
  box-shadow: 0 0 8px rgba(119, 213, 187, .22);
}

.heatmap-legend .heatmap-cell {
  display: block;
  flex: 0 0 11px;
  width: 11px;
  height: 11px;
  margin: 0;
}

.archive-summary {
  color: var(--fk-muted);
  font-size: .8rem;
}

.shuoshuo-item .post-content {
  max-width: 46rem;
}

.empty-state {
  color: var(--fk-muted);
}

.about-page > .post-title {
  margin-bottom: 28px;
}

.about-intro {
  max-width: 48rem;
}

.about-lead {
  color: var(--fk-ink);
  font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", serif;
  font-size: 1.35rem;
  line-height: 1.6;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px;
  margin: 44px 0;
}

.about-block {
  padding-top: 18px;
  border-top: 1px solid var(--fk-line);
}

.about-block h2 {
  margin: 0 0 14px;
  color: var(--fk-ink);
  font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", serif;
  font-size: 1.35rem;
  font-weight: 500;
}

.about-block ul {
  margin: 0;
  padding-left: 1.2em;
  color: var(--fk-muted);
}

.about-block li {
  margin: 4px 0;
}

.about-projects {
  margin-top: 18px;
}

.about-project-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.about-project-list span {
  padding: 5px 10px;
  border: 1px solid rgba(119, 213, 187, .32);
  border-radius: 999px;
  color: var(--fk-accent);
  font-size: .78rem;
}

.about-custom-content {
  margin-top: 42px;
  padding-top: 24px;
  border-top: 1px solid var(--fk-line);
}

.article-timeline {
  position: relative;
  margin: 8px 0 0 18px;
  padding-left: 32px;
}

.article-timeline::before {
  position: absolute;
  top: 16px;
  bottom: 36px;
  left: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--fk-accent-dim), var(--fk-line));
  content: "";
}

.timeline-entry {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  margin: 0;
  padding: 26px 0 32px;
  border-bottom: 1px solid var(--fk-line);
}

.timeline-node-wrap {
  position: absolute;
  top: 28px;
  left: -40px;
  z-index: 2;
}

.timeline-node {
  position: relative;
  display: block;
  width: 16px;
  height: 16px;
  box-sizing: border-box;
  border: 3px solid var(--fk-bg);
  border-radius: 50%;
  background: var(--fk-accent);
  color: transparent;
  cursor: help;
  box-shadow: 0 0 0 1px rgba(119, 213, 187, .5), 0 0 0 6px rgba(119, 213, 187, .06);
}

.timeline-node::after {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  padding: 5px 9px;
  border: 1px solid var(--fk-line);
  border-radius: 5px;
  background: var(--fk-surface);
  color: var(--fk-ink);
  content: attr(data-date);
  font-size: .72rem;
  line-height: 1.4;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  transform: translate(-50%, 4px);
  transition: opacity .2s ease, transform .2s ease;
}

.timeline-node:hover::after,
.timeline-node:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.timeline-content {
  min-width: 0;
}

.timeline-entry-link {
  display: block;
  width: 100%;
  color: inherit;
  border: 0 !important;
  text-decoration: none;
}

.timeline-entry-link:hover {
  color: inherit;
}

.timeline-content .post-title {
  margin-top: 0;
}

.timeline-content .post-meta {
  margin-bottom: 14px;
}

.shuoshuo-timeline {
  position: relative;
  margin: 34px 0 0 8px;
  padding-left: 34px;
}

.shuoshuo-timeline::before {
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 0;
  width: 1px;
  background: var(--fk-line);
  content: "";
}

.shuoshuo-entry {
  position: relative;
  margin: 0 0 36px;
}

.shuoshuo-time-wrap {
  position: absolute;
  top: 0;
  left: -34px;
  width: 1px;
}

.shuoshuo-time-wrap::before {
  position: absolute;
  top: 7px;
  left: -4px;
  width: 9px;
  height: 9px;
  border: 2px solid var(--fk-bg);
  border-radius: 50%;
  background: var(--fk-accent);
  box-shadow: 0 0 0 4px rgba(119, 213, 187, .10);
  content: "";
}

.shuoshuo-time {
  display: block;
  width: 150px;
  margin-left: -184px;
  padding-top: 1px;
  color: var(--fk-accent);
  font-size: .76rem;
  line-height: 1.5;
  text-align: right;
  white-space: nowrap;
}

.shuoshuo-time-absolute {
  display: none;
  color: var(--fk-muted);
}

.shuoshuo-entry-link {
  display: block;
  padding: 0 0 28px;
  border-bottom: 1px solid var(--fk-line);
  color: inherit;
  text-decoration: none;
}

.shuoshuo-entry-link:hover {
  color: inherit;
}

.shuoshuo-entry-link .post-content {
  margin: 0;
}

#secondary .widget {
  margin: 0 0 30px;
  padding: 0 0 22px;
  border: 0;
  border-bottom: 1px solid var(--fk-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

#secondary a,
#secondary a:hover,
#secondary a:focus-visible {
  border-bottom: 0 !important;
  text-decoration: none !important;
}

#secondary .post-outline {
  border-bottom: 0;
}

.sidebar-quote {
  margin: 0 0 28px;
  padding: 0 0 24px;
  border-bottom: 1px solid var(--fk-line);
}

.sidebar-quote p {
  margin: 0;
  color: var(--fk-accent);
  font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", serif;
  font-size: .98rem;
  font-style: italic;
  line-height: 1.8;
  letter-spacing: .03em;
}

.post-outline {
  position: fixed;
  top: 168px;
  right: max(12px, calc((100vw - 960px) / 2 - 36px));
  z-index: 20;
  width: 216px;
  max-height: calc(100vh - 154px);
  overflow-y: auto;
}

.outline-list {
  margin: 0;
  padding: 8px 0 8px 20px;
  border-left: 1px solid var(--fk-line);
  list-style: none;
}

.outline-list li {
  position: relative;
  margin: 0;
  padding: 8px 0 8px 20px;
  line-height: 1.55;
}

.outline-list li::before {
  position: absolute;
  top: 14px;
  left: -5px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--fk-accent);
  content: "";
}

.outline-list a {
  display: block;
  color: var(--fk-muted);
  font-size: .78rem;
  overflow-wrap: anywhere;
  border-bottom: 0 !important;
  text-decoration: none;
}

.outline-list a:hover {
  color: var(--fk-accent);
}

.outline-list a.is-active {
  color: var(--fk-accent);
  font-weight: 600;
}

.outline-list li.is-active::before {
  width: 8px;
  height: 8px;
  top: 13px;
  left: -6px;
  box-shadow: 0 0 0 4px rgba(119, 213, 187, .12);
}

.outline-level-3 {
  padding-left: 30px !important;
}

.outline-level-4 {
  padding-left: 40px !important;
}

.widget-title {
  margin: 0 0 12px;
  color: var(--fk-ink);
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .04em;
}

.widget-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.widget-list li {
  padding: 5px 0;
  border: 0;
  color: var(--fk-muted);
  font-size: .8rem;
  line-height: 1.6;
}

.widget-list a {
  color: var(--fk-muted);
}

.widget-list a:hover {
  color: var(--fk-accent);
}

.email-copy {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  width: 100%;
  padding: 5px 0;
  border: 0;
  background: transparent;
  color: var(--fk-muted);
  cursor: pointer;
  text-align: left;
}

.email-copy:hover,
.email-copy.is-copied {
  color: var(--fk-accent);
}

.email-copy small {
  margin-top: 2px;
  color: var(--fk-muted);
  font-size: .68rem;
}

#footer {
  max-width: 960px;
  margin: 50px auto 0;
  padding: 25px 10px 42px;
  border-top: 1px solid var(--fk-line);
  color: var(--fk-muted);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-inner strong {
  display: block;
  color: var(--fk-ink);
}

.footer-inner span,
.footer-meta {
  font-size: .75rem;
}

.post-near,
#comments {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--fk-line);
}

.post-near {
  padding-left: 0;
  list-style: none;
}

#comments h3,
.respond h3 {
  color: var(--fk-ink);
}

#comments input,
#comments textarea {
  border-color: var(--fk-line);
  border-radius: 6px;
  background: var(--fk-surface);
  color: var(--fk-ink);
}

/* Comment form: keep controls quiet, rounded and consistent with the dark theme. */
#comment-form p {
  margin: 0 0 16px;
}

#comment-form label {
  display: block;
  margin: 0 0 7px;
  color: var(--fk-muted);
  font-size: .78rem;
  letter-spacing: .04em;
}

#comment-form input,
#comment-form textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid var(--fk-line);
  border-radius: 8px;
  background: rgba(16, 24, 32, .72);
  color: var(--fk-ink);
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

#comment-form input:focus,
#comment-form textarea:focus {
  outline: none;
  border-color: rgba(119, 213, 187, .78);
  background: rgba(16, 24, 32, .92);
  box-shadow: 0 0 0 3px rgba(119, 213, 187, .10);
}

#comment-form textarea {
  min-height: 170px;
  resize: vertical;
}

#comment-form p:last-child {
  margin-top: 20px;
  margin-bottom: 0;
}

#comment-form button.submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 18px;
  border: 1px solid var(--fk-accent-dim) !important;
  border-radius: 999px !important;
  background: transparent !important;
  color: var(--fk-accent) !important;
  font: inherit;
  font-size: .86rem;
  line-height: 1.2;
  cursor: pointer;
  transition: color .2s ease, background .2s ease, border-color .2s ease, transform .2s ease;
}

#comment-form button.submit:hover,
#comment-form button.submit:focus-visible {
  outline: none;
  border-color: var(--fk-accent) !important;
  background: var(--fk-accent) !important;
  color: var(--fk-bg) !important;
  transform: translateY(-1px);
}

.comment-list li,
.comment-list li.comment-level-odd,
.comment-list li.comment-level-even {
  border-color: var(--fk-line);
  background: var(--fk-surface);
  color: var(--fk-ink);
}

.comment-list li.comment-by-author {
  background: rgba(119, 213, 187, .08);
}

.comment-author,
.comment-author cite,
.comment-content,
.comment-meta,
.comment-list li .comment-reply {
  color: var(--fk-ink);
}

.comment-author img {
  width: 48px;
  height: 48px;
  margin-right: 12px;
  border: 1px solid var(--fk-line);
  border-radius: 12px;
  vertical-align: middle;
}

.comment-meta a,
.comment-list li .comment-reply a {
  color: var(--fk-muted);
  border-bottom: 0 !important;
}

.comment-list .respond {
  border-top-color: var(--fk-line);
}

@media (max-width: 767px) {
  html {
    scroll-padding-top: 126px;
  }

  #header {
    padding-top: 18px;
  }

  .topbar-shell > .container > .row {
    display: block;
  }

  .brand-lockup {
    display: flex;
    width: auto;
  }

  .description {
    display: block;
  }

  .site-search.kit-hidden-tb {
    position: absolute;
    top: 18px;
    right: 10px;
    display: block;
    width: 40px;
  }

  #nav-menu {
    justify-content: flex-start;
    gap: 18px;
    margin-top: 22px;
    padding-bottom: 8px;
    overflow-x: auto;
    white-space: nowrap;
  }

  #search:hover input,
  #search:focus-within input {
    width: min(210px, calc(100vw - 32px));
  }

  .hero-panel {
    min-height: 0;
    min-height: calc(100svh - 92px);
    padding: 56px 0 64px;
  }

  .hero-panel h1 {
    font-size: 2.5rem;
  }

  .hero-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  #body > .container > .row {
    display: block;
    padding-top: 30px;
  }

  #main,
  #secondary {
    width: 100%;
  }

  #main {
    scroll-margin-top: 126px;
  }

  #secondary {
    margin-top: 34px;
  }

  .section-heading {
    display: block;
  }

  .section-count {
    display: block;
    margin-top: 4px;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .archive-year {
    display: block;
  }

  .archive-year h3 {
    margin-bottom: 10px;
  }

  .archive-months {
    grid-template-columns: 1fr;
  }

  .archive-heatmap-wrap {
    padding: 12px;
  }

  .archive-month-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 28px;
    margin: 32px 0;
  }

  .archive-heatmap-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .article-timeline {
    margin-left: 10px;
    padding-left: 25px;
  }

  .shuoshuo-timeline {
    margin-left: 10px;
    padding-left: 25px;
  }

  .shuoshuo-time {
    position: relative;
    width: auto;
    margin: 0 0 12px;
    padding: 0;
    text-align: left;
  }

  .shuoshuo-time-wrap {
    position: static;
    width: auto;
  }

  .shuoshuo-time-wrap::before {
    top: 6px;
    left: -29px;
  }

  .post-outline {
    position: static;
    width: auto;
    max-height: none;
    margin-top: 56px;
  }

  .timeline-node-wrap {
    left: -33px;
  }

  .timeline-node::after {
    display: none;
  }

  .timeline-node {
    color: var(--fk-muted);
    font-size: .65rem;
    line-height: 1;
    text-indent: 23px;
    white-space: nowrap;
  }
}
