/* ==========================================================================
   SysAdmin Wiki — components: cards, search, commands, notes, TOC
   ========================================================================== */

/* ---------- sidebar ---------- */

.progress-card {
  position: relative;
  padding: 15px 16px 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(167, 139, 250, 0.14), transparent 55%),
    var(--surface);
  overflow: hidden;
}

.progress-card::after {
  content: "";
  position: absolute;
  right: -42px;
  top: -60px;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(96, 165, 250, 0.22), transparent 68%);
  pointer-events: none;
}

.progress-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.progress-card__label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.progress-card__label .icon {
  width: 15px;
  height: 15px;
  color: var(--violet-bright);
}

.progress-card__value {
  font-size: 0.86rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.progress-card__meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.68rem;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 18px;
}

.side-group {
  padding: 2px 0 5px;
}

.side-group__head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 8px;
  border-radius: 10px;
  color: var(--text-soft);
  transition: background 0.2s ease, color 0.2s ease;
}

.side-group__head:hover {
  background: var(--surface-2);
  color: var(--text);
}

.side-group__icon {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border: 1px solid var(--accent-line);
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
}

.side-group__icon .icon {
  width: 15px;
  height: 15px;
}

.side-group__title {
  flex: 1;
  font-size: 0.83rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.side-group__count {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.64rem;
}

.side-group.is-active .side-group__head {
  background: linear-gradient(90deg, var(--accent-soft), transparent);
  color: var(--text);
}

.side-links {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin: 2px 0 0 21px;
  padding-left: 10px;
  border-left: 1px solid var(--border);
}

.side-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
  transition: background 0.2s ease, color 0.2s ease;
}

