:root {
  --background: #fafafa;
  --bg-image: linear-gradient(rgba(250, 250, 250, 0.8), rgba(250, 250, 250, 0.8)), url('./img/background-texture.webp');
  --surface: #ffffff;
  --on-surface: #333333;
  --on-surface-variant: #888888;
  --outline: #dddddd;
  --link: #000000;
  --overlay: rgba(0, 0, 0, 0.05);
  --radius-lg: 15px;
  --radius-md: 8px;
  --radius-sm: 5px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background-color: var(--background);
  background-image: var(--bg-image);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: var(--on-surface);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  overflow: hidden;
}

/* Typography */
h1,
h2,
h3,
h4 {
  font-weight: 600;
  color: #000000;
  letter-spacing: -0.02em;
}

.app-shell,
#graph-view {
  width: 100vw;
  height: 100vh;
}

canvas {
  display: block;
  width: 100vw;
  height: 100vh;
}

/* Status & Tooltip */
.app-status {
  position: fixed;
  left: 1.5rem;
  bottom: 1.5rem;
  z-index: 12;
  padding: 0.4rem 0.8rem;
  background: var(--surface);
  color: var(--on-surface-variant);
  font-size: 0.8rem;
  font-weight: 500;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.tooltip {
  position: fixed;
  pointer-events: none;
  z-index: 60;
  padding: 0.4rem 0.7rem;
  background: #000;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 500;
  transform: translate(12px, -12px);
  border-radius: var(--radius-sm);
}

.hidden {
  display: none !important;
}

/* Note Panel & Backdrop */
.note-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: var(--overlay);
  backdrop-filter: blur(4px);
}

.note-panel {
  position: fixed;
  top: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 41;
  width: min(44rem, 90vw);
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.note-panel__header {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 2rem;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--outline);
  z-index: 11;
}

.note-panel__eyebrow {
  color: var(--on-surface-variant);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.note-panel__nav {
  display: flex;
  gap: 0.5rem;
}

.note-nav-btn {
  padding: 0 0.5rem;
}

.note-nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

.icon-button {
  height: 32px;
  padding: 0 1rem;
  border: 1.5px solid #000;
  border-radius: var(--radius-sm);
  background: transparent;
  color: #000;
  font-family: "Inter", sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
}

.icon-button:hover {
  background: #000;
  color: #fff;
}

#note-title {
  padding: 2.5rem 2.5rem 1rem;
  margin: 0;
  font-size: 2.2rem;
  font-weight: 700;
}

.note-content {
  padding: 0 2.5rem 3rem;
  line-height: 1.7;
  font-size: 1rem;
  color: #555;
  /* Prevent any direct child from breaking out of the content column */
  overflow-x: hidden;
}

