@import url("https://fonts.googleapis.com/css2?family=Instrument+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap");

:root {
  --color-primary: #4c8dff;
  --color-primary-strong: #6ba1ff;
  --color-secondary: #aab4c4;
  --color-background: #0a0b0d;
  --color-surface: #131519;
  --color-surface-muted: #16181c;
  --color-surface-soft: #12182a;
  --color-surface-elevated: #1a1d22;
  --color-text-primary: #edeef1;
  --color-text-secondary: #8b909a;
  --color-divider: #212429;
  --color-divider-strong: #2d3037;
  --color-error: #e5484d;
  --color-warning: #f2b84b;
  --color-info: #4c8dff;
  --color-success: #3ecf8e;
  --color-inline-code-bg: #181b21;
  --color-blockquote-bg: #14161a;
  --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-outline: none;
  --radius-sm: 5px;
  --radius-md: 7px;
  --radius-lg: 9px;
  --radius-xl: 12px;
  --container-width: 52rem;
}

html,
body {
  margin: 0;
  height: 100%;
  min-height: 100%;
  background: var(--color-background);
  color: var(--color-text-primary);
  font-family: "Instrument Sans", sans-serif;
  color-scheme: dark;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  line-height: 1.6;
  overflow-x: hidden;
  letter-spacing: -0.01em;
}

a {
  color: inherit;
  transition:
    color 0.15s ease,
    background-color 0.15s ease,
    border-color 0.15s ease;
}

button,
input,
select,
textarea {
  font: inherit;
}

code,
pre {
  font-family: "JetBrains Mono", "Consolas", "Monaco", "Courier New", monospace;
}

::selection {
  background: rgba(76, 141, 255, 0.28);
  color: #ffffff;
}

#main-content {
  display: block;
  height: 100%;
  min-height: 100%;
}

.page-container {
  width: min(calc(100% - 2rem), var(--container-width));
  margin-inline: auto;
  padding-inline: 1rem;
}

