@charset "UTF-8";

:root {
  /* color */
  --subtext1: color-mix(in oklch, var(--text) 90%, var(--base));
  --subtext0: color-mix(in oklch, var(--text) 80%, var(--base));
  --surface0: color-mix(in oklch, var(--base) 80%, var(--text));
  --surface1: color-mix(in oklch, var(--base) 78%, var(--text));
  --surface2: color-mix(in oklch, var(--base) 67%, var(--text));
  --overlay0: color-mix(in oklch, var(--base) 56%, var(--text));
  --overlay1: color-mix(in oklch, var(--base) 45%, var(--text));
  --overlay2: color-mix(in oklch, var(--base) 34%, var(--text));
  /* font */
  --font-serif: Gentium, ChillKai, Baskerville, New York, Georgia, Noto Serif CJK, STFangsong, STSong, Songti SC, serif;
  --font-sans-serif: Avenir, system-ui, sans-serif;
  --font-mono: "SF Mono", "Maple Mono NF CN Local", "Maple Mono NF CN", Monaco, Consolas, monospace;
  --font-handwriting: "Bradley Hand", "homemade-apple", XingKai SC, cursive;
  --article-font-size: 1rem;
  --article-font-family: var(--font-serif);
  --article-line-height: 1.7;
  --article-font-weight: 400;
  --article-bold-font-weight: 700;
  /* misc */
  --radius: 12px;
}

:root[data-article-font-size="small"] {
  --article-font-size: 0.875rem;
}

:root[data-article-font-size="medium-small"] {
  --article-font-size: 0.9375rem;
}

:root[data-article-font-size="medium"] {
  --article-font-size: 1rem;
}

:root[data-article-font-size="medium-large"] {
  --article-font-size: 1.0625rem;
}

:root[data-article-font-size="large"] {
  --article-font-size: 1.125rem;
}

:root[data-article-font-family="serif"] {
  --article-font-family: var(--font-serif);
}

:root[data-article-font-family="sans-serif"] {
  --article-font-family: var(--font-sans-serif);
}

:root[data-article-font-family="mono"] {
  --article-font-family: var(--font-mono);
}

:root[data-article-font-family="handwriting"] {
  --article-font-family: var(--font-handwriting);
}

:root[data-article-line-height="compact"] {
  --article-line-height: 1.55;
}

:root[data-article-line-height="normal"] {
  --article-line-height: 1.7;
}

:root[data-article-line-height="relaxed"] {
  --article-line-height: 1.85;
}

:root[data-article-font-weight="light"] {
  --article-font-weight: 300;
  --article-bold-font-weight: 700;
}

:root[data-article-font-weight="regular"] {
  --article-font-weight: 400;
  --article-bold-font-weight: 700;
}

:root[data-article-font-weight="medium"] {
  --article-font-weight: 500;
  --article-bold-font-weight: 700;
}

/* #region Color */
:where([data-theme="latte"]) {
  color-scheme: light;
  --rosewater: #dc8a78;
  --flamingo: #dd7878;
  --pink: #ea76cb;
  --mauve: #8839ef;
  --red: #d20f39;
  --maroon: #e64553;
  --peach: #fe640b;
  --yellow: #df8e1d;
  --green: #40a02b;
  --teal: #179299;
  --sky: #04a5e5;
  --sapphire: #209fb5;
  --blue: #1e66f5;
  --lavender: #7287fd;
  --text: #4c4f69;
  --base: #eff1f5;
  --mantle: #e6e9ef;
  --crust: #dce0e8;
}

:where([data-theme="rose_pine"]) {
  color-scheme: dark;
  --rosewater: #f6c177;
  --flamingo: #f2cdcd;
  --pink: #ebbcba;
  --mauve: #c4a7e7;
  --red: #eb6f92;
  --maroon: #ea9a97;
  --peach: #f2cdcd;
  --yellow: #f6c177;
  --green: #9ccfd8;
  --teal: #31748f;
  --sky: #9ccfd8;
  --sapphire: #31748f;
  --blue: #9ccfd8;
  --lavender: #c4a7e7;
  --text: #e0def4;
  --base: #191726;
  --mantle: #161422;
  --crust: #11111b;
}

:where([data-theme="nord"]) {
  color-scheme: light;
  --rosewater: #bf616a;
  --flamingo: #d08770;
  --pink: #b48ead;
  --mauve: #b48ead;
  --red: #bf616a;
  --maroon: #bf616a;
  --peach: #d08770;
  --yellow: #ebcb8b;
  --green: #a3be8c;
  --teal: #8fbcbb;
  --sky: #81a1c1;
  --sapphire: #5e81ac;
  --blue: #81a1c1;
  --lavender: #5e81ac;
  --text: #4c566a;
  --base: #eceff4;
  --mantle: #e5e9f0;
  --crust: #d8dee9;
}

:where([data-theme="song_ci"]) {
  color-scheme: light;
  --rosewater: #d8a48f;
  --flamingo: #c87363;
  --pink: #c04851;
  --mauve: #7f5a83;
  --red: #b13a2e;
  --maroon: #9a3f3f;
  --peach: #d68a3a;
  --yellow: #c99a2e;
  --green: #5f8f6f;
  --teal: #2f7d73;
  --sky: #73a6a1;
  --sapphire: #2d6f8f;
  --blue: #2f5597;
  --lavender: #6f6a9f;
  --text: #0f4c20;
  --base: #f4efe3;
  --mantle: #f1efea;
  --crust: #c4d1b5;
}