.side-link span:first-child {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.side-link:hover {
  background: var(--surface-2);
  color: var(--text-soft);
}

.side-link.is-active {
  background: var(--accent-soft);
  color: var(--text);
  font-weight: 600;
}

.side-link__marks {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
}

.side-link__marks .icon {
  width: 13px;
  height: 13px;
}

.side-link__ok {
  color: var(--emerald);
}

.side-link__star {
  color: var(--amber);
}

.sidebar__foot {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.sidebar__foot-title {
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

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

.mini-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 7px 4px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.mini-btn .icon {
  width: 13px;
  height: 13px;
}

.mini-btn:hover {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: var(--text);
}

.mini-btn--danger:hover {
  border-color: rgba(251, 113, 133, 0.32);
  background: var(--danger-soft);
  color: var(--rose);
}

.sidebar__hint {
  margin-top: 9px;
  color: var(--muted);
  font-size: 0.64rem;
  line-height: 1.45;
}

/* ---------- search modal ---------- */

.search-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: min(10vh, 100px) 16px 24px;
}

.search-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 3, 8, 0.72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.search-modal__panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(760px, 100%);
  max-height: calc(100vh - 140px);
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  background: var(--surface-solid);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  animation: searchIn 0.25s var(--ease) both;
}

@keyframes searchIn {
  from { opacity: 0; transform: translateY(-10px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.search-modal__field {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 15px 17px;
  border-bottom: 1px solid var(--border);
}

.search-modal__field > .icon {
  width: 21px;
  height: 21px;
  color: var(--violet-bright);
}

.search-modal__field input {
  flex: 1;
  min-width: 0;
  height: 32px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 1rem;
}

.search-modal__field input::placeholder {
  color: var(--muted);
}

.search-modal__close {
  border: 0;
  background: transparent;
  padding: 2px;
}

.search-modal__meta {
  padding: 10px 18px;
  color: var(--muted);
  font-size: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.search-results {
  flex: 1;
  min-height: 120px;
  padding: 8px;
  overflow-y: auto;
}

.search-result {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 18px;
  align-items: start;
  gap: 11px;
  padding: 11px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.search-result:hover,
.search-result.is-active {
  border-color: var(--accent-line);
  background: var(--accent-soft);
}

.search-result__icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--violet-bright);
}

.search-result__icon .icon {
  width: 18px;
  height: 18px;
}

.search-result__body {
  min-width: 0;
}

.search-result__title {
  display: block;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.35;
}

.search-result__snippet {
  display: -webkit-box;
  margin-top: 3px;
  overflow: hidden;
  color: var(--text-soft);
  font-size: 0.77rem;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.search-result__meta {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.68rem;
}

.search-result__arrow {
  align-self: center;
  color: var(--muted);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.search-result.is-active .search-result__arrow,
.search-result:hover .search-result__arrow {
  opacity: 1;
  transform: translateX(0);
}

.search-result mark {
  padding: 0 2px;
  border-radius: 3px;
  background: rgba(251, 191, 36, 0.23);
  color: var(--text);
}

.search-suggest {
  padding: 8px 6px 12px;
}

.search-suggest__label {
  margin: 12px 6px 7px;
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.search-suggest__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.search-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 600;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.search-chip .icon {
  width: 15px;
  height: 15px;
  color: var(--violet-bright);
}

.search-chip:hover {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: var(--text);
}

.search-chip--tag {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.search-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 42px 24px;
  text-align: center;
  color: var(--muted);
}

.search-empty > .icon {
  width: 34px;
  height: 34px;
  margin-bottom: 4px;
  color: var(--violet);
  opacity: 0.7;
}

.search-empty h3 {
  color: var(--text);
  font-size: 1rem;
}

.search-empty p {
  max-width: 420px;
  font-size: 0.84rem;
}

.search-modal__hint {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 10px 18px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.68rem;
}

.search-modal__hint span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.search-modal__hint kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface-2);
  font-family: var(--font-sans);
  font-size: 0.62rem;
  font-weight: 700;
}

/* ---------- stats ---------- */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 28px;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.stat-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.stat-card__icon {
  display: flex !important;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--violet-bright);
}

.stat-card__icon .icon {
  display: block;
  width: 19px;
  height: 19px;
}

.stat-card__icon .icon {
  width: 19px;
  height: 19px;
}

.stat-card strong {
  display: block;
  font-size: 1.28rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.stat-card span {
  display: block;
  margin-top: 1px;
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 600;
}

.stat-card small {
  display: block;
  color: var(--muted);
  font-size: 0.64rem;
  line-height: 1.3;
}

/* ---------- section cards ---------- */

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

.section-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 250px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
  transition: transform 0.28s var(--ease), border-color 0.28s ease, box-shadow 0.28s ease;
}

.section-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.45;
}

.section-card:hover {
  border-color: var(--accent-line);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
  transform: translateY(-4px);
}

.section-card__glow {
  position: absolute;
  top: -80px;
  right: -50px;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: var(--accent);
  filter: blur(68px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.section-card:hover .section-card__glow {
  opacity: 0.17;
}

.section-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 18px;
}

.section-card__icon {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--accent-line);
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
}

.section-card__icon .icon {
  display: block;
}

.section-card__icon .icon {
  width: 22px;
  height: 22px;
}

.section-card__arrow {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--muted);
  transform: rotate(-45deg);
  transition: transform 0.28s var(--ease), color 0.2s ease, border-color 0.2s ease;
}

.section-card:hover .section-card__arrow {
  border-color: var(--accent-line);
  color: var(--accent);
  transform: rotate(0);
}

.section-card__tagline {
  margin-bottom: 4px;
  color: var(--accent);
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.section-card h3 {
  font-size: 1.24rem;
  letter-spacing: -0.03em;
}

.section-card__desc {
  flex: 1;
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.79rem;
  line-height: 1.55;
}

.section-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 16px 0 7px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 600;
}

/* ---------- article cards ---------- */

.cards-grid {
  display: grid;
  gap: 14px;
}

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

.cards-grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.article-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 17px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  transition: transform 0.24s var(--ease), border-color 0.24s ease, background 0.24s ease;
}

.article-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 2px;
  background: var(--accent);
  opacity: 0;
  transition: opacity 0.24s ease;
}