.page-section {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.flow-sm,
.flow,
.flow-lg,
.flow-xl,
.center-stack {
  display: flex;
  flex-direction: column;
}

.flow-sm {
  gap: 0.5rem;
}

.flow {
  gap: 1rem;
}

.flow-lg {
  gap: 1.5rem;
}

.flow-xl {
  gap: 2rem;
}

.row,
.row-between,
.row-end,
.row-center,
.pill-row,
.result-row,
.article-nav-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.row-between {
  justify-content: space-between;
}

.row-end {
  justify-content: flex-end;
}

.row-center,
.center-stack {
  justify-content: center;
  align-items: center;
}

.wrap,
.pill-row,
.article-nav-row,
.footer-links {
  flex-wrap: wrap;
}

.center-stack {
  gap: 1rem;
  text-align: center;
}

.text-display,
.text-page-title,
.text-section-title,
.text-heading,
.text-subtitle,
.text-body,
.text-caption {
  margin: 0;
}

.text-display {
  font-size: clamp(2.5rem, 7vw, 3.75rem);
  font-family: "Instrument Sans", sans-serif;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.text-page-title {
  font-size: clamp(1.7rem, 2.6vw, 1.95rem);
  font-family: "Instrument Sans", sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.text-section-title {
  font-size: clamp(1.2rem, 2vw, 1.4rem);
  font-family: "Instrument Sans", sans-serif;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.3;
}

.text-heading {
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.text-subtitle {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.text-body {
  font-size: 1rem;
  line-height: 1.75;
}

.text-caption {
  font-size: 0.76rem;
  letter-spacing: 0.06em;
}

.text-muted {
  color: var(--color-text-secondary);
}

.text-primary {
  color: var(--color-primary);
}

.text-center {
  text-align: center;
}

.text-gradient {
  color: var(--color-primary);
}

.link-muted,
.link-plain,
.link-strong {
  text-decoration: none;
  transition:
    color 0.15s ease,
    border-color 0.15s ease,
    background-color 0.15s ease;
}

.link-muted {
  color: var(--color-text-secondary);
}

.link-muted:hover,
.link-strong:hover,
.back-link:hover,
.link-plain:hover {
  color: var(--color-primary);
}

.link-plain {
  color: inherit;
}

.link-strong {
  color: var(--color-text-primary);
  font-weight: 600;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.9rem;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text-secondary);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.button,
.icon-button,
.pill,
.icon-btn,
.download-trigger {
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
    background-color: transparent;
}

.button,
.icon-button,
.icon-btn,
.download-trigger {
  border-radius: var(--radius-md);
}

.pill {
  border-radius: 999px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.5rem;
  padding: 0 1rem;
  color: var(--color-text-primary);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.button-outline,
.download-trigger {
  border-color: var(--color-divider);
  background: var(--color-surface);
}

.button-outline:hover,
.download-trigger:hover {
  background: var(--color-surface-elevated);
  border-color: var(--color-divider-strong);
}

.button-solid {
  border-color: transparent;
  background: var(--color-primary);
  color: #04111d;
  font-weight: 600;
}

.button-solid:hover {
  background: var(--color-primary-strong);
}

.button-soft {
  background: #ffdd00;
  color: #000;
  font-weight: 600;
}

.button-small {
  min-height: 1.9rem;
  padding-inline: 0.7rem;
  font-size: 0.88rem;
}

.button-ghost {
  background: transparent;
  border-color: transparent;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  padding: 0;
  background: var(--color-surface);
  color: var(--color-text-secondary);
}

.icon-button:hover:not(:disabled) {
  background: var(--color-surface-elevated);
  color: var(--color-text-primary);
}

.icon-button:disabled,
.button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.card {
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

.card-soft {
  background: var(--color-surface-soft);
}

.card-outline {
  box-shadow: none;
  padding: 1rem;
}

.card-content {
  padding: 1rem;
}

.divider {
  width: 100%;
  height: 1px;
  background: var(--color-divider);
}

.alert {
  padding: 0.9rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
}

.alert-error {
  border-color: rgba(248, 113, 113, 0.35);
  background: color-mix(in srgb, var(--color-error) 10%, transparent);
  color: #fecaca;
}

.alert-warning {
  border-color: rgba(251, 191, 36, 0.35);
  background: color-mix(in srgb, var(--color-warning) 10%, transparent);
  color: #fde68a;
}

.spinner {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 999px;
  border: 2px solid rgba(76, 141, 255, 0.2);
  border-top-color: var(--color-primary);
  animation: spin 0.9s linear infinite;
}

.spinner-lg {
  width: 2.25rem;
  height: 2.25rem;
  border-width: 3px;
}

.progress-bar {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 3px;
  border-radius: 999px;
  background: rgba(76, 141, 255, 0.14);
}

.progress-bar::before {
  content: "";
  position: absolute;
  inset: 0;
  width: 38%;
  background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
  animation: progress-slide 1.25s ease-in-out infinite;
}

.skeleton {
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.05));
  background-size: 240px 100%;
  animation: shimmer 1.1s linear infinite;
}

.code-component-loading {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0.9rem 1rem 1rem;
}

.code-component-loading-lines {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.code-component-loading-line {
  display: block;
  height: 0.75rem;
  border-radius: 4px;
  background: linear-gradient(
    90deg,
    rgba(76, 141, 255, 0.06) 0%,
    rgba(76, 141, 255, 0.12) 40%,
    rgba(76, 141, 255, 0.06) 80%,
    rgba(76, 141, 255, 0.06) 100%
  );
  background-size: 280% 100%;
  animation: code-shimmer 1.6s ease-in-out infinite;
}

.code-component-loading-line:nth-child(2) {
  animation-delay: 0.06s;
}

.code-component-loading-line:nth-child(3) {
  animation-delay: 0.12s;
}

.code-component-loading-line:nth-child(4) {
  animation-delay: 0.18s;
}

.code-component-loading-line:nth-child(5) {
  animation-delay: 0.24s;
}

.code-component-loading-line:nth-child(6) {
  animation-delay: 0.3s;
}

@keyframes code-shimmer {
  0% {
    background-position: 280% 0;
  }

  100% {
    background-position: -280% 0;
  }
}

.input-shell {
  position: relative;
}

.search-input-shell {
  padding: 0;
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  transition:
    border-color 0.15s ease,
    background-color 0.15s ease;
}

.input-shell .app-icon {
  position: absolute;
  left: 1.15rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1rem;
  height: 1rem;
  pointer-events: none;
  color: var(--color-text-secondary);
}

.input-native,
.select-native {
  width: 100%;
  min-height: 2.85rem;
  box-sizing: border-box;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-divider);
  background: var(--color-surface-elevated);
  color: var(--color-text-primary);
}

.input-native {
  padding: 0 1rem 0 3rem;
}

.search-input-shell .app-icon {
  left: 1.35rem;
  width: 1.15rem;
  height: 1.15rem;
  color: rgba(243, 247, 251, 0.68);
}

.search-input-shell .input-native {
  min-height: 4.35rem;
  padding: 0 1.35rem 0 3.95rem;
  border: 0;
  border-radius: inherit;
  background: transparent;
  box-shadow: none;
}

.search-input-shell .input-native:hover,
.search-input-shell .input-native:focus {
  border-color: transparent;
  box-shadow: none;
  outline: none;
}

.search-input-shell:focus-within {
  border-color: var(--color-primary);
  background: var(--color-surface-elevated);
}

.select-native {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding: 0 2.75rem 0 0.9rem;
  border-color: var(--color-divider);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M5 7.5L10 12.5L15 7.5' stroke='%238b909a' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  background-size: 1rem 1rem;
  color-scheme: dark;
  transition:
    border-color 0.15s ease,
    background-color 0.15s ease;
}

.select-native option,
.select-native optgroup {
  background: var(--color-surface-elevated);
  color: var(--color-text-primary);
}

.select-native option:checked,
.select-native option:hover,
.select-native option:focus {
  background: rgba(76, 141, 255, 0.12);
  color: #f8fafc;
}

.input-native::placeholder {
  color: var(--color-text-secondary);
}

.input-native:hover,
.select-native:hover {
  border-color: var(--color-divider-strong);
}

.input-native:focus,
.select-native:focus,
.download-trigger:focus,
.button:focus,
.icon-button:focus,
.pill:focus {
  outline: 2px solid rgba(76, 141, 255, 0.4);
  outline-offset: 2px;
}

.select-native:focus {
  border-color: var(--color-primary);
}

.controls-row {
  display: grid;
  grid-template-columns: minmax(0, 1.85fr) minmax(9rem, 0.9fr) minmax(10.5rem, 1fr);
  align-items: center;
  gap: 0.75rem;
}

.content-list-controls {
  padding: 0.65rem;
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}

.controls-row .input-shell {
  min-width: 0;
  width: 100%;
}

.controls-row .select-native {
  min-width: 0;
  width: 100%;
}

@media (max-width: 640px) {
  .controls-row {
    grid-template-columns: minmax(0, 1.5fr) minmax(6.75rem, 0.85fr) minmax(7.5rem, 0.95fr);
    gap: 0.5rem;
  }
}

.pill-row {
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 1.9rem;
  padding: 0 0.7rem;
  background: var(--color-surface-elevated);
  border-color: var(--color-divider);
  color: var(--color-text-primary);
}

.pill:hover {
  background: var(--color-surface-muted);
  border-color: var(--color-divider-strong);
}

.pill-active {
  background: var(--color-surface-soft);
  border-color: rgba(76, 141, 255, 0.35);
  color: var(--color-primary-strong);
}

.tag-list,
.meta-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
}

.meta-list {
  align-items: center;
}

.list-panel {
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
  overflow: hidden;

  .mb-section {
    margin-bottom: 1.5rem;
  }
}

.list-entry {
  display: block;
  padding: 1rem;
  text-decoration: none;
}

.html-heading {
  position: relative;
  color: var(--color-text-primary);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0;
}

.html-heading-h1 {
  font-size: clamp(1.9rem, 3.5vw, 2.35rem);
  margin: 3rem 0 1.25rem;
}

.html-heading-h2 {
  font-size: clamp(1.45rem, 2.5vw, 1.75rem);
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid rgba(76, 141, 255, 0.14);
}

.html-heading-h3 {
  font-size: clamp(1.2rem, 2vw, 1.4rem);
  margin: 2rem 0 0.75rem;
}

.html-heading-h4 {
  font-size: 1.15rem;
  margin: 1.5rem 0 0.75rem;
}

.html-heading-h5 {
  font-size: 1.1rem;
  margin: 1rem 0 0.5rem;
}

.html-heading-h6 {
  font-size: 1.05rem;
  margin: 0.75rem 0 0.5rem;
}

.html-paragraph {
  margin: 0 0 1.1rem;
  color: var(--color-text-secondary);
  line-height: 1.8;
  overflow-wrap: break-word;
}

.html-link {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(76, 141, 255, 0.35);
  text-underline-offset: 0.18em;
  transition:
    color 0.15s ease,
    text-decoration-color 0.15s ease;
}

.html-link:hover {
  color: var(--color-primary-strong);
  text-decoration-color: var(--color-primary-strong);
}

.html-inline-code {
  margin: 0 0.2rem;
  padding: 0.16rem 0.4rem;
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-sm);
  background: var(--color-inline-code-bg);
  color: #cbd9e8;
  font-size: 0.9em;
}

.html-pre-block {
  margin: 1.25rem 0;
  padding: 1rem 1.1rem;
  overflow-x: auto;
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
  background: var(--color-surface-elevated);
  color: #dbe7f3;
}

.html-pre-block pre {
  margin: 0;
}

.html-list {
  margin: 1rem 0 1.25rem;
  padding-left: 2rem;
  color: var(--color-text-secondary);
}

.html-list li::marker {
  color: var(--color-primary);
}

.html-list-item {
  margin-bottom: 0.5rem;
  padding-left: 0.25rem;
}

.html-table-wrapper {
  margin: 1.5rem 0;
  overflow-x: auto;
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

.html-table {
  width: 100%;
  border-collapse: collapse;
}

.html-table thead {
  background: var(--color-surface-elevated);
}

.html-table th,
.html-table td {
  padding: 0.8rem 0.9rem;
  border-bottom: 1px solid var(--color-divider);
  text-align: left;
}

.html-table th {
  color: var(--color-text-primary);
  font-weight: 600;
}

.html-table td {
  color: var(--color-text-secondary);
}

.html-table tbody tr:nth-child(even) {
  background: var(--color-surface-muted);
}

.html-table tbody tr:hover {
  background: var(--color-surface-soft);
}

.html-blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.1rem 1rem 1.3rem;
  border-left: 3px solid var(--color-primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  background: var(--color-blockquote-bg);
}

.html-blockquote-content {
  color: var(--color-text-secondary);
  font-style: italic;
}

.html-details {
  margin: 1.5rem 0;
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  overflow: hidden;
}

.html-summary {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem 1.1rem;
  color: var(--color-text-primary);
  font-weight: 700;
  line-height: 1.4;
  cursor: pointer;
  list-style: none;
  transition: background-color 0.15s ease;
}

.html-summary::-webkit-details-marker {
  display: none;
}

.html-summary::before {
  content: "+";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border: 1px solid var(--color-divider-strong);
  border-radius: var(--radius-sm);
  background: var(--color-surface-elevated);
  color: var(--color-primary);
  font-size: 1rem;
  font-weight: 700;
  flex: 0 0 auto;
  transition:
    background-color 0.15s ease,
    color 0.15s ease;
}

.html-details[open] .html-summary {
  background: var(--color-surface-elevated);
}

.html-details[open] .html-summary::before {
  content: "−";
  background: var(--color-primary);
  color: #04111d;
}

.html-summary:hover {
  background: var(--color-surface-muted);
}

.html-summary:focus-visible {
  outline: 2px solid rgba(76, 141, 255, 0.6);
  outline-offset: -2px;
}

.html-details-content {
  padding: 0 1.1rem 1.1rem;
  border-top: 1px solid var(--color-divider);
  color: var(--color-text-secondary);
}

.html-details-content > :first-child {
  margin-top: 1rem;
}

.html-details-content > :last-child {
  margin-bottom: 0;
}

.toc {
  margin: 1rem 0 1.5rem;
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  overflow: hidden;
}

.toc-summary {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem 1.1rem;
  color: var(--color-text-primary);
  font-weight: 700;
  line-height: 1.4;
  cursor: pointer;
  list-style: none;
  transition: background-color 0.15s ease;
}

.toc-summary::-webkit-details-marker {
  display: none;
}

.toc-summary::before {
  content: "≡";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border: 1px solid var(--color-divider-strong);
  border-radius: var(--radius-sm);
  background: var(--color-surface-elevated);
  color: var(--color-primary);
  font-size: 0.85rem;
  font-weight: 700;
  flex: 0 0 auto;
  transition:
    background-color 0.15s ease,
    color 0.15s ease;
}

.toc[open] .toc-summary {
  background: var(--color-surface-elevated);
}

.toc[open] .toc-summary::before {
  content: "×";
  background: var(--color-primary);
  color: #04111d;
}

.toc-summary:hover {
  background: var(--color-surface-muted);
}

.toc-summary:focus-visible {
  outline: 2px solid rgba(76, 141, 255, 0.6);
  outline-offset: -2px;
}

.toc-nav {
  padding: 0 1.1rem 1.1rem;
  border-top: 1px solid var(--color-divider);
  display: flex;
  flex-direction: column;
  gap: 0;
}

.toc-nav > :first-child {
  margin-top: 1rem;
}

.toc-link {
  display: block;
  padding: 0.35rem 0.5rem;
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  line-height: 1.45;
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition:
    color 0.15s ease,
    background-color 0.15s ease;
}

.toc-link:hover {
  color: var(--color-primary);
  background: var(--color-surface-soft);
}

.toc-link:focus-visible {
  outline: 2px solid rgba(76, 141, 255, 0.6);
  outline-offset: -2px;
}

.toc-level-2 {
  font-weight: 600;
}

.toc-level-3 {
  font-weight: 500;
}

.toc-level-4,
.toc-level-5,
.toc-level-6 {
  font-weight: 400;
  font-size: 0.85rem;
}

.list-entry + .divider {
  margin: 0;
}

.article-divider {
  margin: 1rem 0;
}

.list-entry:hover {
  background: rgba(255, 255, 255, 0.02);
}

.guide-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--color-text-primary);
  color: var(--color-background);
  font-size: 0.8rem;
  font-weight: 700;
  flex: 0 0 auto;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 1.65rem;
  padding: 0 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(76, 141, 255, 0.18);
  background: transparent;
  color: var(--color-text-secondary);
  font-size: 0.75rem;
}

.badge-muted {
  border-color: rgba(76, 141, 255, 0.1);
  background: rgba(76, 141, 255, 0.06);
  color: var(--color-text-secondary);
  font-size: 0.65rem;
  padding: 0 0.45rem;
  min-height: 1.35rem;
}

.badge-primary {
  border-color: rgba(76, 141, 255, 0.25);
  background: rgba(76, 141, 255, 0.1);
  color: var(--color-primary);
  font-weight: 600;
  font-size: 0.7rem;
  padding: 0 0.5rem;
  min-height: 1.35rem;
}

.repo-lang-dot {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.repo-lang-dot-indicator {
  display: inline-block;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 999px;
}

.home-shell {
  gap: 2rem;
  padding-top: 2.5rem;
  padding-bottom: 2rem;
}

.home-search-panel {
  gap: 0.9rem;
  padding: 0;
}

.search-results-panel {
  gap: 0.5rem;
}

.search-result-card,
.post-card,
.content-list-card {
  padding: 0.9rem 1rem;
  background: rgba(255, 255, 255, 0.02);
}

.search-empty-state {
  padding: 0.5rem 0.15rem 0;
}

.home-section {
  padding: 1.35rem;
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-xl);
  background: var(--color-surface);
}

.section-header {
  align-items: flex-end;
  gap: 1rem;
}

.section-description,
.content-list-description {
  max-width: 42rem;
}

.posts-stack {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.post-card-link,
.content-list-card-link {
  display: block;
}

.links-section {
  padding-bottom: 1.25rem;
}

.links-cloud {
  gap: 0.7rem;
}

.social-link-chip {
  display: inline-flex;
  align-items: center;
  min-height: 2.15rem;
  padding: 0 0.85rem;
  border: 1px solid var(--color-divider);
  border-radius: 999px;
  background: var(--color-surface);
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease;
}

.social-link-chip:hover {
  background: var(--color-surface-elevated);
  border-color: var(--color-divider-strong);
}

.content-list-page {
  padding-top: 2.25rem;
}

.content-list-shell {
  gap: 1.5rem;
}

.content-list-hero {
  padding: 1.35rem;
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-xl);
  background: var(--color-surface);
}

.content-list-result-row {
  padding-left: 0.25rem;
}

.hover-card {
  border: 1px solid transparent;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease;
  padding: 0.5rem;
  border-radius: var(--radius-lg);
  margin-left: -0.5rem;
  margin-right: -0.5rem;
}

.hover-card:hover {
  background-color: var(--color-surface-soft);
  border-color: rgba(76, 141, 255, 0.22);
}

.app-icon {
  width: 1.1rem;
  height: 1.1rem;
  flex: 0 0 auto;
}

.icon-lg {
  width: 1.4rem;
  height: 1.4rem;
}

.status-icon {
  width: 3rem;
  height: 3rem;
}

.status-page,
.redirect-page {
  min-height: 80vh;
  padding: 1rem;
}

.redirect-page {
  box-sizing: border-box;
  min-height: 100vh;
}

.status-copy {
  max-width: 34rem;
}

.route-loading-shell {
  min-height: 70vh;
}

.route-loading-state {
  min-height: 70vh;
}

.code-component-container {
  position: relative;
  margin: 1.5rem 0;
  overflow: hidden;
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

.code-component-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.65rem 0.45rem 0.8rem;
  background: var(--color-surface-elevated);
  border-bottom: 1px solid var(--color-divider);
}

.code-component-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.code-component-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: var(--color-primary);
}

.code-component-language {
  color: var(--color-secondary);
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.code-copy-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 1.9rem;
  padding: 0.35rem 0.55rem;
  border-color: var(--color-divider);
  background: var(--color-surface-elevated);
  color: var(--color-text-secondary);
}

.code-copy-button:hover {
  border-color: var(--color-divider-strong);
  background: var(--color-surface-muted);
  color: var(--color-text-primary);
}

.code-component-pre {
  margin: 0;
  padding: 0.9rem 1rem 1rem;
  max-height: 60vh;
  overflow: auto;
  background: var(--color-surface-elevated);
}

.code-component-pre::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.code-component-pre::-webkit-scrollbar-track {
  background: var(--color-surface-muted);
  border-radius: 999px;
}

.code-component-pre::-webkit-scrollbar-thumb {
  background: var(--color-divider-strong);
  border-radius: 999px;
}

.code-component-pre::-webkit-scrollbar-thumb:hover {
  background: rgba(76, 141, 255, 0.4);
}

.code-component-pre::-webkit-scrollbar-corner {
  background: var(--color-surface-muted);
}

.code-component-pre code {
  display: block;
  min-width: max-content;
  font-size: 0.95rem;
  line-height: 1.75;
  color: #dbe7f3;
}

.article-nav-row {
  margin-top: 1rem;
  align-items: stretch;
}

.article-nav-card {
  flex: 1 1 200px;
  min-width: 200px;
  padding: 0.75rem;
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
}

.article-nav-card.article-nav-next {
  text-align: right;
}

.article-nav-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: inherit;
  text-decoration: none;
}