:where([data-theme="mocha"]) {
  color-scheme: dark;
  --rosewater: #f5e0dc;
  --flamingo: #f2cdcd;
  --pink: #f5c2e7;
  --mauve: #cba6f7;
  --red: #f38ba8;
  --maroon: #eba0ac;
  --peach: #fab387;
  --yellow: #f9e2af;
  --green: #a6e3a1;
  --teal: #94e2d5;
  --sky: #89dceb;
  --sapphire: #74c7ec;
  --blue: #89b4fa;
  --lavender: #b4befe;
  --text: #cdd6f4;
  --base: #1e1e2e;
  --mantle: #181825;
  --crust: #11111b;
}

:where([data-theme="tokyo_night"]) {
  color-scheme: dark;
  --rosewater: #f7768e;
  --flamingo: #ff9e64;
  --pink: #bb9af7;
  --mauve: #bb9af7;
  --red: #f7768e;
  --maroon: #db4b4b;
  --peach: #ff9e64;
  --yellow: #e0af68;
  --green: #9ece6a;
  --teal: #1abc9c;
  --sky: #7dcfff;
  --sapphire: #2ac3de;
  --blue: #7aa2f7;
  --lavender: #82aaff;
  --text: #c0caf5;
  --base: #1a1b26;
  --mantle: #16161e;
  --crust: #101014;
}

:where([data-theme="nord_night"]) {
  color-scheme: dark;
  --rosewater: #b48ead;
  --flamingo: #d08770;
  --pink: #b48ead;
  --mauve: #b48ead;
  --red: #bf616a;
  --maroon: #bf616a;
  --peach: #d08770;
  --yellow: #ebcb8b;
  --green: #a3be8c;
  --teal: #8fbcbb;
  --sky: #88c0d0;
  --sapphire: #81a1c1;
  --blue: #5e81ac;
  --lavender: #81a1c1;
  --text: #eceff4;
  --base: #2e3440;
  --mantle: #292e39;
  --crust: #242933;
}

body {
  background: var(--mantle);
  color: var(--subtext1);
  min-height: 100%;
  line-height: 1.7;
  display: flex;
  flex-direction: column;
  /* Ref: https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/text-autospace */
  text-autospace: normal;
  font-synthesis: none;
  font-family: var(--font-sans-serif);
}