.note-content h1,
.note-content h2,
.note-content h3 {
  color: #000;
  border-bottom: 1px solid var(--outline);
  padding-bottom: 0.4rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.note-content a {
  color: var(--link);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.note-content pre {
  overflow-x: auto;
  max-width: 100%;
  width: 100%;
  padding: 1rem;
  background: #f5f5f5;
  border-radius: var(--radius-md);
  margin: 1.5rem 0;
}

.note-content code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.9em;
  background: #f5f5f5;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  word-break: break-word;
}

.note-content blockquote {
  margin: 1.5rem 0;
  padding: 0.5rem 1.2rem;
  border-left: 3px solid #000;
  background: #fcfcfc;
  color: #666;
}

/* Callouts */
.callout {
  margin: 1.5rem 0;
  padding: 0;
  border-left: 4px solid var(--callout-color, #000000);
  background: var(--callout-bg, #fdfdfd);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

details.callout {
  transition: all 0.2s ease;
}

.callout-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--callout-color, #000000);
  user-select: none;
  background: var(--callout-header-bg, rgba(0, 0, 0, 0.02));
}

summary.callout-header {
  cursor: pointer;
  list-style: none;
}

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

.callout-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
}

.callout-title {
  flex: 1;
}

.callout-fold-icon {
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  border-right: 1.5px solid var(--callout-color, #000000);
  border-bottom: 1.5px solid var(--callout-color, #000000);
  transform: rotate(-45deg);
  transition: transform 0.2s ease;
  margin-right: 0.2rem;
}

details.callout[open] .callout-fold-icon {
  transform: rotate(45deg);
}

.callout-content {
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--on-surface);
}

.callout-content> :first-child {
  margin-top: 0;
}

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

/* Callout Types (HSL colors) */
.callout--note {
  --callout-color: #0284c7;
  /* Sky blue */
  --callout-bg: #f0f9ff;
  --callout-header-bg: #e0f2fe;
}

.callout--info,
.callout--todo {
  --callout-color: #0891b2;
  /* Cyan */
  --callout-bg: #ecfeff;
  --callout-header-bg: #cffafe;
}

.callout--tip,
.callout--success,
.callout--check {
  --callout-color: #16a34a;
  /* Green */
  --callout-bg: #f0fdf4;
  --callout-header-bg: #dcfce7;
}

.callout--question,
.callout--help,
.callout--faq {
  --callout-color: #7c3aed;
  /* Purple */
  --callout-bg: #f5f3ff;
  --callout-header-bg: #ede9fe;
}

.callout--warning,
.callout--caution {
  --callout-color: #ea580c;
  /* Orange */
  --callout-bg: #fff7ed;
  --callout-header-bg: #ffedd5;
}

.callout--failure,
.callout--danger,
.callout--bug,
.callout--error {
  --callout-color: #dc2626;
  /* Red */
  --callout-bg: #fef2f2;
  --callout-header-bg: #fee2e2;
}

.callout--quote,
.callout--cite {
  --callout-color: #64748b;
  /* Grey */
  --callout-bg: #f8fafc;
  --callout-header-bg: #f1f5f9;
}

.note-content img {
  max-width: 100%;
  border-radius: var(--radius-md);
}

.note-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.note-content td,
.note-content th {
  padding: 0.75rem;
  border: 1px solid var(--outline);
  white-space: nowrap;
}

.note-content th {
  background: #f9f9f9;
  font-weight: 600;
}

.note-content hr {
  border: 0;
  border-top: 1px solid var(--outline);
  margin: 2rem 0;
}

/*
  MathJax output overflow — applied at all viewport widths because the note
  content column can be narrow on desktop too (split-panel layout).
  MathJax renders display math as mjx-container[display="true"]; we make
  that scrollable so wide matrices don't clip.
*/
.note-content mjx-container[display="true"] {
  display: block;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  padding-bottom: 4px;
  /* prevent scrollbar from clipping descenders */
}

.note-content .math-block {
  margin: 1.5rem 0;
  overflow-x: auto;
}

.note-content mjx-container:not([display="true"]) {
  display: inline-block;
  max-width: 100%;
  overflow-x: auto;
  vertical-align: middle;
}

.note-content .mermaid {
  margin: 1.5rem 0;
  display: flex;
  justify-content: center;
  overflow-x: auto;
}

.math-block {
  margin: 1.5rem 0;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.internal-note-link {
  cursor: pointer;
}

.internal-note-link--ghost {
  color: #8b5e00;
  text-decoration-style: dashed;
  cursor: default;
}

/* Responsive */
@media (max-width: 650px) {
  .note-panel {
    top: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    border-radius: 0;
  }

  #note-title {
    padding: 1.5rem 1.25rem 0.75rem;
    font-size: 1.6rem;
  }

  .note-content {
    padding: 0 1.25rem 2rem;
    font-size: 0.95rem;
  }
}

.main-nav {
  position: fixed;
  top: 1.5rem;
  left: 1.5rem;
  right: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 15;
  background: transparent;
}

.back-link {
  text-decoration: none;
  color: var(--on-surface-variant);
  font-size: 1.8rem;
  font-weight: 400;
  transition: all 0.2s ease;
  line-height: 1;
}

.back-link:hover {
  color: #000;
  transform: translateX(-3px);
}

.missing-attachment {
  display: inline-block;
  padding: 2px 8px;
  background: #fff0f0;
  border: 1px dashed #ba1a1a;
  color: #ba1a1a;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  margin: 0.5rem 0;
}

/* Search Overlay */
.search-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(3px);
}

.search-container {
  position: fixed;
  top: 18vh;
  left: 50%;
  transform: translateX(-50%);
  z-index: 51;
  width: min(500px, 90vw);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--outline);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.search-input {
  width: 100%;
  padding: 1rem 1.25rem;
  border: none;
  background: transparent;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--on-surface);
  outline: none;
}

.search-input::placeholder {
  color: var(--on-surface-variant);
  font-weight: 400;
}

.search-results {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 320px;
  overflow-y: auto;
  border-top: 1px solid var(--outline);
}

.search-results:empty {
  border-top: none;
}

.search-result-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0.65rem 1.25rem;
  cursor: pointer;
  transition: background 0.12s ease;
}