.article-nav-next .article-nav-link {
  justify-content: flex-end;
}

.article-nav-random {
  text-align: center;
  background: rgba(76, 141, 255, 0.04);
  border-color: rgba(76, 141, 255, 0.12);
}

.article-nav-random-link {
  justify-content: center;
  gap: 0.45rem;
}

.article-nav-random-link:hover {
  color: var(--color-primary);
}

.support-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem;
}

.support-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 999px;
  flex: 0 0 auto;
}

.support-avatar-coffee {
  background: #ffdd00;
  color: #000;
}

.support-avatar-heart {
  background: pink;
  color: var(--color-error);
}

.download-menu {
  position: relative;
  display: inline-flex;
  justify-content: flex-end;
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.download-menu-panel {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 240px;
  z-index: 20;
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
  background: var(--color-surface-elevated);
  overflow: hidden;
}

.download-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.5rem;
  padding: 0 1rem;
  color: var(--color-text-primary);
}

.menu-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  gap: 1rem;
}

.menu-item-row + .menu-item-row {
  border-top: 1px solid var(--color-divider);
}

.menu-item-label {
  font-size: 0.875rem;
  color: var(--color-text-primary);
  white-space: nowrap;
}

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

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-sm);
  color: var(--color-text-secondary);
  transition:
    background 0.15s ease,
    color 0.15s ease;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-text-primary);
}