.site-toast {
  position: fixed;
  top: 10rem;
  left: 50%;
  z-index: 102;
  max-width: min(90vw, 32rem);
  padding: 0.7rem 1rem;
  border: 1px solid var(--surface2);
  border-radius: 0.75rem;
  background: var(--surface1);
  color: var(--text);
  box-shadow: 0 0.75rem 2rem -1rem hsl(from var(--text) h s l / 0.35);
  font-size: 0.875rem;
  line-height: 1.35;
  pointer-events: none;
  opacity: 0;
  transform: translateX(-50%) translateY(-2rem);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.site-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.navbar-main,
.navbar-menu {
  user-select: none;
}

.task-list-item-checkbox {
  accent-color: var(--lavender);
}

.task-list-item-checkbox:checked {
  accent-color: var(--mauve);
}

input.task-list-item-checkbox:checked {
  background-color: var(--green);
  border-color: var(--green);
}

a {
  color: var(--lavender);
  text-decoration: none;

  &:hover {
    color: var(--blue);
  }
}

mark {
  background-color: var(--yellow);
}

hr {
  border: none;
  display: block;
  margin: 1.5rem 0;
  background: transparent;
  border-top: 2px dotted var(--surface0);
}

.searchbox-result-item.active span {
  color: var(--yellow);
}

.searchbox-result-item:hover span {
  color: var(--mauve);
}

/* #endregion Color */

/* #region Font */

@font-face {
  font-family: "Gentium";
  src: url("https://fontsapi.zeoseven.com/2105/bold.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Gentium";
  src: url("https://fontsapi.zeoseven.com/2105/bold-italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Gentium";
  src: url("https://fontsapi.zeoseven.com/2105/book.woff2") format("woff2");
  font-style: normal;
  font-weight: 450;
  font-display: swap;
}
@font-face {
  font-family: "Gentium";
  src: url("https://fontsapi.zeoseven.com/2105/book-bold.woff2") format("woff2");
  font-style: normal;
  font-weight: 450;
  font-display: swap;
}
@font-face {
  font-family: "Gentium";
  src: url("https://fontsapi.zeoseven.com/2105/book-bold-italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 450;
  font-display: swap;
}
@font-face {
  font-family: "Gentium";
  src: url("https://fontsapi.zeoseven.com/2105/book-italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 450;
  font-display: swap;
}
@font-face {
  font-family: "Gentium";
  src: url("https://fontsapi.zeoseven.com/2105/book-medium.woff2") format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Gentium";
  src: url("https://fontsapi.zeoseven.com/2105/book-medium-italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Gentium";
  src: url("https://fontsapi.zeoseven.com/2105/book-semi-bold.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Gentium";
  src: url("https://fontsapi.zeoseven.com/2105/book-semi-bold-italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Gentium";
  src: url("https://fontsapi.zeoseven.com/2105/extra-bold.woff2") format("woff2");
  font-style: normal;
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: "Gentium";
  src: url("https://fontsapi.zeoseven.com/2105/extra-bold-italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: "Gentium";
  src: url("https://fontsapi.zeoseven.com/2105/italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Gentium";
  src: url("https://fontsapi.zeoseven.com/2105/medium.woff2") format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Gentium";
  src: url("https://fontsapi.zeoseven.com/2105/medium-italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Gentium";
  src: url("https://fontsapi.zeoseven.com/2105/main.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Gentium";
  src: url("https://fontsapi.zeoseven.com/2105/semi-bold-italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Gentium";
  src: url("https://fontsapi.zeoseven.com/2105/semi-bold.ttf.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Maple Mono NF CN Local";
  font-weight: 100 900;
  src: local("MapleMono-NF-CN-Regular");
}

@font-face {
  font-family: "NewYork";
  src: local("New York"), local("New York Text"), local("New York Display");
  font-weight: 400 700;
  font-style: normal;
}

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

@font-face {
  font-family: Paris2024;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src:
    local("paris2024"),
    url(/css/font/woff2/Paris2024-Variable.woff2) format("woff2");
}

@font-face {
  font-family: homemade-apple;
  font-display: swap;
  src:
    local("Homemade Apple"),
    local("HomemadeApple-Regular"),
    url(/css/font/woff2/HomemadeApple.woff2) format("woff2");
}

/* #endregion */

body,
dd,
dl,
dt,
figure,
h1,
h2,
h3,
h4,
h5,
h6,
html,
iframe,
legend,
li,
ol,
p,
pre,
textarea {
  margin: 0;
  padding: 0;
}

ul {
  list-style: none;
}

button,
input,
select,
textarea {
  margin: 0;
}

html {
  box-sizing: border-box;
  height: 100%;
  min-width: 300px;
  overflow-x: hidden;
  overflow-y: scroll;
  /* scroll-behavior: smooth; */
}

.card {
  max-width: 100%;
  position: relative;
  overflow: visible;
}

.card-content {
  padding: 1.25em 1.25rem 0 1.25rem;
}

/* #region Navbar */

.navbar {
  min-height: 3.5rem;
  position: sticky;
  padding-top: env(safe-area-inset-top);
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--mantle);
}

.navbar::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, hsl(from var(--surface0) h s l / 0.75) 22%, hsl(from var(--surface0) h s l / 0.75) 78%, transparent 100%);
  pointer-events: none;
}

@media screen and (min-width: 1024px) {
  .navbar {
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    backdrop-filter: blur(20px) saturate(1.4);
    background: hsl(from var(--mantle) h s l / 0.72);
  }
}

.navbar-container {
  flex-grow: 1;
  margin: 0 auto;
  width: auto;
  display: flex;
  min-height: 3.5rem;

  button {
    background: none;
    border: none;
    cursor: pointer;
  }
}

.navbar-main {
  transition: transform 240ms cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar-main.navbar--hidden {
  transform: translateY(-100%);
}

.navbar-logo {
  font-family: homemade-apple, var(--font-handwriting);
  color: var(--subtext1);
  display: flex;
  align-items: center;
  padding: 0 1.25rem;
  letter-spacing: 0.01em;
  line-height: 1;
  transition: color 240ms ease;
}

.navbar-logo:hover {
  color: var(--rosewater);
}

.navbar-item {
  color: var(--subtext0);
  align-items: center;
  display: flex;
  padding: 0 0.5rem;
  position: relative;
  flex-grow: 0;
  flex-shrink: 0;
  letter-spacing: 0.05em;
  transition: color 220ms ease;
}

@media screen and (min-width: 1024px) {
  .navbar-start .navbar-item {
    font-family: var(--font-sans-serif);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    padding: 0 0.9rem;
    color: var(--subtext0);
  }

  .navbar-start .navbar-item::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0.95rem;
    width: 55%;
    height: 1px;
    background: var(--rosewater);
    transform: translateX(-50%) scaleX(0);
    transform-origin: center;
    transition: transform 320ms cubic-bezier(0.4, 0, 0.2, 1);
  }

  .navbar-start .navbar-item:hover {
    color: var(--text);
  }

  .navbar-start .navbar-item:hover::after {
    transform: translateX(-50%) scaleX(1);
  }
}

.navbar-end {
  svg {
    width: 1.1em;
    opacity: 0.78;
    transition:
      opacity 220ms ease,
      transform 220ms ease;
  }

  .navbar-item {
    padding: 0 0.6rem;
    transition: color 220ms ease;
  }

  .navbar-item:hover {
    color: var(--text);
  }

  .navbar-item:hover svg {
    opacity: 1;
    transform: translateY(-1px);
  }
}

/* #endregion Navbar */

/* #region Theme Selector */

#theme-selector-popover:focus {
  outline: none;
}

.theme-selector-list {
  width: 90vw;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  padding: 0.5rem;
  overflow: hidden;
}

.theme-option {
  background-color: inherit;
  border: none;
  outline: none;
  color: var(--text);
  padding: 0.75rem 1.25rem;
  cursor: pointer;
  font-size: clamp(1.35rem, 2vw, 2rem);
  letter-spacing: clamp(0.1em, 0.3vw, 0.3em);
  font-family: "Bradley Hand", var(--font-serif);
  font-style: italic;

  &.is-focused,
  &:hover {
    color: var(--rosewater);
  }
  &.is-active {
    color: var(--blue);
  }
}

/* #endregion Theme Selector */

.section {
  padding: 3rem 1.5rem;
  flex-grow: 1;
}

.main-content {
  -webkit-justify-content: center;
  justify-content: center;
  flex-grow: 1;
  margin: 0 auto;
  position: relative;
  max-width: 50em;
  counter-reset: h2-counter;
}

/* #region Footer */

.footer {
  user-select: none;
  position: relative;
  padding: 4rem 1.5rem 3rem;
  text-align: center;
  color: var(--overlay0);
  font-family: var(--font-mono);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.footer-credit,
.footer-credit > a {
  font-size: 0.75rem;
  font-weight: 400;
  margin: 0;
  letter-spacing: 0.06em;
  color: inherit;
}

.footer-author {
  font-size: 0.8125rem;
  font-style: italic;
  font-family: homemade-apple, var(--font-handwriting);
  color: var(--subtext0);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.footer-meta {
  font-size: 0.65rem;
  font-weight: 400;
  margin: 0;
  line-height: 1.8;
  letter-spacing: 0.02em;
}

.footer-icp {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-icp:hover {
  color: var(--lavender);
}

/* #endregion Footer */

::-webkit-scrollbar {
  display: none;
}

/* #region Content */

.content {
  overflow: auto;
  word-wrap: break-word;
  color: var(--subtext1);

  ::selection {
    color: inherit;
    text-decoration: underline wavy;
    text-decoration-color: var(--mauve);
  }

  a.header-anchor {
    color: var(--text);
    font-family: var(--article-font-family);
    text-decoration: none;
    &::after {
      margin-left: 0.4em;
      opacity: 0;
      color: var(--surface0);
      transition: opacity 0.2s ease;
    }

    &:hover::after {
      opacity: 1;
    }
  }

  sup.footnote-ref > a,
  li.footnote-item,
  h2,
  h3,
  h4,
  h5,
  h6 {
    scroll-margin-top: 5rem;
  }

  .footnote-ref > a,
  .footnote-backref {
    text-decoration: none;
  }

  h2 {
    font-size: 1.5em;
    margin: 1.5rem 0 1rem;
    line-height: 1.3;
    border-bottom: 0.8px solid var(--surface0);

    > a.header-anchor {
      counter-increment: h2-counter;
      &::before {
        content: counter(h2-counter, decimal-leading-zero) ".";
        color: var(--flamingo);
        font-family: var(--font-serif);
        padding-right: 0.2em;
        letter-spacing: 0.1rem;
        font-size: 0.75em;
        font-variant-numeric: oldstyle-nums;
      }

      &:hover::after {
        content: "##";
      }
    }
  }

  h3 {
    font-size: 1.45em;
    margin: 1.4rem 0 1rem;
    line-height: 1.35;

    > a.header-anchor:hover::after {
      content: "###";
    }
  }

  h4 {
    font-size: 1.35em;
    margin: 1.3rem 0 1rem;
    line-height: 1.4;

    > a.header-anchor:hover::after {
      content: "####";
    }
  }

  h5 {
    font-size: 1.25em;
    margin: 1.2rem 0 1rem;
    line-height: 1.4;

    > a.header-anchor:hover::after {
      content: "#####";
    }
  }

  h6 {
    font-size: 1.1em;
    margin: 1.2rem 0 1rem;
    line-height: 1.45;

    > a.header-anchor:hover::after {
      content: "######";
    }
  }

  p,
  ol,
  dl,
  pre,
  details {
    margin-bottom: 1.5rem;
    line-height: var(--article-line-height);
  }

  li {
    margin-bottom: 0.5rem;
  }

  p:last-child {
    margin-bottom: 0;
  }

  img,
  iframe,
  video {
    display: block;
    max-width: 100%;
    margin: 0 auto 0.5rem auto;

    &:hover {
      cursor: pointer;
    }
  }
  figure {
    text-align: center;
  }

  figcaption {
    font-style: italic;
    font-family: var(--font-serif);
  }

  button.physical-btn,
  kbd {
    display: inline-block;
    padding: 0 0.3em;
    margin: 0 0.3em;
    font-family: var(--font-mono);
    font-size: 0.85em;
    color: var(--subtext0);
    user-select: none;
    background: linear-gradient(180deg, var(--base) 0%, var(--mantle) 100%);
    border: 1px solid var(--surface0);
    border-bottom-width: 3px;
    border-bottom-color: var(--surface0);
    border-radius: 6px;
    position: relative;
    top: -3px;
    transition:
      top 0.1s ease,
      border-bottom-width 0.1s ease;

    &:active {
      top: 0;
    }
  }

  ol {
    list-style-position: outside;
    padding-left: 2em;
  }

  ul {
    list-style: disc outside;
    padding-left: 2em;
    margin: 1em 0;

    ul {
      margin-top: 0.5em;
      list-style: circle;

      ul {
        list-style: square;
      }
    }
  }

  dd {
    margin-left: 2em;
  }

  math {
    overflow: auto;
    margin-bottom: 1rem;
  }

  .ratex {
    max-width: 100%;
    line-height: 0;
    color: var(--text);

    svg {
      display: block;
      flex: 0 0 auto;
      fill: currentColor;

      [fill] {
        fill: currentColor !important;
      }

      [stroke] {
        stroke: currentColor !important;
      }
    }
  }

  .ratex-inline {
    display: inline-flex;
    align-items: center;
    max-width: min(100%, 22em);
    margin: 0 0.08em;
    overflow-x: auto;
    overflow-y: hidden;
    vertical-align: -0.32em;

    svg {
      width: auto;
      max-width: none;
      height: 1.42em;
    }
    /* 分数 */
    &:has(rect) {
      vertical-align: -0.45em;
      svg {
        height: 2em;
      }
    }
  }

  .ratex-display {
    display: flex;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    margin: 1.5rem 0;
    overflow-x: auto;
    overflow-y: hidden;

    svg {
      width: auto;
      height: auto;
      max-width: min(100%, calc(100vw - 2.5rem));
      max-height: min(4.5em, 20vh);
    }
  }

  pre {
    overflow-x: auto;
    font-size: 0.85em;
    padding: 1rem;
    margin: 0 0 1rem 0;
    white-space: pre;
    word-wrap: normal;
    line-height: 1.45;
  }

  code {
    font-size: 0.85em;
    font-family: var(--font-mono);
    padding: 0 0.25em;
    margin: 0 0.2em;
    background-color: var(--base);
    color: var(--subtext1);
    border: 1px solid var(--surface0);
    border-radius: 4px;
  }

  sub,
  sup {
    font-size: 75%;
  }

  abbr[title] {
    text-decoration: underline dotted;
    cursor: help;
    position: relative;
  }

  a {
    text-decoration: underline;
    text-underline-offset: 3.5px;
    text-decoration-thickness: 1px;
    text-decoration-color: hsl(from var(--lavender) h s l / 0.8);
    color: var(--text);
    &:hover {
      text-decoration-color: var(--blue);
      text-decoration-thickness: 2px;
    }
  }

  aside {
    display: block;
    margin: 1.5rem 0;
    padding: 0.4rem 0 0.4rem 1rem;
    color: var(--subtext0);
    font-size: 0.875em;
    line-height: 1.55;
    border-left: 2px solid var(--surface1);

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

    > :last-child {
      margin-bottom: 0;
    }
  }
}

article.card-content .content {
  font-size: var(--article-font-size);
  font-family: var(--article-font-family);
  line-height: var(--article-line-height);
  font-weight: var(--article-font-weight);
}

article.card-content .content :is(h1, h2, h3, h4, h5, h6, strong, b, th) {
  font-weight: var(--article-bold-font-weight);
}

.footnotes {
  font-size: 0.9em;
}

.table-wrapper {
  max-width: 100%;
  margin: 1.5em 0;
  overflow-x: auto;

  table {
    min-width: max-content;
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    overflow: auto;
    margin: 1rem 0;
  }
}

td,
th {
  vertical-align: middle;
  padding: 0.75em 1em;
  &:not([align]) {
    text-align: left;
  }
}

thead th {
  font-weight: 700;
  border-bottom: 1px solid var(--surface0);
  padding: 1em;
}

tbody tr td {
  border-bottom: 1px solid var(--surface0);
}

tbody tr:last-child td {
  border-bottom: none;
}

blockquote {
  position: relative;
  padding: 0.7rem 2.5rem;
  margin: 1.5rem 0;
  border-left: 2px solid var(--red);
  font-family: Georgia, Kai, var(--font-serif);
  font-style: italic;
  font-synthesis: none;

  &:before {
    content: "”";
    color: var(--red);
    position: absolute;
    left: 0.5rem;
    top: 0.2rem;
    font-size: 3rem;
    font-weight: 700;
    opacity: 0.3;
    line-height: 1;
  }

  cite {
    display: block;
    text-align: right;
    margin-top: 0.5em;
    color: var(--subtext0);
    font-style: italic;
  }
}

ul.contains-task-list {
  list-style-type: none;
  padding-left: 0.5rem;
}

li.task-list-item {
  position: relative;
  padding-left: 1.75rem;
  list-style: none;
}

input.task-list-item-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 1.2rem;
  height: 1.2rem;
  border: 2px solid var(--surface1);
  border-radius: 0.375rem;
  position: absolute;
  left: 0;
  top: 0.15rem;
  &:checked::before {
    content: "";
    font-family: var(--font-mono);
    color: var(--base);
    position: absolute;
    top: 50%;
    left: 40%;
    transform: translate(-50%, -50%);
    font-size: 0.9rem;
    font-weight: 700;
  }
}

.medium-zoom-overlay {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 150;
}

.medium-zoom-image--opened {
  z-index: 151;
  position: fixed;
}

.heimu {
  color: var(--text);
  background-color: var(--text);
  &:hover {
    color: var(--base);
  }
}

strong {
  font-weight: bolder;
  padding: 0 0.15em;
}

a strong {
  color: currentColor;
}

input[type="checkbox"],
input[type="radio"] {
  vertical-align: baseline;
}

small {
  font-size: 0.875em;
}

/* #endregion Content */

article,
figure,
footer,
header,
hgroup,
section {
  display: block;
}

/* #region Article Meta*/

.article-title {
  font-family: var(--article-font-family);
  font-size: 1.75em;
  font-weight: 500;
  line-height: 1.2;
  margin-bottom: 0.3em;
  text-wrap: balance;

  > a {
    color: var(--text);
  }
}

.article-header-meta {
  font-family: var(--font-mono);
  overflow: auto;
  padding-bottom: 0.5em;
  color: var(--subtext0);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.75rem;

  a {
    color: var(--subtext0);

    &:hover {
      color: var(--blue);
    }
  }
}

.article-meta-info {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.2rem;
}

.meta-separator {
  color: var(--overlay0);
}

.article-meta-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px dashed var(--surface0);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  & + .content {
    margin-top: 1rem;
  }
}

em,
.article-excerpt,
.footnotes {
  font-family: var(--font-serif);
  font-style: italic;
  font-synthesis: none;
}

.article-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.2rem;
}

.article-title-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}

.article-action-btn {
  display: inline-flex;
  width: 1.5rem;
  padding: 0;
  background: none;
  border: none;
  color: var(--subtext1);
  cursor: pointer;

  &:hover {
    color: var(--mauve);
  }

  svg {
    width: 1.1rem;
    height: 1.1rem;
  }
}

.article-popover {
  padding: 0;
}

.article-popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--surface0);

  h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    color: var(--text);
  }
}

.article-popover-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--subtext0);
  cursor: pointer;
  transition: all 0.2s ease;

  &:hover {
    color: var(--text);
    background-color: var(--surface0);
  }

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

.article-popover-body {
  padding: 1.25rem;
  max-height: 70vh;
  overflow-y: auto;
}

.language-switch-popover {
  width: min(40rem, 90vw);
}

.language-switch-popover-body {
  p {
    margin: 0;
    color: var(--subtext1);
    line-height: 1.7;
  }
}

.language-switch-popover-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.language-switch-popover-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.25rem;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--surface1);
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  text-decoration: none;
  line-height: 1.2;

  &:hover {
    border-color: var(--mauve);
    color: var(--mauve);
  }

  &.is-primary {
    border-color: var(--blue);
    background: var(--blue);
    color: var(--base);

    &:hover {
      border-color: var(--mauve);
      background: var(--mauve);
      color: var(--base);
    }
  }
}

.font-settings-column,
.font-preview-column {
  min-width: 0;
}

.font-setting-group {
  margin-bottom: 1.25rem;

  &:last-child {
    margin-bottom: 0;
  }
}

.font-setting-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--subtext1);
  margin-bottom: 0.75rem;
}

.font-size-selector {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.font-size-btn {
  --font-size-preview: 16px;
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 3em;
  padding: 0;
  background: transparent;
  color: var(--subtext0);
  border: 1px solid transparent;
  cursor: pointer;

  &.is-active,
  &:hover {
    border-color: var(--mauve);
    border-radius: 100px;
    color: var(--mauve);
    background-color: hsl(from var(--mauve) h s l / 0.08);
  }
}

.font-size-btn[data-size="small"] {
  --font-size-preview: 12px;
}

.font-size-btn[data-size="medium-small"] {
  --font-size-preview: 14px;
}

.font-size-btn[data-size="medium"] {
  --font-size-preview: 16px;
}

.font-size-btn[data-size="medium-large"] {
  --font-size-preview: 18px;
}

.font-size-btn[data-size="large"] {
  --font-size-preview: 20px;
}

.font-size-preview {
  font-size: var(--font-size-preview);
  font-weight: 500;
}

.font-weight-selector {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  padding: 0.25rem;
  background: hsl(from var(--surface0) h s l / 0.35);
  border: 1px solid var(--surface0);
  border-radius: 14px;
}

.font-weight-btn {
  --font-weight-preview: 400;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 3rem;
  padding: 0.625rem 0.5rem;
  background: transparent;
  color: var(--subtext0);
  border: none;
  border-radius: 10px;
  font-weight: var(--font-weight-preview);
  cursor: pointer;
  transition: all 0.2s ease;

  &:hover {
    color: var(--text);
    background-color: hsl(from var(--surface1) h s l / 0.55);
  }

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

  &.is-active {
    color: var(--mauve);
    background-color: hsl(from var(--mauve) h s l / 0.08);
    box-shadow: inset 0 0 0 1px hsl(from var(--mauve) h s l / 0.28);
  }
}

.font-line-height-control {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.875rem;
  background: hsl(from var(--surface0) h s l / 0.35);
  border: 1px solid var(--surface0);
  border-radius: 12px;
}

.font-line-height-slider {
  width: 100%;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  height: 1.5rem;
  background: transparent;
  accent-color: var(--mauve);
  cursor: pointer;
}

.font-line-height-slider::-webkit-slider-runnable-track {
  height: 0.35rem;
  border-radius: 999px;
  background: linear-gradient(90deg, hsl(from var(--mauve) h s l / 0.92), hsl(from var(--surface0) h s l / 0.65));
}

.font-line-height-slider::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 1rem;
  height: 1rem;
  margin-top: calc((0.35rem - 1rem) / 2);
  border: 2px solid var(--mantle);
  border-radius: 50%;
  background: var(--mauve);
  box-shadow: 0 0 0 1px hsl(from var(--mauve) h s l / 0.22);
}

.font-line-height-slider::-moz-range-track {
  height: 0.35rem;
  border: none;
  border-radius: 999px;
  background: linear-gradient(90deg, hsl(from var(--mauve) h s l / 0.92), hsl(from var(--surface0) h s l / 0.65));
}

.font-line-height-slider::-moz-range-thumb {
  width: 1rem;
  height: 1rem;
  border: 2px solid var(--mantle);
  border-radius: 50%;
  background: var(--mauve);
  box-shadow: 0 0 0 1px hsl(from var(--mauve) h s l / 0.22);
}

.font-line-height-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--subtext0);
  white-space: nowrap;
}

