/* LongCipher brand tokens — single blue accent, sharp 2px, shadow-as-border */
:root {
  --md-text-font: "DM Sans", ui-sans-serif, system-ui, -apple-system, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --md-code-font: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --md-primary-fg-color: #0a72ef;
  --md-primary-fg-color--light: #3b8bff;
  --md-primary-fg-color--dark: #0659c4;
  --md-accent-fg-color: #0a72ef;
  --md-accent-fg-color--transparent: rgba(10, 114, 239, 0.1);
  --md-default-bg-color: #fafbfc;
  --lc-ring: rgba(10, 114, 239, 0.2);
  --lc-hairline: #e0e2e8;
  font-feature-settings: "liga" 1;
}

[data-md-color-scheme="slate"] {
  --md-primary-fg-color: #3b8bff;
  --md-primary-fg-color--light: #6aa5ff;
  --md-primary-fg-color--dark: #0a72ef;
  --md-accent-fg-color: #3b8bff;
  --md-accent-fg-color--transparent: rgba(59, 139, 255, 0.14);
  --md-default-bg-color: #0a0a0c;
  --md-default-bg-color--light: #17181c;
  --md-default-fg-color: #e8e9ec;
  --lc-ring: rgba(59, 139, 255, 0.28);
  --lc-hairline: #2a2d33;
}

*:focus-visible {
  outline: 2px solid #0a72ef;
  outline-offset: 2px;
}

body {
  font-variant-numeric: tabular-nums;
}

.md-typeset h1,
.md-typeset h2,
.md-typeset h3 {
  text-wrap: balance;
  letter-spacing: -0.01em;
}

.md-typeset h1 {
  font-weight: 700;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  box-shadow: 0 1px 0 var(--lc-hairline);
}

.md-typeset h2 {
  font-weight: 600;
  margin-top: 2rem;
  padding-top: 1rem;
}

.md-typeset h3 {
  font-weight: 600;
}

.md-header {
  background-color: rgba(250, 251, 252, 0.92);
  box-shadow: 0 1px 0 var(--lc-hairline);
}

[data-md-color-scheme="slate"] .md-header {
  background-color: rgba(10, 10, 12, 0.92);
}

.md-tabs {
  background-color: transparent;
}

.md-announce {
  background: #0a72ef;
  color: #fff;
}

[data-md-color-scheme="slate"] .md-announce {
  background: #0659c4;
}

.md-announce a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.md-announce a:hover {
  color: #fafbfc;
}

.md-typeset a {
  color: var(--md-primary-fg-color);
  text-decoration: none;
  box-shadow: inset 0 -1px 0 var(--lc-ring);
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.md-typeset a:hover {
  background-color: var(--md-accent-fg-color--transparent);
  box-shadow: inset 0 -1px 0 var(--md-primary-fg-color);
}

.md-typeset .admonition {
  border-width: 0 0 0 2px;
  border-radius: 2px;
  box-shadow:
    rgba(23, 23, 23, 0.08) 0 0 0 1px,
    rgba(23, 23, 23, 0.04) 0 1px 2px;
}

.md-typeset .admonition-title {
  font-weight: 600;
}

.md-typeset table:not([class]) {
  border-radius: 2px;
  display: block;
  overflow-x: auto;
  box-shadow:
    rgba(23, 23, 23, 0.08) 0 0 0 1px,
    rgba(23, 23, 23, 0.04) 0 1px 2px;
}

.md-typeset table:not([class]) th {
  background: #0a72ef;
  color: #fff;
  font-weight: 600;
}

[data-md-color-scheme="slate"] .md-typeset table:not([class]) th {
  background: #0659c4;
}

.md-typeset table:not([class]) tr:hover td {
  background-color: var(--md-accent-fg-color--transparent);
}

.md-typeset pre {
  border-radius: 2px;
  box-shadow:
    rgba(23, 23, 23, 0.08) 0 0 0 1px,
    rgba(23, 23, 23, 0.04) 0 1px 1px;
}

.md-typeset code {
  border-radius: 2px;
  padding: 0.1em 0.3em;
}

.md-typeset .md-button {
  border-radius: 2px;
  padding: 0.5em 1.2em;
  font-weight: 500;
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.md-typeset .md-button--primary {
  background: #0a72ef;
  border: none;
  color: #fff;
}

.md-typeset .md-button--primary:hover {
  background: #0659c4;
}

.md-nav__item .md-nav__link--active {
  font-weight: 600;
  color: var(--md-primary-fg-color);
}

.md-nav__item .md-nav__link:hover {
  color: var(--md-primary-fg-color);
}

.md-search__input {
  border-radius: 2px;
  font-size: 16px;
}

.md-sidebar--primary .md-sidebar__scrollwrap {
  box-shadow: 1px 0 0 var(--lc-hairline);
}

.md-top {
  border-radius: 2px;
  box-shadow:
    rgba(23, 23, 23, 0.1) 0 0 0 1px,
    rgba(23, 23, 23, 0.1) 0 4px 12px;
}

.mermaid {
  text-align: center;
  margin: 1.5rem 0;
  max-width: 100%;
  overflow-x: auto;
}

.mermaid svg {
  max-width: 100%;
  height: auto;
}

.glightbox-clean .gslide-description {
  background: rgba(255, 255, 255, 0.95);
}

[data-md-color-scheme="slate"] .glightbox-clean .gslide-description {
  background: rgba(10, 10, 12, 0.95);
}

.md-typeset img {
  border-radius: 2px;
}

.task-list-item [type="checkbox"] {
  accent-color: var(--md-primary-fg-color);
}

::selection {
  background-color: var(--md-primary-fg-color);
  color: #fff;
}

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

::-webkit-scrollbar-track {
  background: var(--md-default-bg-color);
}

::-webkit-scrollbar-thumb {
  background: var(--md-default-fg-color--lightest);
  border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--md-default-fg-color--light);
}

.git-revision-info {
  margin-top: 2rem;
  padding-top: 1rem;
  box-shadow: 0 -1px 0 var(--lc-hairline);
  font-size: 0.8rem;
  color: var(--md-default-fg-color--light);
}

#giscus-container {
  margin-top: 3rem;
  padding-top: 2rem;
  box-shadow: 0 -1px 0 var(--lc-hairline);
  min-height: 200px;
}

#reading-progress-bar,
#back-to-top-btn {
  display: none !important;
}

@media print {
  .md-header, .md-sidebar, .md-footer, .md-announce {
    display: none !important;
  }
  .md-content {
    max-width: 100%;
    margin: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