.search-result-item:hover,
.search-result-item.selected {
  background: rgba(0, 0, 0, 0.05);
}

.search-result-item.selected {
  background: rgba(0, 0, 0, 0.08);
}

.search-result-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--on-surface);
}

.search-result-path {
  font-size: 0.78rem;
  color: var(--on-surface-variant);
}

.search-result-title mark {
  background: rgba(0, 0, 0, 0.1);
  color: inherit;
  border-radius: 2px;
  padding: 0 1px;
}

.search-hint {
  padding: 0.45rem 1.25rem;
  font-size: 0.72rem;
  color: var(--on-surface-variant);
  border-top: 1px solid var(--outline);
  text-align: center;
}

.search-hint kbd {
  display: inline-block;
  padding: 1px 5px;
  font-family: inherit;
  font-size: 0.7rem;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 3px;
}

/* Nav search button */
.nav-search-btn {
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.6rem 0.4rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-family: "Inter", sans-serif;
  color: var(--on-surface-variant);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.search-text {
  font-size: 0.9rem;
  font-weight: 500;
}

.search-kbd {
  background: #f1f1f1;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 0.7rem;
  font-family: inherit;
  font-weight: 600;
  color: #666;
}

.nav-search-btn:hover {
  border-color: #aaa;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.nav-search-btn:hover .search-text {
  color: #000;
}

@media (max-width: 650px) {
  .search-container {
    top: 8vh;
    width: 95vw;
    border-radius: var(--radius-md);
  }

  .search-hint {
    display: none;
  }
}

/* Local Graph & TOC Styles & Column Layouts */
.note-panel__body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.toc-container {
  padding: 1.5rem 1.8rem;
  background: var(--surface);
  border-top: 1px solid var(--outline);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.toc-header {
  font-size: 0.95rem;
  font-weight: 600;
  color: #000000;
}

.toc-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toc-link {
  text-decoration: none;
  color: var(--on-surface-variant);
  font-size: 0.85rem;
  transition: color 0.2s ease;
  line-height: 1.3;
}

.toc-link:hover {
  color: var(--on-surface);
}

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

.toc-tree ul {
  list-style: none;
  padding-left: 1rem;
  margin: 0;
}

.toc-tree li {
  margin: 0.2rem 0;
}

.toc-tree details>summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}

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

.toc-tree details>summary::before {
  content: "▶";
  font-size: 0.6rem;
  color: var(--on-surface-variant);
  transition: transform 0.2s ease;
  display: inline-block;
}

.toc-tree details[open]>summary::before {
  transform: rotate(90deg);
}

.note-panel__content-col {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.note-panel__sidebar-col {
  width: 280px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

@media (min-width: 1025px) {
  .note-panel {
    width: min(62rem, 95vw) !important;
  }

  .note-panel__sidebar-col {
    width: 310px;
  }
}

@media (max-width: 1024px) {
  .note-panel__body {
    flex-direction: column;
    overflow-y: auto;
  }

  .note-panel__content-col {
    overflow-y: visible;
    flex: none;
  }

  .note-panel__sidebar-col {
    width: 100%;
    border-left: none;
    flex: none;
  }
}

.local-graph-container {
  padding: 1.5rem 1.8rem 2.2rem;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.local-graph-header {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.local-graph-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #000000;
}

.local-graph-subtitle {
  font-size: 0.75rem;
  color: var(--on-surface-variant);
}

.local-graph-view {
  width: 100%;
  height: 280px;
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
}

.local-graph-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
  font-size: 0.85rem;
  color: var(--on-surface-variant);
  font-style: italic;
}

.local-graph-view svg {
  display: block;
  width: 100%;
  height: 100%;
}

.local-graph-link {
  stroke: rgba(0, 0, 0, 0.08);
  stroke-width: 1px;
  stroke-dasharray: 2 2;
  transition: stroke 0.2s ease, stroke-width 0.2s ease;
}

.local-graph-link.active-link {
  stroke: rgba(0, 0, 0, 0.4);
  stroke-width: 1.5px;
  stroke-dasharray: none;
}

.local-graph-link.ghost-link {
  stroke: rgba(146, 64, 14, 0.3);
  stroke-dasharray: 4 4;
}

.local-graph-link.active-link.ghost-link {
  stroke: rgba(146, 64, 14, 0.45);
  stroke-dasharray: 5 4;
}

.local-graph-node {
  cursor: pointer;
}

/* Node styling matching main graph */
.local-graph-node circle {
  fill: rgba(51, 51, 51, 0.95);
  stroke: none;
  transition: fill 0.2s ease, stroke 0.2s ease, r 0.2s ease;
}

.local-graph-node:hover circle {
  fill: #000000;
}

@keyframes active-node-pulse {
  0% {
    stroke-width: 1.5px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
  }

  50% {
    stroke-width: 2.2px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.25));
  }

  100% {
    stroke-width: 1.5px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
  }
}

.local-graph-node.active-node circle {
  fill: #ffffff;
  stroke: #000000;
  stroke-width: 1.5px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
  animation: active-node-pulse 4s infinite ease-in-out;
}

.local-graph-node.ghost-node circle {
  fill: rgba(255, 251, 235, 0.98);
  stroke: rgba(146, 64, 14, 0.5);
  stroke-width: 1.2px;
  stroke-dasharray: 3 3;
}

.local-graph-node.ghost-node:hover circle {
  fill: rgba(255, 247, 237, 1);
  stroke: rgba(146, 64, 14, 0.7);
}

.local-graph-node.active-node:hover circle {
  fill: #ffffff;
  stroke: #000000;
}

.local-graph-label {
  font-size: 0.75rem;
  font-weight: 500;
  fill: #444444;
  font-family: inherit;
  pointer-events: none;
  transition: fill 0.2s ease, font-weight 0.2s ease, font-size 0.2s ease;
  paint-order: stroke fill;
  stroke: var(--surface);
  stroke-width: 3px;
  stroke-linejoin: round;
}

.local-graph-node.active-node .local-graph-label {
  font-weight: 600;
  fill: #000000;
  font-size: 0.8rem;
}

.local-graph-node:hover .local-graph-label {
  fill: #000000;
  font-weight: 600;
}

.local-graph-overflow-text {
  font-size: 0.65rem;
  fill: var(--on-surface-variant);
  opacity: 0.6;
  pointer-events: none;
  font-style: italic;
  font-family: inherit;
}

.search-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 1.25rem;
  border-top: 1px solid var(--outline);
  background: rgba(0, 0, 0, 0.02);
  font-size: 0.8rem;
}