.font-line-height-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--subtext0);
  padding-inline: 0.125rem;
}

.font-line-height-value {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.font-weight-btn[data-weight="light"] {
  --font-weight-preview: 300;
}

.font-weight-btn[data-weight="regular"] {
  --font-weight-preview: 400;
}

.font-weight-btn[data-weight="medium"] {
  --font-weight-preview: 500;
}

.font-option-name {
  max-width: 100%;
  font-size: 0.8125rem;
  line-height: 1.2;
  text-align: center;
  overflow-wrap: anywhere;
}

.font-custom-form {
  display: grid;
  gap: 0.75rem;
}

.font-custom-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  padding: 0.5rem 0;
  background: transparent;
  border: 0;
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.font-custom-toggle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 0.95rem;
  height: 0.95rem;
  color: var(--subtext0);
  line-height: 1;
  transform: rotate(0deg);
  transform-origin: 50% 50%;
  transition:
    transform 0.18s ease,
    color 0.18s ease;
}

.font-custom-toggle-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.font-custom-toggle:hover .font-custom-toggle-icon,
.font-custom-toggle[aria-expanded="true"] .font-custom-toggle-icon {
  color: var(--mauve);
}

.font-custom-toggle[aria-expanded="true"] .font-custom-toggle-icon {
  transform: rotate(45deg);
}