.article-card:hover {
  border-color: var(--border-strong);
  background: var(--surface-solid);
  transform: translateY(-3px);
}

.article-card:hover::before,
.article-card.is-learned::before {
  opacity: 0.7;
}

.article-card.is-learned {
  border-color: rgba(52, 211, 153, 0.16);
}

.article-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.article-card__body {
  flex: 1;
}

.article-card__body h3 {
  font-size: 1rem;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.article-card__body p {
  display: -webkit-box;
  margin-top: 6px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.77rem;
  line-height: 1.5;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.article-card__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding-top: 11px;
  border-top: 1px solid var(--border);
}

.article-card__foot .level {
  margin-left: auto;
}

.learned-flag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--emerald);
  font-size: 0.68rem;
  font-weight: 700;
}

.learned-flag .icon {
  width: 14px;
  height: 14px;
}

/* ---------- command blocks ---------- */

.cmd {
  margin: 16px 0;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 13px;
  background: #0c0c16;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.cmd__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 9px 7px 13px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: #121220;
}

.cmd__label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #8d90b3;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cmd__label .icon {
  width: 14px;
  height: 14px;
  color: #a78bfa;
}

.cmd__copy {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.035);
  color: #9ea1c0;
  font-size: 0.66rem;
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.cmd__copy .icon {
  width: 13px;
  height: 13px;
}

.cmd__copy:hover {
  border-color: rgba(167, 139, 250, 0.35);
  background: rgba(167, 139, 250, 0.12);
  color: #d8d9ee;
}

.cmd__copy.is-copied {
  border-color: rgba(52, 211, 153, 0.32);
  background: rgba(52, 211, 153, 0.1);
  color: #6ee7b7;
}

.cmd__pre {
  margin: 0;
  padding: 14px 16px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.79rem;
  line-height: 1.72;
  color: #d6d8ee;
  tab-size: 2;
}

.cmd__pre code {
  font-family: inherit;
  font-size: inherit;
  white-space: pre;
}

.tok-comment { color: #646a8a; font-style: italic; }
.tok-cmd { color: #a5b4fc; font-weight: 600; }
.tok-sudo { color: #e879f9; font-weight: 600; }
.tok-string { color: #86efac; }
.tok-section { color: #fbbf24; font-weight: 600; }

/* ---------- callouts ---------- */

.callout {
  display: flex;
  gap: 11px;
  margin: 16px 0;
  padding: 13px 15px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--callout, var(--violet));
  border-radius: 10px;
  background: var(--callout-bg, var(--accent-soft));
}

.callout__icon {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--callout, var(--violet));
}

.callout__icon .icon {
  width: 15px;
  height: 15px;
}

.callout__body {
  min-width: 0;
}

.callout__body strong {
  display: block;
  margin-bottom: 2px;
  color: var(--callout, var(--violet));
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.callout__body p {
  color: var(--text-soft);
  font-size: 0.81rem;
  line-height: 1.55;
}

.callout--tip {
  --callout: #a78bfa;
  --callout-bg: rgba(167, 139, 250, 0.08);
}

.callout--info {
  --callout: #60a5fa;
  --callout-bg: rgba(96, 165, 250, 0.07);
}

.callout--warn {
  --callout: #fbbf24;
  --callout-bg: rgba(251, 191, 36, 0.07);
}

.callout--danger {
  --callout: #fb7185;
  --callout-bg: rgba(251, 113, 133, 0.08);
}

/* ---------- goals ---------- */

.goals {
  margin: 24px 0;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(145deg, var(--accent-soft), transparent 60%), var(--surface);
}

.goals h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 13px;
  font-size: 0.95rem;
}

.goals h2 .icon {
  width: 17px;
  height: 17px;
  color: var(--emerald);
}

.goals ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 20px;
}

.goals li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--text-soft);
  font-size: 0.82rem;
  line-height: 1.45;
}

.goals li .icon {
  width: 15px;
  height: 15px;
  margin-top: 2px;
  color: var(--emerald);
}

/* ---------- checklist ---------- */

.checklist {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 14px;
}