.readme-article,
.article-content {
  margin-top: 1rem;
}

.result-row {
  margin-bottom: 0.5rem;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes progress-slide {
  0% {
    transform: translateX(-120%);
  }

  100% {
    transform: translateX(340%);
  }
}

@keyframes shimmer {
  from {
    background-position: -240px 0;
  }

  to {
    background-position: 240px 0;
  }
}

@media (max-width: 640px) {
  .page-container {
    width: min(calc(100% - 1rem), var(--container-width));
    padding-inline: 0.5rem;
  }

  .page-section,
  .home-shell {
    padding-top: 1.4rem;
    padding-bottom: 1.4rem;
  }

  .row-between {
    align-items: flex-start;
    flex-direction: column;
  }

  .back-link,
  .social-link-chip {
    width: fit-content;
  }

  .home-search-panel,
  .home-section,
  .content-list-hero,
  .content-list-controls {
    padding: 1rem;
    border-radius: var(--radius-lg);
  }

  .home-search-panel {
    padding: 0;
    border-radius: 0;
  }

  .support-card {
    width: 100%;
    align-items: flex-start;
  }

  .download-menu {
    display: flex;
    width: 100%;
  }

  .download-trigger,
  .download-menu-panel {
    width: 100%;
  }
}

/* Heading Anchor Styles */
.heading-anchor {
  position: absolute;
  left: -1em;
  opacity: 0;
  color: var(--color-text-secondary);
  text-decoration: none;
  font-weight: 400;
  transition:
    opacity 0.2s ease,
    color 0.2s ease;
  user-select: none;
  padding-right: 0.2em;
}

.html-heading:hover .heading-anchor,
.html-heading:focus-within .heading-anchor,
.heading-anchor:focus {
  opacity: 1;
  color: var(--color-text-secondary);
  text-decoration: none;
}

.heading-anchor:hover,
.heading-anchor:active {
  color: var(--color-primary) !important;
  text-decoration: none;
}

@media (max-width: 768px) {
  .heading-anchor {
    position: static;
    opacity: 1;
    margin-right: 0.3em;
  }
}