.font-custom-panel {
  display: grid;
  grid-template-rows: 0fr;
  gap: 0;
  opacity: 0;
  transform: translateY(-0.25rem);
  transition:
    grid-template-rows 0.24s ease,
    opacity 0.2s ease,
    transform 0.24s ease,
    gap 0.24s ease;
  overflow: hidden;
}

.font-custom-panel[data-expanded="true"] {
  grid-template-rows: 1fr;
  gap: 0.75rem;
  opacity: 1;
  transform: translateY(0);
}

.font-custom-panel-inner {
  min-height: 0;
  overflow: hidden;
}

.font-custom-label-row {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  min-width: 0;
}

.font-custom-help-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  padding: 0;
  flex: 0 0 auto;
  color: var(--subtext0);
  background: transparent;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}

.font-custom-help-btn:hover,
.font-custom-help-btn:focus-visible {
  color: var(--mauve);
}

.font-custom-help-btn:focus-visible {
  outline: 2px solid var(--mauve);
  outline-offset: 2px;
}

.font-custom-help-popover {
  max-width: min(22rem, calc(100vw - 2rem));
  padding: 0.75rem 0.875rem;
  color: var(--text);
  background: var(--base);
  border: 1px solid var(--surface0);
  border-radius: 12px;
  box-shadow:
    0 18px 42px -24px rgba(0, 0, 0, 0.45),
    0 0 0 1px hsl(from var(--surface0) h s l / 0.2);
  font-size: 0.8125rem;
  line-height: 1.45;
}