.search-toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  user-select: none;
  color: var(--on-surface-variant);
  font-weight: 500;
  transition: color 0.2s ease;
}

.search-toggle-label:hover {
  color: var(--on-surface);
}

.search-toggle-checkbox {
  display: none;
}

.search-toggle-custom {
  position: relative;
  width: 28px;
  height: 16px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  transition: background 0.2s ease;
}

.search-toggle-custom::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease;
}

.search-toggle-checkbox:checked+.search-toggle-custom {
  background: #000;
}

.search-toggle-checkbox:checked+.search-toggle-custom::after {
  transform: translateX(12px);
}

.search-loading-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--on-surface-variant);
  font-size: 0.75rem;
}

.search-loading-indicator .spinner {
  width: 12px;
  height: 12px;
  border: 1.5px solid rgba(0, 0, 0, 0.15);
  border-top-color: #000;
  border-radius: 50%;
  animation: search-spin 0.6s linear infinite;
}

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

.search-result-snippet {
  font-size: 0.8rem;
  color: var(--on-surface-variant);
  line-height: 1.4;
  margin-top: 1px;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.search-result-snippet mark {
  background: rgba(0, 0, 0, 0.08);
  color: inherit;
  font-weight: 500;
  border-radius: 2px;
  padding: 0 1px;
}

/* ---------------------------------------------------------------------------
   Important Nodes (Side Minimalist Labels)
   --------------------------------------------------------------------------- */

.important-nodes {
  position: fixed;
  top: 4.25rem;
  right: 1.25rem;
  z-index: 20;
  width: 12rem;
  pointer-events: auto;
  background: transparent !important;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: var(--radius-sm, 6px);
  padding: 0.35rem 0.6rem;
  border: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

/* Hide when note panel is open */
body.note-open .important-nodes,
body:has(#note-panel:not(.hidden)) .important-nodes,
.note-panel:not(.hidden)~.important-nodes {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.important-nodes__header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  margin-bottom: 0.15rem;
}

@media (prefers-color-scheme: dark) {
  .important-nodes__header {
    border-bottom-color: rgba(255, 255, 255, 0.08);
  }
}

.important-nodes__indicator {
  width: 1.5px;
  height: 0.75rem;
  background: currentColor;
  opacity: 0.5;
  border-radius: 1px;
}

.important-nodes__title {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.45;
  user-select: none;
}

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

.important-nodes__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.35rem 0.1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  cursor: pointer;
  user-select: none;
}

.important-nodes__item:last-child {
  border-bottom: none;
}

@media (prefers-color-scheme: dark) {
  .important-nodes__item {
    border-bottom-color: rgba(255, 255, 255, 0.06);
  }
}

.important-nodes__name {
  font-size: 11.5px;
  color: var(--ink);
  opacity: 0.65;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: -0.01em;
  transition: opacity 0.15s ease;
}

.important-nodes__count {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 10px;
  opacity: 0.35;
  white-space: nowrap;
  margin-left: 0.5rem;
  transition: opacity 0.15s ease;
}

.important-nodes__item:hover .important-nodes__name {
  opacity: 1;
}

.important-nodes__item:hover .important-nodes__count {
  opacity: 0.7;
}

@media (max-width: 640px) {
  .important-nodes {
    top: 4.1rem;
    right: 1rem;
    width: 10.5rem;
    max-width: calc(100vw - 2rem);
    padding: 0.25rem 0.45rem;
    max-height: calc(100dvh - 5.5rem);
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .important-nodes::-webkit-scrollbar {
    display: none;
  }

  .important-nodes__header {
    padding-bottom: 0.25rem;
    margin-bottom: 0.1rem;
  }

  .important-nodes__title {
    font-size: 10px;
  }

  .important-nodes__item {
    padding: 0.3rem 0.1rem;
  }

  .important-nodes__name {
    font-size: 11px;
  }

  .important-nodes__count {
    font-size: 9.5px;
  }
}