.check-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

.check-item:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
}

.check-item input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.check-visual {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: var(--surface-2);
  color: transparent;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.check-visual .icon {
  width: 13px;
  height: 13px;
  stroke-width: 2.4;
}

.check-item input:focus-visible + .check-visual {
  outline: 2px solid var(--violet);
  outline-offset: 2px;
}

.check-item.is-checked {
  border-color: rgba(52, 211, 153, 0.2);
  background: rgba(52, 211, 153, 0.055);
}

.check-item.is-checked .check-visual {
  border-color: var(--emerald);
  background: var(--emerald);
  color: #062a1f;
}

.check-text {
  color: var(--text-soft);
  font-size: 0.81rem;
  line-height: 1.45;
  transition: color 0.2s ease;
}

.check-item.is-checked .check-text {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-color: rgba(52, 211, 153, 0.35);
}

.checklist-progress {
  display: inline-flex;
  padding: 4px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
}

/* ---------- notes ---------- */

.notes-panel {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    radial-gradient(90% 90% at 100% 0%, rgba(96, 165, 250, 0.07), transparent 50%),
    var(--surface);
}

.notes-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.notes-panel__head h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.1rem;
}

.notes-panel__head h2 .icon {
  width: 18px;
  height: 18px;
  color: var(--violet-bright);
}

.note-status {
  color: var(--muted);
  font-size: 0.68rem;
  white-space: nowrap;
}

.notes-panel textarea {
  display: block;
  width: 100%;
  min-height: 150px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  outline: none;
  background: rgba(0, 0, 0, 0.18);
  color: var(--text);
  font-size: 0.86rem;
  line-height: 1.6;
  resize: vertical;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

[data-theme="light"] .notes-panel textarea {
  background: rgba(255, 255, 255, 0.6);
}

.notes-panel textarea:focus {
  border-color: var(--accent-line);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.notes-panel textarea::placeholder {
  color: var(--muted);
}

.notes-panel__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 9px;
}

.section-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.69rem;
  line-height: 1.4;
}

.section-hint .icon {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

/* ---------- TOC ---------- */

.article-toc {
  position: sticky;
  top: calc(var(--topbar-h) + 26px);
  align-self: start;
}

.toc-card {
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}

.toc-card__title {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 10px;
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.toc-card__title .icon {
  width: 15px;
  height: 15px;
  color: var(--violet-bright);
}

.toc-nav {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.toc-link {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  padding: 6px 7px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.35;
  text-align: left;
  transition: background 0.2s ease, color 0.2s ease;
}

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

.toc-link.is-active {
  background: var(--accent-soft);
  color: var(--text);
}

.toc-link__num {
  flex: 0 0 18px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
}

.toc-card__foot {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.66rem;
}

.toc-card__foot .icon {
  width: 13px;
  height: 13px;
}

/* ---------- breadcrumbs ---------- */

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 0.72rem;
}

.breadcrumbs a {
  color: var(--muted);
  transition: color 0.2s ease;
}

.breadcrumbs a:hover {
  color: var(--text);
}

.breadcrumbs .icon {
  width: 12px;
  height: 12px;
  opacity: 0.6;
}

.breadcrumbs span {
  color: var(--text-soft);
}

/* ---------- toast ---------- */

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 300;
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: min(380px, calc(100vw - 32px));
  padding: 11px 15px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: var(--surface-solid);
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 600;
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s var(--ease);
}

.toast .icon {
  width: 17px;
  height: 17px;
  color: var(--emerald);
}

.toast--error .icon {
  color: var(--rose);
}

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

/* ---------- empty ---------- */

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 54px 24px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: center;
}

.empty__icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 4px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--surface-2);
  color: var(--violet-bright);
}

.empty__icon .icon {
  width: 24px;
  height: 24px;
}

.empty h3 {
  font-size: 1.06rem;
}

.empty p {
  max-width: 470px;
  color: var(--muted);
  font-size: 0.82rem;
}

.empty .btn {
  margin-top: 8px;
}