.font-custom-help-popover:popover-open {
  position: fixed;
  inset: auto auto auto auto;
  width: fit-content;
  height: auto;
  margin: 0;
  background: var(--base);
  backdrop-filter: none;
  display: block;
  z-index: 60;
}

.font-custom-field {
  display: grid;
  gap: 0.375rem;
  min-width: 0;
  color: var(--subtext0);
  font-size: 0.75rem;
  font-weight: 500;
}

.font-custom-field :is(input, textarea) {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 0.625rem 0.75rem;
  color: var(--text);
  background: hsl(from var(--surface0) h s l / 0.35);
  border: 1px solid var(--surface0);
  border-radius: 10px;
  font: 0.8125rem / 1.45 var(--font-mono);
  outline: none;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease,
    box-shadow 0.2s ease;
}

.font-custom-field textarea {
  resize: vertical;
}

.font-custom-field :is(input, textarea)::placeholder {
  color: var(--overlay1);
}

.font-custom-field :is(input, textarea):focus {
  border-color: var(--mauve);
  background: hsl(from var(--surface0) h s l / 0.52);
  box-shadow: 0 0 0 3px hsl(from var(--mauve) h s l / 0.1);
}

.font-custom-family-grid {
  display: grid;
  gap: 0.625rem;
}

.font-custom-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.font-custom-actions button {
  min-height: 2.25rem;
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease,
    color 0.2s ease;
}

.font-custom-apply {
  color: var(--base);
  background: var(--mauve);
  border: 1px solid var(--mauve);
}

.font-custom-apply:hover {
  background: color-mix(in oklch, var(--mauve) 88%, var(--text));
}

.font-custom-reset {
  color: var(--subtext0);
  background: transparent;
  border: 1px solid var(--surface0);
}

.font-custom-reset:hover {
  color: var(--text);
  border-color: var(--overlay0);
  background: hsl(from var(--surface0) h s l / 0.45);
}

.font-type-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.font-type-btn {
  --font-type-preview-family: var(--font-serif);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
  padding: 0.875rem 0.5rem;
  background: transparent;
  border: 1.5px solid var(--surface0);
  border-radius: 10px;
  color: var(--subtext0);
  cursor: pointer;
  transition: all 0.2s ease;

  &:hover {
    border-color: var(--overlay0);
    color: var(--text);
  }

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

  &.is-active {
    border-color: var(--mauve);
    color: var(--mauve);
    background-color: hsl(from var(--mauve) h s l / 0.08);
  }
}

.font-type-btn[data-font="serif"] {
  --font-type-preview-family: var(--font-serif);
}

.font-type-btn[data-font="sans-serif"] {
  --font-type-preview-family: var(--font-sans-serif);
}

.font-type-btn[data-font="mono"] {
  --font-type-preview-family: var(--font-mono);
}

.font-type-btn[data-font="handwriting"] {
  --font-type-preview-family: var(--font-handwriting);
}

.font-type-preview {
  font-size: 1.5rem;
  font-family: var(--font-type-preview-family);
  line-height: 1;
}

.font-type-name {
  font-size: 0.75rem;
  font-weight: 500;
}

.font-preview-box {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  font-size: var(--article-font-size);
  font-family: var(--article-font-family);
  line-height: var(--article-line-height);
  font-weight: var(--article-font-weight);
  padding: 0.875rem 1rem;
  background: var(--base);
  border: 1px solid var(--surface0);
  border-radius: 10px;

  .font-preview-title {
    font-size: 1.1em;
    font-weight: var(--article-bold-font-weight);
    color: var(--text);
    margin: 0 0 0.375rem 0;
    line-height: 1.4;
  }

  .font-preview-excerpt {
    font-size: 0.9em;
    color: var(--subtext0);
    margin: 0;
    line-height: inherit;
  }

  :is(strong, b) {
    font-weight: var(--article-bold-font-weight);
  }
}

.article-info-list {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.article-info-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.article-info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  border-radius: 8px;
  background: var(--base);
  color: var(--subtext0);
  margin-top: 0.125rem;

  svg {
    width: 1rem;
    height: 1rem;
  }
}

.article-info-content {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 20rem;
  flex: 1;
  padding-top: 0.125rem;
}

.article-info-label {
  font-size: 0.75rem;
  color: var(--subtext0);
  font-weight: 500;
}

.article-info-value {
  font-size: 0.875rem;
  color: var(--text);
  word-break: break-word;

  a {
    color: var(--lavender);
    text-decoration: none;

    &:hover {
      text-decoration: underline;
    }
  }
}

.article-comment-popover {
  width: min(920px, 92vw);
}

.article-comment-popover-body {
  width: min(920px, 92vw);
  max-height: min(72vh, 760px);
  padding: 0;
}

.article-comment-panel#comments {
  border-top: 0;
}

.article-comment-panel {
  padding: 1.25rem;

  .twikoo {
    margin: 0;
  }
}

/* #endregion Article Meta */

/* #region Search */

input.searchbox-input {
  color: inherit;
  background-color: inherit;
  font-family: inherit;
  border: none;
  outline: 0;
  flex-grow: 1;
  box-sizing: border-box;
  padding: 0.75em 0 0.75em 1.25em;
}

.searchbox,
.searchbox-container {
  align-items: center;
  flex-direction: column;
  line-height: 1.25em;
}

.searchbox-container {
  background-color: var(--mantle);
  border: 2px solid var(--surface0);
  color: var(--text);
  position: fixed;
  z-index: 101;
  display: flex;
  overflow: hidden;
  border-radius: 20px;
  width: 640px;
  top: 100px;
}

.searchbox-input-container {
  width: 100%;
  display: flex;
  flex-direction: row;
  line-height: 1.5em;
  font-weight: 400;
  min-height: 3rem;
}

.searchbox-body {
  flex-grow: 1;
  width: 100%;
  border-top: 1px solid var(--base);
}

.searchbox-result-section--posts {
  max-height: 450px;
  overflow-y: auto;
}

.searchbox-result-section--tags {
  max-height: 250px;
  overflow-y: auto;
}

.searchbox-result-item,
.searchbox-result-section header {
  padding: 0.75em 1em;
}

.searchbox-result-section {
  border-bottom: 1px dotted var(--base);
}

.searchbox-result-item {
  display: flex;
  flex-direction: row;
}

.searchbox-result-content {
  overflow: hidden;
}

.searchbox-result-preview {
  color: var(--subtext0);
  margin-top: 0.25em;
}

.searchbox-result-preview,
.searchbox-result-title {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* #endregion Search */

.cover-image {
  position: relative;
  display: block;
  overflow: hidden;
  height: 380px;
  border-radius: var(--radius);

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

  .cover-lqip {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    filter: blur(10px);
  }

  .cover-origin {
    position: relative;
    z-index: 2;
  }
}

/* #region TOC */

.toc-button {
  position: fixed;
  top: 10rem;
  left: max(2rem, calc(50% - 25em - 10rem));
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background-color: transparent;
  border: none;
  cursor: pointer;

  > span {
    background-color: hsl(from var(--text) h s l / 0.5);
    height: 2px;
    left: calc(50% - 8px);
    position: absolute;
    width: 1rem;

    &:nth-child(1) {
      top: calc(50% - 6px);
    }

    &:nth-child(2) {
      width: 0.75rem;
      top: calc(50% - 1px);
    }

    &:nth-child(3) {
      top: calc(50% + 4px);
    }
  }
}

:popover-open {
  position: fixed;
  width: 100%;
  height: 100%;
  inset: 0;
  margin: 0;
  border: none;
  background: hsl(from var(--mantle) h s l / 0.7);
  backdrop-filter: blur(10px);
  &.toc-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: 600;
  }

  &.searchbox {
    font-family: var(--font-mono);
    line-height: 0;
    display: flex;
  }

  &.article-popover {
    position: fixed;
    width: fit-content;
    height: fit-content;
    inset: 0;
    margin: auto;
    max-width: 90vw;
    max-height: 85vh;
    border-radius: 16px;
    /* background: var(--mantle); */
    color: var(--text);
    box-shadow:
      0 20px 60px -15px rgba(0, 0, 0, 0.3),
      0 0 0 1px var(--surface0);
    overflow: hidden;

    &::backdrop {
      /* background: hsl(from var(--mantle) h s l / 0.7); */
      backdrop-filter: blur(10px);
      -webkit-backdrop-filter: blur(10px);
    }

    &.article-font-popover {
      max-width: min(460px, 90vw);
    }

    &.article-comment-popover {
      width: min(920px, 92vw);
      max-width: min(920px, 92vw);
    }
  }

  &#theme-selector-popover {
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

#icarus-toc-container {
  .toc {
    max-height: 80vh;
    overflow-y: auto;
    padding: 0;
    list-style: none;
    font-family: var(--article-font-family);
  }

  .toc-item {
    margin-bottom: 0.5rem;
  }

  .toc-child {
    padding-left: 1.5rem;
    list-style: none;
  }

  .toc-text {
    display: inline;
    color: var(--subtext0);

    .toc-level-2 & {
      color: var(--text);
      font-size: 1.8rem;
    }
    .toc-level-3 & {
      color: var(--subtext1);
      font-size: 1.5rem;
    }
    .toc-level-4 & {
      font-size: 1.25rem;
    }
    .toc-level-6 & {
      font-size: 0.875rem;
    }
    &:hover {
      color: var(--mauve);
    }
  }
}
