/* ===================================
   WIKI - APPLE/IVE REDESIGN
   Three-panel layout: Nav | Content | TOC
   Prefix: wk-
   =================================== */

/* ── ANIMATIONS ── */
@keyframes wkShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@keyframes wkFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes wkSlideIn {
  from { opacity: 0; transform: translateX(-12px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes wkScrollTopIn {
  from { opacity: 0; transform: translateY(8px) scale(0.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes wkStaggerIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes wkSearchDialogIn {
  from { opacity: 0; transform: scale(0.95); filter: blur(4px); }
  to { opacity: 1; transform: scale(1); filter: blur(0); }
}

@keyframes wkCommentIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes wkShimmerEnhanced {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@keyframes wkTreeExpand {
  from { opacity: 0; max-height: 0; }
  to { opacity: 1; max-height: 2000px; }
}

/* ── LAYOUT SHELL ── */
.wk-layout {
  display: flex;
  height: 100%;
  overflow: hidden;
  position: relative;
  background: #fff;
}

/* ══════════════════════════════════
   LEFT NAVIGATION PANEL
   ══════════════════════════════════ */
.wk-nav {
  width: 280px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: rgba(245, 245, 247, 0.85);
  border-right: 1px solid rgba(0, 0, 0, 0.07);
  transition: transform 280ms cubic-bezier(0.4, 0, 0.2, 1), box-shadow 280ms ease;
}

.wk-nav-close {
  display: none;
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  padding: 0;
  background: rgba(0, 0, 0, 0.05);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  color: var(--gray-500, #8E8E93);
  z-index: 5;
}

.wk-nav-close svg { width: 16px; height: 16px; }

.wk-nav-close:hover {
  background: rgba(0, 0, 0, 0.1);
  color: var(--gray-700, #48484A);
}

/* ── Search ── */
.wk-nav-search {
  position: relative;
  padding: 16px 16px 12px;
  flex-shrink: 0;
}

.wk-nav-search-icon {
  position: absolute;
  left: 28px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--gray-400, #AEAEB2);
  pointer-events: none;
  display: flex;
}

.wk-nav-search-icon svg {
  width: 15px;
  height: 15px;
}

.wk-nav-search-input {
  width: 100%;
  padding: 8px 32px 8px 36px;
  border: none;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.04);
  font-family: 'Sofia Pro Regular', -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
  font-size: 13px;
  color: var(--gray-900, #1C1C1E);
  outline: none;
  transition: background 200ms, box-shadow 200ms;
  -webkit-font-smoothing: antialiased;
}

.wk-nav-search-input::placeholder {
  color: var(--gray-400, #AEAEB2);
}

.wk-nav-search-input:focus {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 2px rgba(200, 16, 46, 0.15), 0 1px 3px rgba(0, 0, 0, 0.06);
}

.wk-nav-search-clear {
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  padding: 0;
  background: rgba(0, 0, 0, 0.08);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-500, #8E8E93);
}

.wk-nav-search-clear svg { width: 12px; height: 12px; }

.wk-nav-search-clear:hover {
  background: rgba(0, 0, 0, 0.14);
}

/* ── Scrollable body ── */
.wk-nav-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 8px 16px;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.12) transparent;
}

.wk-nav-body::-webkit-scrollbar { width: 5px; }
.wk-nav-body::-webkit-scrollbar-track { background: transparent; }
.wk-nav-body::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.12); border-radius: 10px; }

/* ── Inline search results ── */
.wk-nav-search-results {
  padding: 0 4px;
}

.wk-nav-search-status {
  text-align: center;
  padding: 24px 12px;
  font-family: 'Sofia Pro Regular', -apple-system, sans-serif;
  font-size: 13px;
  color: var(--gray-400, #AEAEB2);
}

.wk-nav-search-result {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 120ms;
  animation: wkFadeIn 200ms ease both;
}

.wk-nav-search-result:hover {
  background: rgba(0, 0, 0, 0.04);
}

.wk-nav-search-result-icon {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  color: var(--gray-400, #AEAEB2);
  margin-top: 1px;
}

.wk-nav-search-result-icon svg { width: 16px; height: 16px; }

.wk-nav-search-result-text {
  min-width: 0;
}

.wk-nav-search-result-title {
  font-family: 'Sofia Pro Regular', -apple-system, sans-serif;
  font-size: 13px;
  color: var(--gray-800, #3A3A3C);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}

.wk-nav-search-result-space {
  font-family: 'Sofia Pro Regular', -apple-system, sans-serif;
  font-size: 11px;
  color: var(--gray-400, #AEAEB2);
  margin-top: 1px;
}

/* ══════════════════════════════════
   TREE NAVIGATION
   ══════════════════════════════════ */
.wk-tree {
  padding: 0 4px;
}

.wk-tree-section-label {
  font-family: 'Sofia Pro Bold', -apple-system, sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-400, #AEAEB2);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 12px 12px 6px;
  user-select: none;
}

.wk-tree-space-group {
  margin-bottom: 4px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.wk-tree-space-group:last-child {
  border-bottom: none;
}

/* ── Tree item (universal) ── */
.wk-tree-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 8px;
  font-family: 'Sofia Pro Regular', -apple-system, sans-serif;
  font-size: 13.5px;
  color: var(--gray-700, #48484A);
  cursor: pointer;
  transition: background 120ms, color 120ms;
  user-select: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-font-smoothing: antialiased;
}

.wk-tree-item:hover {
  background: rgba(0, 0, 0, 0.04);
}

/* Space item */
.wk-tree-item--space {
  padding: 10px 12px 10px 8px;
  margin-bottom: 2px;
  border-radius: 10px;
}

.wk-tree-space-icon {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wk-tree-space-icon svg {
  width: 16px;
  height: 16px;
}

.wk-tree-label--space {
  font-family: 'Sofia Pro Bold', -apple-system, sans-serif;
  font-weight: 600;
  color: var(--gray-800, #3A3A3C);
}

/* Category item */
.wk-tree-item--category {
  padding-left: 28px;
  margin: 1px 0;
}

.wk-tree-category-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.03);
  font-size: 12.5px;
  transition: background 150ms;
}

.wk-tree-item--category:hover .wk-tree-category-chip {
  background: rgba(0, 0, 0, 0.06);
}

/* Article item */
.wk-tree-item--article {
  padding-left: 44px;
  font-size: 13px;
  color: var(--gray-600, #636366);
}

/* Active article */
.wk-tree-item--active {
  background: rgba(200, 16, 46, 0.07) !important;
  color: #C8102E !important;
  font-family: 'Sofia Pro Bold', -apple-system, sans-serif;
  position: relative;
  padding-top: 8px;
  padding-bottom: 8px;
  border-radius: 10px;
}

.wk-tree-item--active::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 6px;
  bottom: 6px;
  width: 3px;
  border-radius: 2px;
  background: linear-gradient(180deg, #C8102E, #A50D25);
}

/* Bookmark item */
.wk-tree-item--bookmark {
  padding-left: 12px;
  gap: 8px;
}

.wk-tree-bookmark-info {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.wk-tree-bookmark-space {
  font-size: 11px;
  color: var(--gray-400, #AEAEB2);
  margin-top: 1px;
}

.wk-tree-bookmark-remove {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  padding: 0;
  border: none;
  background: transparent;
  border-radius: 4px;
  cursor: pointer;
  color: var(--gray-400, #AEAEB2);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 120ms, background 120ms;
}

.wk-tree-bookmark-remove svg { width: 12px; height: 12px; }

.wk-tree-item--bookmark:hover .wk-tree-bookmark-remove {
  opacity: 1;
}

.wk-tree-bookmark-remove:hover {
  background: rgba(0, 0, 0, 0.08);
  color: var(--gray-600, #636366);
}

/* ── Chevron ── */
.wk-tree-chevron-wrap {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 200ms cubic-bezier(0.4, 0, 0.2, 1);
  color: var(--gray-400, #AEAEB2);
}

.wk-tree-chevron-wrap--open {
  transform: rotate(90deg);
}

.wk-tree-chevron {
  width: 14px;
  height: 14px;
}

/* ── Tree icons ── */
.wk-tree-icon {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  color: var(--gray-400, #AEAEB2);
}

.wk-tree-icon svg { width: 16px; height: 16px; }

.wk-tree-icon--folder { color: var(--gray-400, #AEAEB2); }
.wk-tree-icon--doc { color: var(--gray-300, #C7C7CC); }
.wk-tree-icon--space { color: #C8102E; opacity: 0.6; }
.wk-tree-icon--bookmark { color: #C8102E; opacity: 0.5; }

.wk-tree-item--active .wk-tree-icon--doc {
  color: #C8102E;
  opacity: 0.7;
}

/* ── Badge ── */
.wk-tree-badge {
  flex-shrink: 0;
  font-size: 10.5px;
  font-family: 'Sofia Pro Regular', -apple-system, sans-serif;
  color: var(--gray-400, #AEAEB2);
  background: rgba(0, 0, 0, 0.04);
  padding: 1px 6px;
  border-radius: 6px;
  margin-left: auto;
}

/* ── Label ── */
.wk-tree-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.35;
}

/* ── Tree children (expand/collapse) ── */
.wk-tree-children {
  animation: wkTreeExpand 250ms ease both;
  overflow: hidden;
}

/* ── Skeleton ── */
.wk-tree-skeleton {
  cursor: default;
  pointer-events: none;
}

.wk-tree-skeleton-line {
  height: 12px;
  width: 70%;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(0,0,0,0.04) 0%, rgba(0,0,0,0.04) 25%, rgba(0,0,0,0.01) 50%, rgba(0,0,0,0.04) 75%, rgba(0,0,0,0.04) 100%);
  background-size: 300% 100%;
  animation: wkShimmerEnhanced 2s ease-in-out infinite;
}

.wk-tree-empty {
  text-align: center;
  padding: 32px 16px;
  font-family: 'Sofia Pro Regular', -apple-system, sans-serif;
  font-size: 13px;
  color: var(--gray-400, #AEAEB2);
}

.wk-tree-empty-hint {
  font-size: 12px;
  color: var(--gray-400, #AEAEB2);
  cursor: default;
  pointer-events: none;
}

/* ── Bookmarks section ── */
.wk-nav-bookmarks {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* ── Nav overlay (mobile) ── */
.wk-nav-overlay {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.2);
  z-index: 19;
  opacity: 0;
  transition: opacity 280ms;
  pointer-events: none;
}

.wk-nav-overlay--visible {
  opacity: 1;
  pointer-events: auto;
}

/* ══════════════════════════════════
   CENTER CONTENT AREA
   ══════════════════════════════════ */
.wk-content {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.1) transparent;
}

.wk-content::-webkit-scrollbar { width: 6px; }
.wk-content::-webkit-scrollbar-track { background: transparent; }
.wk-content::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.1); border-radius: 10px; }

/* ── Mobile header ── */
.wk-content-mobile-header {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  position: sticky;
  top: 0;
  z-index: 10;
  flex-shrink: 0;
}

.wk-content-mobile-title {
  flex: 1;
  min-width: 0;
  font-family: 'Sofia Pro Bold', -apple-system, sans-serif;
  font-size: 15px;
  color: var(--gray-900, #1C1C1E);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-font-smoothing: antialiased;
}

.wk-mobile-nav-toggle,
.wk-mobile-search-btn {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  padding: 0;
  border: none;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-600, #636366);
  transition: background 120ms;
}

.wk-mobile-nav-toggle:hover,
.wk-mobile-search-btn:hover {
  background: rgba(0, 0, 0, 0.08);
}

.wk-mobile-nav-toggle svg,
.wk-mobile-search-btn svg {
  width: 18px;
  height: 18px;
}

/* ── Content skeleton ── */
.wk-content-skeleton {
  padding: 40px;
  animation: wkFadeIn 300ms ease both;
}

.wk-skeleton-line {
  height: 14px;
  border-radius: 7px;
  background: linear-gradient(90deg, rgba(0,0,0,0.05) 25%, rgba(0,0,0,0.02) 50%, rgba(0,0,0,0.05) 75%);
  background-size: 200% 100%;
  animation: wkShimmer 1.5s infinite;
  margin-bottom: 10px;
}

.wk-skeleton-line--title { height: 24px; border-radius: 8px; }
.wk-skeleton-line--meta { height: 12px; width: 40%; }
.wk-skeleton-line--sm { width: 60%; }

.wk-skeleton-block {
  height: 80px;
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(0,0,0,0.04) 25%, rgba(0,0,0,0.015) 50%, rgba(0,0,0,0.04) 75%);
  background-size: 200% 100%;
  animation: wkShimmer 1.5s infinite;
  margin-bottom: 16px;
}

.wk-skeleton-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(90deg, rgba(0,0,0,0.05) 25%, rgba(0,0,0,0.02) 50%, rgba(0,0,0,0.05) 75%);
  background-size: 200% 100%;
  animation: wkShimmer 1.5s infinite;
  flex-shrink: 0;
}

/* ══════════════════════════════════
   WELCOME VIEW — Compact Redesign
   ══════════════════════════════════ */

.wk-welcome {
  padding: 28px 36px 60px;
  max-width: 960px;
  position: relative;
}

/* ── Compact search bar ── */
.wk-welcome-search-form {
  position: relative;
  margin-bottom: 20px;
}

.wk-welcome-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--gray-400, #AEAEB2);
  display: flex;
  pointer-events: none;
}

.wk-welcome-search-icon svg {
  width: 16px;
  height: 16px;
}

.wk-welcome-search-input {
  width: 100%;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.02);
  font-family: 'Sofia Pro Regular', -apple-system, sans-serif;
  font-size: 14px;
  color: var(--gray-900, #1C1C1E);
  padding: 11px 80px 11px 38px;
  outline: none;
  transition: border-color 200ms, box-shadow 200ms, background 200ms;
}

.wk-welcome-search-input::placeholder {
  color: var(--gray-400, #AEAEB2);
}

.wk-welcome-search-input:focus {
  border-color: rgba(200, 16, 46, 0.3);
  box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.08);
  background: #fff;
}

.wk-welcome-search-shortcut {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  min-width: 44px;
  height: 30px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.03);
  font-family: 'Sofia Pro Bold', -apple-system, sans-serif;
  font-size: 11px;
  color: var(--gray-500, #8E8E93);
  cursor: pointer;
  padding: 0 8px;
  transition: background 120ms;
}

.wk-welcome-search-shortcut:hover {
  background: rgba(0, 0, 0, 0.06);
}

/* ── Space filter tabs ── */
.wk-welcome-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}

.wk-welcome-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 100px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: transparent;
  font-family: 'Sofia Pro Regular', -apple-system, sans-serif;
  font-size: 12.5px;
  color: var(--gray-600, #636366);
  cursor: pointer;
  transition: all 150ms;
  white-space: nowrap;
}

.wk-welcome-filter:hover {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.12);
}

.wk-welcome-filter--active {
  background: var(--filter-active-bg, rgba(200, 16, 46, 0.07));
  border-color: var(--filter-active-border, rgba(200, 16, 46, 0.15));
  color: var(--filter-active-text, #C8102E);
  font-family: 'Sofia Pro Bold', -apple-system, sans-serif;
  font-weight: 600;
}

.wk-welcome-filter-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── Tab toggle (Recientes / Populares) ── */
.wk-welcome-tabs {
  display: flex;
  gap: 2px;
  margin-bottom: 16px;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 8px;
  padding: 3px;
  width: fit-content;
}

.wk-welcome-tab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 16px;
  border: none;
  border-radius: 6px;
  background: transparent;
  font-family: 'Sofia Pro Regular', -apple-system, sans-serif;
  font-size: 12.5px;
  color: var(--gray-500, #8E8E93);
  cursor: pointer;
  transition: all 150ms;
}

.wk-welcome-tab:hover {
  color: var(--gray-700, #48484A);
}

.wk-welcome-tab--active {
  background: #fff;
  color: var(--gray-900, #1C1C1E);
  font-family: 'Sofia Pro Bold', -apple-system, sans-serif;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.wk-welcome-tab-icon {
  width: 14px;
  height: 14px;
  display: flex;
}

.wk-welcome-tab-icon svg {
  width: 14px;
  height: 14px;
}

/* ── Article card grid ── */
.wk-welcome-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}

.wk-welcome-card {
  display: flex;
  flex-direction: column;
  padding: 16px 18px;
  background: rgba(0, 0, 0, 0.015);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 10px;
  cursor: pointer;
  transition: background 150ms, border-color 150ms, box-shadow 150ms;
  overflow: hidden;
}

.wk-welcome-card:hover {
  background: rgba(0, 0, 0, 0.025);
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.wk-welcome-card-rank {
  font-family: 'Sofia Pro Bold', -apple-system, sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: var(--gray-400, #AEAEB2);
  margin-bottom: 4px;
}

.wk-welcome-card-rank::before {
  content: '#';
}

.wk-welcome-card-title {
  font-family: 'Sofia Pro Bold', -apple-system, sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-800, #3A3A3C);
  line-height: 1.35;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.wk-welcome-card-excerpt {
  font-family: 'Sofia Pro Regular', -apple-system, sans-serif;
  font-size: 12.5px;
  color: var(--gray-500, #8E8E93);
  line-height: 1.45;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.wk-welcome-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-family: 'Sofia Pro Regular', -apple-system, sans-serif;
  font-size: 11px;
  color: var(--gray-400, #AEAEB2);
  margin-top: auto;
}

.wk-welcome-card-space {
  color: #C8102E;
  opacity: 0.7;
}

.wk-welcome-card-read::before {
  content: '·';
  margin-right: 2px;
}

/* ── Bookmarks ── */
.wk-welcome-bookmarks {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.wk-welcome-bookmarks-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
}

.wk-welcome-bookmarks-icon {
  width: 14px;
  height: 14px;
  color: #C8102E;
  opacity: 0.5;
  display: flex;
}

.wk-welcome-bookmarks-icon svg {
  width: 14px;
  height: 14px;
}

.wk-welcome-bookmarks-label {
  font-family: 'Sofia Pro Bold', -apple-system, sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-400, #AEAEB2);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.wk-welcome-bookmarks-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.wk-welcome-bookmark-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(200, 16, 46, 0.04);
  border: 1px solid rgba(200, 16, 46, 0.08);
  cursor: pointer;
  transition: background 150ms, border-color 150ms;
  white-space: nowrap;
  font-family: inherit;
}

.wk-welcome-bookmark-pill:hover {
  background: rgba(200, 16, 46, 0.08);
  border-color: rgba(200, 16, 46, 0.15);
}

.wk-welcome-bookmark-pill-title {
  font-family: 'Sofia Pro Bold', -apple-system, sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-800, #3A3A3C);
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wk-welcome-bookmark-pill-space {
  font-family: 'Sofia Pro Regular', -apple-system, sans-serif;
  font-size: 10.5px;
  color: var(--gray-400, #AEAEB2);
}

/* ── Empty state ── */
.wk-welcome-empty {
  text-align: center;
  padding: 48px 20px;
  font-family: 'Sofia Pro Regular', -apple-system, sans-serif;
  font-size: 13px;
  color: var(--gray-400, #AEAEB2);
}

/* ── Skeleton ── */
.wk-welcome-skeleton-v2 {
  padding-top: 16px;
}

.wk-welcome-skeleton-spaces {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

.wk-welcome-skeleton-space-pill {
  width: 80px;
  height: 32px;
  border-radius: 100px;
  background: linear-gradient(90deg, rgba(0,0,0,0.04) 25%, rgba(0,0,0,0.015) 50%, rgba(0,0,0,0.04) 75%);
  background-size: 200% 100%;
  animation: wkShimmer 1.5s infinite;
}

.wk-welcome-skeleton-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}

.wk-welcome-skeleton-card {
  padding: 18px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.015);
  border: 1px solid rgba(0, 0, 0, 0.03);
}

/* ══════════════════════════════════
   ARTICLE VIEW — Apple/Ive Inspired
   ══════════════════════════════════ */
.wk-article {
  padding: 0 44px 80px;
  max-width: 780px;
  animation: wkArticleIn 500ms cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

@keyframes wkArticleIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Header ── */
.wk-article-header {
  padding: 36px 0 0;
}

.wk-article-meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.wk-article-author {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Sofia Pro Bold', -apple-system, sans-serif;
  font-size: 13px;
  color: var(--gray-800, #3A3A3C);
  letter-spacing: -0.1px;
}

.wk-article-author-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #C8102E 0%, #E8334E 100%);
  color: #fff;
  font-family: 'Sofia Pro Bold', -apple-system, sans-serif;
  font-size: 10px;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.wk-article-date,
.wk-article-read-time {
  font-family: 'Sofia Pro Regular', -apple-system, sans-serif;
  font-size: 13px;
  color: var(--gray-400, #AEAEB2);
  display: flex;
  align-items: center;
  gap: 4px;
}

.wk-article-read-time svg {
  opacity: 0.6;
}

.wk-article-meta-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--gray-300, #D1D1D6);
  flex-shrink: 0;
}

.wk-article-title {
  font-family: 'Sofia Pro Bold', -apple-system, sans-serif;
  font-size: 34px;
  font-weight: 700;
  color: var(--gray-900, #1C1C1E);
  letter-spacing: -0.6px;
  line-height: 1.15;
  margin: 0 0 14px;
  -webkit-font-smoothing: antialiased;
}

.wk-article-badge {
  font-family: 'Sofia Pro Bold', -apple-system, sans-serif;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 10px;
  border-radius: 100px;
  background: rgba(52, 199, 89, 0.1);
  color: #28A745;
  flex-shrink: 0;
}

.wk-article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}

.wk-article-tag {
  font-family: 'Sofia Pro Regular', -apple-system, sans-serif;
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 100px;
  background: rgba(0, 0, 0, 0.04);
  color: var(--gray-600, #636366);
  transition: background 200ms, color 200ms;
}

.wk-article-tag:hover {
  background: rgba(0, 0, 0, 0.07);
}

.wk-article-actions {
  display: flex;
  gap: 8px;
  padding-bottom: 24px;
  margin-bottom: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

/* ── Reading progress ── */
.wk-reading-progress {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #C8102E, #E8334E);
  transform-origin: left;
  z-index: 15;
  transition: transform 80ms linear;
}

/* ── Article body wrapper ── */
.wk-article-body {
  padding-top: 28px;
}

/* ── Article HTML content ── */
.wk-article-content {
  font-family: 'Sofia Pro Regular', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--gray-800, #3A3A3C);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  word-break: break-word;
}

/* Collapse excessive spacing from empty paragraphs / br tags */
.wk-article-content br + br,
.wk-article-content p:empty,
.wk-article-content p > br:only-child {
  display: none;
}

.wk-article-content p + br,
.wk-article-content br + p:empty {
  display: none;
}

/* ── Headings ── */
.wk-article-content h1 {
  font-family: 'Sofia Pro Bold', -apple-system, sans-serif;
  font-size: 26px;
  color: var(--gray-900, #1C1C1E);
  margin: 36px 0 12px;
  letter-spacing: -0.4px;
  line-height: 1.2;
}

.wk-article-content h1:first-child {
  margin-top: 0;
}

.wk-article-content h2 {
  font-family: 'Sofia Pro Bold', -apple-system, sans-serif;
  font-size: 21px;
  color: var(--gray-900, #1C1C1E);
  margin: 32px 0 10px;
  letter-spacing: -0.3px;
  line-height: 1.25;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.wk-article-content h3 {
  font-family: 'Sofia Pro Bold', -apple-system, sans-serif;
  font-size: 17px;
  color: var(--gray-800, #3A3A3C);
  margin: 26px 0 8px;
  line-height: 1.3;
  letter-spacing: -0.15px;
}

.wk-article-content h4 {
  font-family: 'Sofia Pro Bold', -apple-system, sans-serif;
  font-size: 15.5px;
  color: var(--gray-800, #3A3A3C);
  margin: 22px 0 8px;
  line-height: 1.35;
  letter-spacing: -0.08px;
}

.wk-article-content h5 {
  font-family: 'Sofia Pro Bold', -apple-system, sans-serif;
  font-size: 14px;
  color: var(--gray-700, #48484A);
  margin: 18px 0 6px;
  line-height: 1.4;
}

.wk-article-content h6 {
  font-family: 'Sofia Pro Bold', -apple-system, sans-serif;
  font-size: 12.5px;
  color: var(--gray-600, #636366);
  margin: 16px 0 6px;
  line-height: 1.4;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ── Paragraphs ── */
.wk-article-content p {
  margin: 0 0 12px;
}

.wk-article-content p + p {
  margin-top: 0;
}

/* ── Links ── */
.wk-article-content a {
  color: #C8102E;
  text-decoration: none;
  background-image: linear-gradient(rgba(200, 16, 46, 0.15), rgba(200, 16, 46, 0.15));
  background-size: 100% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 200ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.wk-article-content a:hover {
  background-size: 100% 2px;
}

/* ── Lists ── */
.wk-article-content ul, .wk-article-content ol {
  margin: 0 0 12px;
  padding-left: 22px;
}

.wk-article-content li {
  margin-bottom: 4px;
  line-height: 1.55;
}

.wk-article-content li::marker {
  color: var(--gray-400, #AEAEB2);
}

.wk-article-content li > ul,
.wk-article-content li > ol {
  margin-top: 4px;
  margin-bottom: 4px;
}

/* ── Blockquotes ── */
.wk-article-content blockquote {
  margin: 20px 0;
  padding: 16px 20px;
  border-left: 3px solid #C8102E;
  background: linear-gradient(135deg, rgba(200, 16, 46, 0.025) 0%, rgba(200, 16, 46, 0.01) 100%);
  border-radius: 0 12px 12px 0;
  color: var(--gray-700, #48484A);
  position: relative;
  font-style: italic;
}

.wk-article-content blockquote::before {
  display: none;
}

.wk-article-content blockquote p:last-child {
  margin-bottom: 0;
}

/* ── Code ── */
.wk-article-content pre {
  margin: 18px 0;
  padding: 18px 20px;
  background: #1C1C1E;
  border-radius: 12px;
  overflow-x: auto;
  position: relative;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 8px 24px rgba(0, 0, 0, 0.06);
}

.wk-article-content code {
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 13px;
}

.wk-article-content pre code {
  color: #E5E5EA;
  line-height: 1.55;
}

.wk-article-content :not(pre) > code {
  padding: 2px 7px;
  background: rgba(200, 16, 46, 0.06);
  border-radius: 6px;
  font-size: 0.87em;
  color: #C8102E;
}

/* ── Images ── */
.wk-article-content img {
  max-width: 100%;
  height: auto;
  border-radius: 14px;
  margin: 20px 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.06);
  transition: box-shadow 300ms cubic-bezier(0.22, 0.61, 0.36, 1), transform 300ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.wk-article-content img:hover {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04), 0 8px 28px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

/* ── Tables ── */
.wk-article-content table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 18px 0;
  font-size: 14px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.wk-article-content th, .wk-article-content td {
  padding: 10px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.wk-article-content tr:last-child td {
  border-bottom: none;
}

.wk-article-content th {
  font-family: 'Sofia Pro Bold', -apple-system, sans-serif;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--gray-500, #8E8E93);
  background: rgba(0, 0, 0, 0.02);
}

.wk-article-content tr:hover td {
  background: rgba(0, 0, 0, 0.01);
}

/* ── HR ── */
.wk-article-content hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.06) 20%, rgba(0, 0, 0, 0.06) 80%, transparent 100%);
  margin: 32px 0;
}

/* ── Code copy button ── */
.wk-code-copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  opacity: 0;
  transition: opacity 150ms, background 150ms;
}

.wk-article-content pre:hover .wk-code-copy-btn {
  opacity: 1;
}

.wk-code-copy-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.8);
}

.wk-code-copy-btn.copied {
  color: #30D158;
}

.wk-code-lang-badge {
  position: absolute;
  top: 8px;
  left: 14px;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.35);
  pointer-events: none;
}

.wk-code-line-numbers {
  position: absolute;
  left: 0;
  top: 28px;
  padding: 0 8px;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 12px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.2);
  text-align: right;
  user-select: none;
  pointer-events: none;
}

.wk-article-content pre.wk-pre-with-lang {
  padding-top: 32px;
}

.wk-article-content pre.wk-pre-with-lines code {
  padding-left: 36px;
}

/* ══════════════════════════════════
   BUTTONS
   ══════════════════════════════════ */
.wk-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-family: 'Sofia Pro Regular', -apple-system, sans-serif;
  font-size: 13px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 150ms, color 150ms, opacity 150ms;
  -webkit-font-smoothing: antialiased;
  white-space: nowrap;
}

.wk-btn svg { width: 15px; height: 15px; }

.wk-btn--primary {
  background: #C8102E;
  color: #fff;
}

.wk-btn--primary:hover { background: #A50D25; }
.wk-btn--primary:disabled { opacity: 0.5; cursor: default; }

.wk-btn--ghost {
  background: rgba(0, 0, 0, 0.04);
  color: var(--gray-600, #636366);
}

.wk-btn--ghost:hover {
  background: rgba(0, 0, 0, 0.08);
  color: var(--gray-800, #3A3A3C);
}

/* ── Bookmark / Save button ── */
.wk-btn--bookmark {
  background: rgba(0, 0, 0, 0.04);
  color: var(--gray-600, #636366);
  position: relative;
  overflow: hidden;
  transition: background 300ms cubic-bezier(.4,0,.2,1),
              color 300ms cubic-bezier(.4,0,.2,1),
              transform 200ms cubic-bezier(.4,0,.2,1),
              box-shadow 300ms cubic-bezier(.4,0,.2,1);
}

.wk-btn--bookmark .wk-bookmark-icon {
  transition: transform 350ms cubic-bezier(.34,1.56,.64,1);
}

.wk-btn--bookmark .wk-bookmark-label {
  transition: opacity 200ms ease, transform 200ms ease;
}

.wk-btn--bookmark:hover {
  background: rgba(200, 16, 46, 0.08);
  color: #C8102E;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(200, 16, 46, 0.15);
}

.wk-btn--bookmark:hover .wk-bookmark-icon {
  transform: scale(1.18) translateY(-1px);
}

.wk-btn--bookmark:active {
  transform: translateY(0) scale(0.97);
  box-shadow: 0 1px 4px rgba(200, 16, 46, 0.1);
}

.wk-btn--bookmarked {
  background: rgba(200, 16, 46, 0.07);
  color: #C8102E;
}

.wk-btn--bookmarked:hover {
  background: rgba(200, 16, 46, 0.12);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(200, 16, 46, 0.18);
}

.wk-btn--bookmarked .wk-bookmark-icon {
  animation: wk-bookmark-pop 400ms cubic-bezier(.34,1.56,.64,1);
}

@keyframes wk-bookmark-pop {
  0%   { transform: scale(0.6) rotate(-8deg); opacity: 0.5; }
  50%  { transform: scale(1.25) rotate(3deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

/* ── Share button ── */
.wk-btn--share {
  background: rgba(0, 0, 0, 0.04);
  color: var(--gray-600, #636366);
  position: relative;
  overflow: hidden;
  transition: background 300ms cubic-bezier(.4,0,.2,1),
              color 300ms cubic-bezier(.4,0,.2,1),
              transform 200ms cubic-bezier(.4,0,.2,1),
              box-shadow 300ms cubic-bezier(.4,0,.2,1);
}

.wk-btn--share .wk-share-icon {
  transition: transform 350ms cubic-bezier(.34,1.56,.64,1);
}

.wk-btn--share:hover {
  background: rgba(0, 122, 255, 0.08);
  color: #007AFF;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.12);
}

.wk-btn--share:hover .wk-share-icon {
  transform: scale(1.15);
}

.wk-btn--share:active {
  transform: translateY(0) scale(0.97);
}

.wk-btn--share-copied {
  background: rgba(52, 199, 89, 0.1);
  color: #28A745;
}

.wk-btn--share-copied .wk-share-icon {
  animation: wk-share-check 400ms cubic-bezier(.34,1.56,.64,1);
}

@keyframes wk-share-check {
  0%   { transform: scale(0.5); opacity: 0.3; }
  50%  { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

/* ── Read badge ── */
.wk-article-badge--read {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(0, 122, 255, 0.08);
  color: #007AFF;
}

/* ── Anchor links on headings ── */
.wk-heading-with-anchor {
  position: relative;
}

.wk-heading-anchor {
  position: absolute;
  left: -28px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--gray-300, #D1D1D6);
  border-radius: 4px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 200ms, color 200ms, background 200ms;
}

.wk-heading-with-anchor:hover .wk-heading-anchor {
  opacity: 1;
}

.wk-heading-anchor:hover {
  color: #C8102E;
  background: rgba(200, 16, 46, 0.06);
}

.wk-heading-anchor--copied {
  opacity: 1 !important;
  color: #28A745 !important;
  background: rgba(52, 199, 89, 0.08) !important;
}

/* ── Image lightbox ── */
.wk-article-content img {
  cursor: zoom-in;
  transition: opacity 200ms;
}

.wk-article-content img:hover {
  opacity: 0.85;
}

.wk-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  animation: wk-lightbox-in 250ms cubic-bezier(.4,0,.2,1);
  cursor: zoom-out;
}

@keyframes wk-lightbox-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.wk-lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: wk-lightbox-img-in 300ms cubic-bezier(.34,1.56,.64,1);
  cursor: default;
}

@keyframes wk-lightbox-img-in {
  from { transform: scale(0.85); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.wk-lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 200ms, transform 200ms;
}

.wk-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.1);
}

/* ── Article feedback ── */
.wk-article-feedback {
  margin-top: 40px;
  padding: 24px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.wk-feedback-question {
  font-family: 'Sofia Pro Bold', -apple-system, sans-serif;
  font-size: 14px;
  color: var(--gray-700, #48484A);
  letter-spacing: -0.1px;
}

.wk-feedback-buttons {
  display: flex;
  gap: 8px;
}

.wk-feedback-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.02);
  color: var(--gray-500, #8E8E93);
  cursor: pointer;
  font-family: 'Sofia Pro Regular', -apple-system, sans-serif;
  font-size: 13px;
  transition: all 250ms cubic-bezier(.4,0,.2,1);
}

.wk-feedback-btn svg {
  width: 18px;
  height: 18px;
  transition: transform 300ms cubic-bezier(.34,1.56,.64,1);
}

.wk-feedback-btn:hover {
  border-color: rgba(0, 0, 0, 0.15);
  background: rgba(0, 0, 0, 0.04);
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06);
}

.wk-feedback-btn:hover svg {
  transform: scale(1.15);
}

.wk-feedback-btn:active {
  transform: translateY(0) scale(0.97);
}

.wk-feedback-btn--up.wk-feedback-btn--active {
  background: rgba(52, 199, 89, 0.1);
  border-color: rgba(52, 199, 89, 0.3);
  color: #28A745;
}

.wk-feedback-btn--up.wk-feedback-btn--active svg {
  animation: wk-feedback-pop 400ms cubic-bezier(.34,1.56,.64,1);
}

.wk-feedback-btn--down.wk-feedback-btn--active {
  background: rgba(255, 59, 48, 0.08);
  border-color: rgba(255, 59, 48, 0.25);
  color: #FF3B30;
}

.wk-feedback-btn--down.wk-feedback-btn--active svg {
  animation: wk-feedback-pop 400ms cubic-bezier(.34,1.56,.64,1);
}

@keyframes wk-feedback-pop {
  0%   { transform: scale(0.6); }
  50%  { transform: scale(1.3); }
  100% { transform: scale(1); }
}

.wk-feedback-count {
  font-family: 'Sofia Pro Bold', -apple-system, sans-serif;
  font-size: 12px;
  min-width: 16px;
  text-align: center;
}

/* ── Article prev/next navigation ── */
.wk-article-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.wk-article-nav-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.02);
  cursor: pointer;
  transition: all 250ms cubic-bezier(.4,0,.2,1);
  text-align: left;
}

.wk-article-nav-btn:hover {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
}

.wk-article-nav-btn:active {
  transform: translateY(0);
}

.wk-article-nav-btn svg {
  flex-shrink: 0;
  color: var(--gray-400, #AEAEB2);
  transition: color 200ms;
}

.wk-article-nav-btn:hover svg {
  color: #C8102E;
}

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

.wk-article-nav-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.wk-article-nav-label {
  font-family: 'Sofia Pro Regular', -apple-system, sans-serif;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gray-400, #AEAEB2);
}

.wk-article-nav-title {
  font-family: 'Sofia Pro Bold', -apple-system, sans-serif;
  font-size: 14px;
  color: var(--gray-800, #3A3A3C);
  letter-spacing: -0.2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 280px;
}

.wk-article-nav-btn:hover .wk-article-nav-title {
  color: #C8102E;
}

.wk-btn--sm {
  padding: 5px 12px;
  font-size: 12px;
}

/* ══════════════════════════════════
   COMMENTS
   ══════════════════════════════════ */
.wk-comments {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.wk-comments-title {
  font-family: 'Sofia Pro Bold', -apple-system, sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--gray-800, #3A3A3C);
  margin: 0 0 20px;
}

.wk-comment-form {
  margin-bottom: 24px;
}

.wk-comment-form--inline {
  margin-top: 12px;
  margin-bottom: 0;
}

.wk-comment-textarea {
  width: 100%;
  min-height: 56px;
  max-height: 200px;
  padding: 12px 14px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  font-family: 'Sofia Pro Regular', -apple-system, sans-serif;
  font-size: 14px;
  color: var(--gray-800, #3A3A3C);
  background: rgba(0, 0, 0, 0.015);
  resize: none;
  overflow-y: auto;
  outline: none;
  transition: border-color 200ms, box-shadow 200ms;
  margin-bottom: 10px;
  box-sizing: border-box;
}

.wk-comment-textarea:focus {
  border-color: rgba(200, 16, 46, 0.25);
  box-shadow: 0 0 0 2px rgba(200, 16, 46, 0.08);
}

.wk-comment-form-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.wk-comment {
  padding: 14px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  animation: wkCommentIn 300ms ease both;
}

.wk-comment--reply {
  margin-left: 28px;
  padding-left: 14px;
  border-left: 2px solid rgba(0, 0, 0, 0.06);
  border-bottom: none;
}

.wk-comment-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.wk-comment-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Sofia Pro Bold', -apple-system, sans-serif;
  font-size: 12px;
  color: #fff;
}

.wk-comment-avatar-letter {
  font-family: 'Sofia Pro Bold', -apple-system, sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  line-height: 1;
  text-transform: uppercase;
}

.wk-comment-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wk-comment-avatar-fallback {
  width: 14px;
  height: 14px;
  color: var(--gray-400, #AEAEB2);
}

.wk-comment-author {
  font-family: 'Sofia Pro Bold', -apple-system, sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-800, #3A3A3C);
}

.wk-comment-date {
  font-family: 'Sofia Pro Regular', -apple-system, sans-serif;
  font-size: 12px;
  color: var(--gray-400, #AEAEB2);
}

.wk-comment-edited {
  font-family: 'Sofia Pro Regular', -apple-system, sans-serif;
  font-size: 11px;
  color: var(--gray-400, #AEAEB2);
  font-style: italic;
}

.wk-comment-body {
  font-family: 'Sofia Pro Regular', -apple-system, sans-serif;
  font-size: 14px;
  color: var(--gray-700, #48484A);
  line-height: 1.55;
  margin-bottom: 4px;
}

.wk-comment-body--deleted {
  color: var(--gray-400, #AEAEB2);
  font-style: italic;
}

.wk-comment-actions {
  display: flex;
  gap: 4px;
}

.wk-comment-action {
  font-family: 'Sofia Pro Regular', -apple-system, sans-serif;
  font-size: 12px;
  color: var(--gray-400, #AEAEB2);
  background: none;
  border: none;
  padding: 2px 6px;
  border-radius: 4px;
  cursor: pointer;
  transition: color 120ms, background 120ms;
}

.wk-comment-action:hover {
  color: var(--gray-600, #636366);
  background: rgba(0, 0, 0, 0.04);
}

.wk-comment-action--danger:hover {
  color: #C8102E;
  background: rgba(200, 16, 46, 0.06);
}

.wk-comment-replies {
  margin-top: 4px;
}

.wk-comments-empty {
  text-align: center;
  padding: 28px 16px;
  font-family: 'Sofia Pro Regular', -apple-system, sans-serif;
  font-size: 13px;
  color: var(--gray-400, #AEAEB2);
}

.wk-comments-skeleton {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.wk-comment-skeleton {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.wk-comment-skeleton-lines {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* ══════════════════════════════════
   TABLE OF CONTENTS (RIGHT PANEL)
   ══════════════════════════════════ */
.wk-toc {
  width: 200px;
  flex-shrink: 0;
  border-left: 1px solid rgba(0, 0, 0, 0.05);
  padding: 40px 16px 40px 20px;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  background: rgba(252, 252, 253, 0.5);
  position: relative;
}

.wk-toc::-webkit-scrollbar { display: none; }

.wk-toc-progress {
  position: absolute;
  left: 20px;
  top: 70px;
  bottom: 40px;
  width: 2px;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 1px;
  z-index: 0;
}

.wk-toc-progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  background: #C8102E;
  border-radius: 1px;
  transition: height 200ms ease;
}

.wk-toc-title {
  font-family: 'Sofia Pro Bold', -apple-system, sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-400, #AEAEB2);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 14px;
}

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

.wk-toc-item {
  margin-bottom: 2px;
  position: relative;
}

.wk-toc-item button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 5px 8px 5px 14px;
  font-family: 'Sofia Pro Regular', -apple-system, sans-serif;
  font-size: 12px;
  color: var(--gray-500, #8E8E93);
  background: none;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: color 150ms, background 150ms;
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
}

.wk-toc-item button:hover {
  color: var(--gray-700, #48484A);
  background: rgba(0, 0, 0, 0.03);
}

.wk-toc-item--active button {
  color: #C8102E;
  font-family: 'Sofia Pro Bold', -apple-system, sans-serif;
  font-weight: 600;
}

.wk-toc-item--active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #C8102E;
}

.wk-toc-item--l2 button { padding-left: 16px; }
.wk-toc-item--l3 button { padding-left: 24px; font-size: 11.5px; }
.wk-toc-item--l4 button { padding-left: 30px; font-size: 11px; }
.wk-toc-item--l5 button { padding-left: 36px; font-size: 10.6px; }
.wk-toc-item--l6 button { padding-left: 42px; font-size: 10.2px; }

/* ══════════════════════════════════
   SEARCH MODAL
   ══════════════════════════════════ */
.wk-search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
  animation: wkFadeIn 150ms ease;
}

.wk-search-dialog {
  width: 580px;
  max-width: calc(100vw - 32px);
  max-height: 520px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: wkSearchDialogIn 250ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.wk-search-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.wk-search-title {
  font-family: 'Sofia Pro Bold', -apple-system, sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--gray-900, #1C1C1E);
  margin: 0;
}

.wk-search-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wk-search-kbd {
  font-family: 'SF Mono', monospace;
  font-size: 11px;
  padding: 3px 7px;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.05);
  color: var(--gray-500, #8E8E93);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.wk-search-close {
  width: 28px;
  height: 28px;
  padding: 0;
  background: rgba(0, 0, 0, 0.04);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-500, #8E8E93);
  transition: background 120ms;
}

.wk-search-close svg { width: 16px; height: 16px; }
.wk-search-close:hover { background: rgba(0, 0, 0, 0.08); }

.wk-search-form {
  display: flex;
  gap: 8px;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.wk-search-input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  font-family: 'Sofia Pro Regular', -apple-system, sans-serif;
  font-size: 14px;
  color: var(--gray-900, #1C1C1E);
  background: rgba(0, 0, 0, 0.015);
  outline: none;
  transition: border-color 200ms, box-shadow 200ms;
}

.wk-search-input:focus {
  border-color: rgba(200, 16, 46, 0.25);
  box-shadow: 0 0 0 2px rgba(200, 16, 46, 0.08);
}

.wk-search-input::placeholder { color: var(--gray-400, #AEAEB2); }

.wk-search-submit {
  flex-shrink: 0;
}

.wk-search-submit svg { width: 15px; height: 15px; }

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

.wk-search-meta {
  padding: 6px 14px;
  font-family: 'Sofia Pro Regular', -apple-system, sans-serif;
  font-size: 11px;
  color: var(--gray-400, #AEAEB2);
}

.wk-search-list {
  display: flex;
  flex-direction: column;
}

.wk-search-item {
  padding: 12px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 120ms;
}

.wk-search-item:hover,
.wk-search-item--highlighted {
  background: rgba(0, 0, 0, 0.04);
}

.wk-search-item-title {
  font-family: 'Sofia Pro Bold', -apple-system, sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-800, #3A3A3C);
  margin-bottom: 3px;
}

.wk-search-item-space {
  font-family: 'Sofia Pro Regular', -apple-system, sans-serif;
  font-size: 11px;
  color: #C8102E;
  opacity: 0.6;
  margin-bottom: 4px;
}

.wk-search-item-excerpt {
  font-family: 'Sofia Pro Regular', -apple-system, sans-serif;
  font-size: 12.5px;
  color: var(--gray-500, #8E8E93);
  line-height: 1.4;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.wk-search-item-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  font-family: 'Sofia Pro Regular', -apple-system, sans-serif;
  font-size: 11px;
  color: var(--gray-400, #AEAEB2);
}

.wk-search-item-tag {
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(52, 199, 89, 0.1);
  color: #30B855;
  font-size: 10px;
}

.wk-search-placeholder,
.wk-search-status {
  text-align: center;
  padding: 32px 16px;
  font-family: 'Sofia Pro Regular', -apple-system, sans-serif;
  font-size: 13px;
  color: var(--gray-400, #AEAEB2);
}

.wk-search-highlight {
  background: rgba(200, 16, 46, 0.12);
  color: #C8102E;
  padding: 0 2px;
  border-radius: 2px;
  font-weight: 600;
}

.wk-search-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 20px 12px;
}

.wk-search-filter-chip {
  font-family: 'Sofia Pro Regular', -apple-system, sans-serif;
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 100px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: transparent;
  color: var(--gray-600, #636366);
  cursor: pointer;
  transition: all 150ms;
}

.wk-search-filter-chip:hover {
  background: rgba(0, 0, 0, 0.04);
}

.wk-search-filter-chip--active {
  border-color: rgba(200, 16, 46, 0.2);
  background: rgba(200, 16, 46, 0.06);
  color: #C8102E;
}

.wk-search-empty-state {
  text-align: center;
  padding: 40px 24px;
}

.wk-search-empty-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  color: var(--gray-300, #D1D1D6);
}

.wk-search-empty-title {
  font-family: 'Sofia Pro Bold', -apple-system, sans-serif;
  font-size: 15px;
  color: var(--gray-700, #48484A);
  margin-bottom: 6px;
}

.wk-search-empty-hint {
  font-family: 'Sofia Pro Regular', -apple-system, sans-serif;
  font-size: 13px;
  color: var(--gray-400, #AEAEB2);
  margin-bottom: 16px;
}

.wk-search-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.wk-search-suggestion {
  font-family: 'Sofia Pro Regular', -apple-system, sans-serif;
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.06);
  color: var(--gray-600, #636366);
  cursor: pointer;
  transition: background 150ms;
}

.wk-search-suggestion:hover {
  background: rgba(0, 0, 0, 0.06);
}

.wk-search-skeleton {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 8px;
}

.wk-search-skeleton-item {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* ══════════════════════════════════
   SCROLL TO TOP
   ══════════════════════════════════ */
.wk-scroll-top {
  position: absolute;
  bottom: 24px;
  right: 24px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.04);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-600, #636366);
  z-index: 10;
  transition: background 150ms, transform 150ms;
  animation: wkScrollTopIn 200ms ease;
}

.wk-scroll-top:hover {
  background: #fff;
  transform: translateY(-2px);
}

.wk-scroll-top svg { width: 20px; height: 20px; }

/* ══════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════ */

/* Hide TOC on smaller screens */
@media (max-width: 1279px) {
  .wk-toc { display: none; }
}

/* Tablet: collapsible nav */
@media (max-width: 1023px) {
  .wk-nav {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 20;
    transform: translateX(-100%);
    box-shadow: none;
    background: rgba(247, 247, 249, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
  }

  .wk-nav--open {
    transform: translateX(0);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.08);
  }

  .wk-nav-close {
    display: flex;
  }

  .wk-nav-overlay {
    display: block;
  }

  .wk-content-mobile-header {
    display: flex;
  }
}

/* Mobile: full-width nav overlay */
@media (max-width: 767px) {
  .wk-nav {
    width: 100%;
    max-width: 320px;
  }

  .wk-welcome { padding: 20px 16px 40px; }

  .wk-welcome-search-input {
    font-size: 13px;
    padding: 10px 70px 10px 34px;
  }
  .wk-welcome-search-icon {
    left: 10px;
    width: 15px;
    height: 15px;
  }
  .wk-welcome-search-icon svg {
    width: 15px;
    height: 15px;
  }
  .wk-welcome-search-shortcut {
    right: 6px;
    min-width: 40px;
    height: 28px;
    font-size: 10px;
    padding: 0 6px;
  }

  .wk-welcome-filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
  }
  .wk-welcome-filters::-webkit-scrollbar { display: none; }
  .wk-welcome-filter { flex-shrink: 0; }

  .wk-article { padding: 0 20px 40px; }
  .wk-article-header { padding-top: 24px; }
  .wk-article-title { font-size: 26px; }
  .wk-article-content { font-size: 14.5px; }
  .wk-article-content h2 { border-bottom: none; }

  .wk-welcome-grid {
    grid-template-columns: 1fr;
  }

  .wk-welcome-bookmarks-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .wk-welcome-bookmarks-row::-webkit-scrollbar { display: none; }
  .wk-welcome-bookmark-pill { flex-shrink: 0; }

  .wk-welcome-skeleton-grid { grid-template-columns: 1fr; }

  .wk-search-filters { padding: 0 12px 10px; }

  .wk-search-dialog {
    margin: 0 8px;
    max-height: 80vh;
  }

  .wk-search-form {
    flex-direction: column;
  }

  .wk-scroll-top {
    bottom: 16px;
    right: 16px;
  }
}

/* ══════════════════════════════════
   REDUCED MOTION
   ══════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  .wk-welcome-card,
  .wk-article,
  .wk-welcome,
  .wk-nav-search-result,
  .wk-comment,
  .wk-tree-children,
  .wk-search-overlay,
  .wk-search-dialog,
  .wk-scroll-top,
  .wk-content-skeleton {
    animation: none !important;
  }

  .wk-tree-chevron-wrap,
  .wk-nav,
  .wk-nav-search-input,
  .wk-reading-progress {
    transition-duration: 0ms !important;
  }
}

/* ══════════════════════════════════
   PRINT
   ══════════════════════════════════ */
@media print {
  .wk-nav,
  .wk-toc,
  .wk-content-mobile-header,
  .wk-nav-overlay,
  .wk-search-overlay,
  .wk-scroll-top,
  .wk-article-actions,
  .wk-comments,
  .wk-reading-progress,
  .wk-code-copy-btn {
    display: none !important;
  }

  .wk-layout {
    display: block;
  }

  .wk-content {
    overflow: visible;
    padding: 0;
  }

  .wk-article {
    max-width: none;
    padding: 0;
  }

  .wk-article-content pre {
    white-space: pre-wrap;
    background: #f5f5f5 !important;
    color: #333 !important;
  }
}

/* ===================================
   WIKI V4 - Breadcrumb + Cards Browser
   =================================== */

.wk-page-shell {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
}

.wk-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 22px;
  border-bottom: none;
  background: linear-gradient(135deg, #C8102E 0%, #A50D25 100%);
  position: sticky;
  top: 0;
  z-index: 22;
  box-shadow: 0 2px 12px rgba(165, 13, 37, 0.25);
}

.wk-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 0;
}

.wk-breadcrumb-item {
  font-family: 'Sofia Pro Regular', -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.1;
}

.wk-breadcrumb-item:first-child {
  font-family: 'Sofia Pro Bold', -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.3px;
}

.wk-breadcrumb-item:not(:last-child)::after {
  content: '/';
  margin-left: 7px;
  color: rgba(255, 255, 255, 0.35);
}

.wk-breadcrumb-item--link {
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.wk-breadcrumb-item--link:hover {
  color: #fff;
}

.wk-breadcrumb-item--active {
  color: #fff;
  font-family: 'Sofia Pro Bold', -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
  font-weight: 600;
}

.wk-topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.wk-topbar-btn {
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-radius: 999px;
  height: 36px;
  padding: 0 15px;
  font-family: 'Sofia Pro Regular', -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
  font-size: 13px;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 200ms ease, background 200ms ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.wk-topbar-btn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.22);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border-color: rgba(255, 255, 255, 0.4);
}

.wk-topbar-btn--fav {
  background: rgba(255, 255, 255, 0.15);
}

.wk-topbar-badge {
  min-width: 19px;
  height: 19px;
  border-radius: 999px;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10.5px;
  font-weight: 600;
  color: #C8102E;
  background: #fff;
}

.wk-page-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.wk-page-body--article {
  grid-template-columns: minmax(0, 1fr) 260px;
  column-gap: 14px;
}

.wk-page-scroll {
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
  padding: 22px;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.13) transparent;
}

.wk-page-scroll::-webkit-scrollbar {
  width: 7px;
}

.wk-page-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.wk-page-scroll::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.13);
  border-radius: 999px;
}

.wk-browser-section {
  max-width: 1160px;
  margin: 0 auto;
  animation: wkFadeIn 220ms ease both;
}

.wk-browser-head h3 {
  margin: 0;
  font-family: 'Sofia Pro Bold', -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
  font-size: 29px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: #101014;
  display: flex;
  align-items: center;
  gap: 12px;
}

.wk-browser-head h3::before {
  content: '';
  width: 5px;
  height: 28px;
  border-radius: 3px;
  background: linear-gradient(180deg, #C8102E 0%, #A50D25 100%);
  flex-shrink: 0;
}

.wk-browser-head p {
  margin: 6px 0 0;
  font-family: 'Sofia Pro Regular', -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
  font-size: 14px;
  color: #6f7078;
}

.wk-browser-empty {
  margin-top: 18px;
  border: 1px dashed rgba(24, 24, 24, 0.17);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.58);
  padding: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #73747b;
  font-size: 14px;
}

.wk-browser-empty--error {
  flex-direction: column;
  gap: 16px;
}

.wk-browser-empty--article {
  margin: 22px auto;
  max-width: 900px;
}

.wk-entity-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.wk-entity-card {
  border: 1px solid rgba(22, 22, 22, 0.1);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(246, 247, 250, 0.97) 100%);
  border-radius: 20px;
  overflow: hidden;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  transition: transform 200ms ease, box-shadow 230ms ease, border-color 230ms ease;
}

.wk-entity-card:hover {
  transform: translateY(-3px);
  border-color: rgba(200, 16, 46, 0.18);
  box-shadow: 0 16px 34px rgba(200, 16, 46, 0.1);
}

.wk-entity-card-media {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, rgba(200, 16, 46, 0.06), rgba(237, 239, 244, 0.5));
}

.wk-entity-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.wk-entity-card-content {
  padding: 13px 14px 15px;
}

.wk-entity-card-content h4 {
  margin: 0;
  font-family: 'Sofia Pro Bold', -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
  font-size: 17px;
  color: #121218;
}

.wk-entity-card-content p {
  margin: 6px 0 0;
  font-family: 'Sofia Pro Regular', -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
  font-size: 13px;
  color: #6f6f77;
  line-height: 1.34;
}

.wk-entity-card-badge {
  display: inline-flex;
  margin-bottom: 8px;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 11px;
  font-family: 'Sofia Pro Bold', -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
  background: rgba(200, 16, 46, 0.08);
  color: #C8102E;
}

.wk-browser-empty--compact {
  margin-top: 12px;
  padding: 16px;
}

.wk-article-nav-shell {
  margin-top: 18px;
  border: 1px solid rgba(22, 22, 22, 0.1);
  border-radius: 18px;
  background:
    radial-gradient(circle at 0% 0%, rgba(255, 255, 255, 0.96), rgba(248, 249, 252, 0.88)),
    linear-gradient(180deg, rgba(244, 246, 250, 0.8), rgba(255, 255, 255, 0.95));
  box-shadow: 0 18px 36px rgba(18, 18, 18, 0.08);
  overflow: hidden;
}

.wk-article-nav-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid rgba(18, 18, 18, 0.08);
  background: rgba(255, 255, 255, 0.76);
  backdrop-filter: blur(10px);
}

.wk-article-nav-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wk-article-nav-field span {
  font-size: 11px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #7a7b84;
  font-family: 'Sofia Pro Bold', -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
}

.wk-article-nav-field input,
.wk-article-nav-field select {
  width: 100%;
  border: 1px solid rgba(18, 18, 18, 0.15);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.95);
  padding: 10px 12px;
  min-height: 40px;
  color: #121218;
  font-size: 14px;
  font-family: 'Sofia Pro Regular', -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
}

.wk-article-nav-field input:focus,
.wk-article-nav-field select:focus {
  outline: none;
  border-color: rgba(200, 16, 46, 0.3);
  box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.08);
}

.wk-article-nav-index {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(18, 18, 18, 0.08);
  background: rgba(255, 255, 255, 0.62);
}

.wk-article-index-pill {
  border: 1px solid rgba(18, 18, 18, 0.14);
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.92);
  color: #5f6068;
  font-size: 12px;
  font-family: 'Sofia Pro Bold', -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
  cursor: pointer;
  transition: all 180ms ease;
}

.wk-article-index-pill:hover {
  border-color: rgba(18, 18, 18, 0.3);
  color: #202026;
}

.wk-article-index-pill.active {
  border-color: rgba(200, 16, 46, 0.3);
  color: #C8102E;
  background: rgba(255, 255, 255, 1);
  box-shadow: 0 6px 15px rgba(200, 16, 46, 0.12);
}

.wk-article-nav-list {
  max-height: min(70vh, 980px);
  overflow: auto;
  padding: 4px 0;
}

.wk-article-nav-list::-webkit-scrollbar {
  width: 8px;
}

.wk-article-nav-list::-webkit-scrollbar-thumb {
  background: rgba(22, 22, 22, 0.18);
  border-radius: 999px;
}

.wk-article-group {
  padding: 8px 10px 12px;
}

.wk-article-group + .wk-article-group {
  border-top: 1px solid rgba(18, 18, 18, 0.07);
}

.wk-article-group-title {
  position: sticky;
  top: 0;
  z-index: 1;
  margin-bottom: 8px;
  padding: 4px 8px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #C8102E;
  font-family: 'Sofia Pro Bold', -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
  background: rgba(200, 16, 46, 0.04);
  border-radius: 10px;
}

.wk-article-group-rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wk-article-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  text-align: left;
  border: 1px solid rgba(18, 18, 18, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  padding: 10px 12px;
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 180ms ease;
}

.wk-article-row:hover {
  transform: translateY(-1px);
  border-color: rgba(200, 16, 46, 0.18);
  box-shadow: 0 10px 20px rgba(200, 16, 46, 0.08);
}

.wk-article-row:hover .wk-article-row-chevron {
  color: #C8102E;
}

.wk-article-row-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.wk-article-row-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 15px;
  color: #101016;
  font-family: 'Sofia Pro Bold', -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
}

.wk-article-row-meta {
  font-size: 12px;
  color: #72757f;
  font-family: 'Sofia Pro Regular', -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
}

.wk-article-row-chevron {
  font-size: 18px;
  line-height: 1;
  color: #9a9ca6;
}

.wk-welcome-v3 {
  max-width: 1160px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 22px;
  animation: wkFadeIn 220ms ease both;
}

.wk-search-inline {
  display: flex;
  gap: 8px;
  align-items: center;
}

.wk-search-inline input {
  flex: 1;
  min-width: 0;
  border-radius: 14px;
  border: 1px solid rgba(19, 19, 19, 0.12);
  background: rgba(255, 255, 255, 0.92);
  color: #131318;
  padding: 11px 14px;
  font-family: 'Sofia Pro Regular', -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
  font-size: 14px;
}

.wk-search-inline input:focus {
  outline: none;
  border-color: rgba(200, 16, 46, 0.3);
  box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.1);
}

.wk-search-inline button {
  border: none;
  border-radius: 14px;
  height: 42px;
  padding: 0 16px;
  font-family: 'Sofia Pro Bold', -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
  font-size: 13px;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(180deg, #D4213A 0%, #C8102E 100%);
  transition: transform 160ms ease, box-shadow 200ms ease;
}

.wk-search-inline button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(200, 16, 46, 0.3);
}

.wk-spaces-section,
.wk-popular-section {
  border: 1px solid rgba(200, 16, 46, 0.07);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.78);
  padding: 18px;
}

.wk-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.wk-section-head h3 {
  margin: 0;
  font-family: 'Sofia Pro Bold', -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
  font-size: 22px;
  color: #141418;
  display: flex;
  align-items: center;
  gap: 10px;
}

.wk-section-head h3::before {
  content: '';
  width: 4px;
  height: 22px;
  border-radius: 2px;
  background: linear-gradient(180deg, #C8102E 0%, #A50D25 100%);
  flex-shrink: 0;
}

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

.wk-space-card {
  border: 1px solid rgba(22, 22, 22, 0.1);
  border-radius: 18px;
  background: #fff;
  overflow: hidden;
  text-align: left;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 210ms ease;
}

.wk-space-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 11px 24px rgba(200, 16, 46, 0.12);
  border-color: rgba(200, 16, 46, 0.15);
}

.wk-space-card-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(145deg, rgba(200, 16, 46, 0.08), rgba(236, 238, 243, 0.55));
}

.wk-space-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.wk-space-card-title {
  margin: 10px 12px 0;
  font-family: 'Sofia Pro Bold', -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
  font-size: 16px;
  color: #16161b;
}

.wk-space-card-desc {
  margin: 4px 12px 13px;
  color: #6e7077;
  font-size: 12.5px;
  line-height: 1.3;
  font-family: 'Sofia Pro Regular', -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
}

.wk-mini-tabs {
  display: flex;
  gap: 6px;
}

.wk-mini-tabs button {
  border-radius: 999px;
  border: 1px solid rgba(20, 20, 20, 0.12);
  background: rgba(255, 255, 255, 0.88);
  color: #5e6168;
  font-size: 12px;
  padding: 5px 11px;
  font-family: 'Sofia Pro Regular', -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
  cursor: pointer;
}

.wk-mini-tabs button.active {
  border-color: rgba(200, 16, 46, 0.2);
  color: #C8102E;
  background: #fff;
  font-family: 'Sofia Pro Bold', -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
  box-shadow: 0 2px 8px rgba(200, 16, 46, 0.08);
}

.wk-article-h-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wk-article-h-card {
  border: 1px solid rgba(20, 20, 20, 0.1);
  border-radius: 16px;
  background: #fff;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  transition: transform 170ms ease, box-shadow 210ms ease;
}

.wk-article-h-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 9px 20px rgba(200, 16, 46, 0.1);
  border-color: rgba(200, 16, 46, 0.15);
}

.wk-article-h-image {
  aspect-ratio: 16 / 9;
  background: linear-gradient(145deg, rgba(200, 16, 46, 0.06), rgba(236, 238, 244, 0.55));
}

.wk-article-h-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wk-article-h-content {
  padding: 13px 15px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.wk-article-h-rank {
  display: inline-flex;
  align-self: flex-start;
  margin-bottom: 6px;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #C8102E 0%, #A50D25 100%);
}

.wk-article-h-content h4 {
  margin: 0;
  font-family: 'Sofia Pro Bold', -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
  color: #18181d;
  font-size: 16px;
  line-height: 1.25;
}

.wk-article-h-meta {
  margin-top: 7px;
  color: #6f7179;
  font-size: 12px;
  font-family: 'Sofia Pro Regular', -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
}

.wk-welcome-loading {
  border: 1px dashed rgba(20, 20, 20, 0.16);
  border-radius: 14px;
  padding: 18px;
  color: #6e6f78;
  text-align: center;
}

/* ── Skeleton loaders for welcome v3 ── */
.wk-skel-shimmer {
  background: linear-gradient(90deg, rgba(200, 16, 46, 0.04) 0%, rgba(200, 16, 46, 0.04) 25%, rgba(200, 16, 46, 0.01) 50%, rgba(200, 16, 46, 0.04) 75%, rgba(200, 16, 46, 0.04) 100%);
  background-size: 300% 100%;
  animation: wkShimmerEnhanced 2s ease-in-out infinite;
}

.wk-skel-spaces {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.wk-skel-space-card {
  border: 1px solid rgba(200, 16, 46, 0.06);
  border-radius: 18px;
  overflow: hidden;
}

.wk-skel-space-card-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(90deg, rgba(200, 16, 46, 0.04) 25%, rgba(200, 16, 46, 0.01) 50%, rgba(200, 16, 46, 0.04) 75%);
  background-size: 300% 100%;
  animation: wkShimmerEnhanced 2s ease-in-out infinite;
}

.wk-skel-space-card-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wk-skel-line {
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(200, 16, 46, 0.05) 25%, rgba(200, 16, 46, 0.015) 50%, rgba(200, 16, 46, 0.05) 75%);
  background-size: 300% 100%;
  animation: wkShimmerEnhanced 2s ease-in-out infinite;
}

.wk-skel-line--title {
  height: 16px;
  width: 65%;
}

.wk-skel-line--desc {
  height: 12px;
  width: 85%;
}

.wk-skel-line--sm {
  height: 12px;
  width: 50%;
}

.wk-skel-line--lg {
  height: 18px;
  width: 75%;
}

.wk-skel-article-h-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wk-skel-article-h {
  border: 1px solid rgba(200, 16, 46, 0.06);
  border-radius: 16px;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  overflow: hidden;
}

.wk-skel-article-h-img {
  aspect-ratio: 16 / 9;
  background: linear-gradient(90deg, rgba(200, 16, 46, 0.04) 25%, rgba(200, 16, 46, 0.015) 50%, rgba(200, 16, 46, 0.04) 75%);
  background-size: 300% 100%;
  animation: wkShimmerEnhanced 2s ease-in-out infinite;
}

.wk-skel-article-h-body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
}

.wk-skel-badge {
  width: 36px;
  height: 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(200, 16, 46, 0.06) 25%, rgba(200, 16, 46, 0.02) 50%, rgba(200, 16, 46, 0.06) 75%);
  background-size: 300% 100%;
  animation: wkShimmerEnhanced 2s ease-in-out infinite;
}

/* Entity card skeletons */
.wk-skel-entity-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.wk-skel-entity-card {
  border: 1px solid rgba(200, 16, 46, 0.06);
  border-radius: 20px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.7);
}

.wk-skel-entity-card-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(90deg, rgba(200, 16, 46, 0.04) 25%, rgba(200, 16, 46, 0.015) 50%, rgba(200, 16, 46, 0.04) 75%);
  background-size: 300% 100%;
  animation: wkShimmerEnhanced 2s ease-in-out infinite;
}

.wk-skel-entity-card-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Article list skeletons */
.wk-skel-article-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
}

.wk-skel-article-row {
  border: 1px solid rgba(200, 16, 46, 0.05);
  border-radius: 12px;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(255, 255, 255, 0.7);
}

/* Stagger delays for skeleton items */
.wk-skel-delay-1 { animation-delay: 0.1s; }
.wk-skel-delay-2 { animation-delay: 0.2s; }
.wk-skel-delay-3 { animation-delay: 0.3s; }
.wk-skel-delay-4 { animation-delay: 0.4s; }

@media (max-width: 1024px) {
  .wk-skel-spaces { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wk-skel-entity-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wk-skel-article-h { grid-template-columns: 180px minmax(0, 1fr); }
}

@media (max-width: 700px) {
  .wk-skel-spaces { grid-template-columns: 1fr; }
  .wk-skel-entity-grid { grid-template-columns: 1fr; }
  .wk-skel-article-h { grid-template-columns: 1fr; }
}

.wk-fav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
  z-index: 29;
}

.wk-fav-overlay--open {
  opacity: 1;
  pointer-events: auto;
}

.wk-fav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(420px, 92vw);
  background: #f6f7f9;
  box-shadow: -12px 0 34px rgba(0, 0, 0, 0.2);
  transform: translateX(100%);
  transition: transform 240ms cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 30;
  display: flex;
  flex-direction: column;
}

.wk-fav-drawer--open {
  transform: translateX(0);
}

.wk-fav-header {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid rgba(20, 20, 20, 0.1);
  background: rgba(255, 255, 255, 0.9);
}

.wk-fav-header h3 {
  margin: 0;
  font-size: 20px;
  color: #17171c;
  font-family: 'Sofia Pro Bold', -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
}

.wk-fav-close {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: none;
  background: rgba(20, 20, 20, 0.06);
  color: #51525a;
  cursor: pointer;
}

.wk-fav-close:hover {
  background: rgba(20, 20, 20, 0.12);
}

.wk-fav-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
}

.wk-fav-empty {
  margin-top: 12px;
  border: 1px dashed rgba(20, 20, 20, 0.15);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
  padding: 20px;
  text-align: center;
  color: #74757d;
}

.wk-fav-space + .wk-fav-space {
  margin-top: 18px;
}

.wk-fav-space-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.wk-fav-space-title {
  font-family: 'Sofia Pro Bold', -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
  font-size: 15px;
  color: #17171c;
}

.wk-fav-space-count {
  font-size: 11px;
  color: #6a6c74;
  border-radius: 999px;
  border: 1px solid rgba(20, 20, 20, 0.16);
  padding: 2px 7px;
}

.wk-fav-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.wk-fav-card {
  border: 1px solid rgba(20, 20, 20, 0.1);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.wk-fav-card-main {
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  padding: 0;
}

.wk-fav-card-image {
  aspect-ratio: 16 / 9;
  background: linear-gradient(145deg, rgba(221, 224, 230, 0.75), rgba(237, 239, 244, 0.55));
}

.wk-fav-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wk-fav-card-title {
  padding: 10px 11px 8px;
  font-size: 14px;
  line-height: 1.3;
  color: #17171d;
  font-family: 'Sofia Pro Bold', -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
}

.wk-fav-card-remove {
  margin: 0 11px 10px;
  border: 1px solid rgba(20, 20, 20, 0.15);
  border-radius: 9px;
  padding: 6px 10px;
  background: #fff;
  font-size: 12px;
  color: #5d6068;
  cursor: pointer;
}

.wk-fav-card-remove:hover {
  border-color: rgba(20, 20, 20, 0.26);
  color: #222228;
}

@media (max-width: 1320px) {
  .wk-page-body--article {
    grid-template-columns: minmax(0, 1fr);
  }

  .wk-page-body--article .wk-toc {
    display: none;
  }
}

@media (max-width: 1024px) {
  .wk-page-scroll {
    padding: 16px;
  }

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

  .wk-article-nav-toolbar {
    grid-template-columns: minmax(0, 1fr);
  }

  .wk-article-nav-list {
    max-height: none;
  }

  .wk-article-h-card {
    grid-template-columns: 180px minmax(0, 1fr);
  }
}

@media (max-width: 700px) {
  .wk-topbar {
    padding: 12px 14px;
    align-items: flex-start;
    flex-direction: column;
  }

  .wk-topbar-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .wk-search-inline {
    flex-direction: column;
    align-items: stretch;
  }

  .wk-spaces-grid,
  .wk-entity-grid {
    grid-template-columns: 1fr;
  }

  .wk-article-nav-toolbar {
    padding: 12px;
    gap: 10px;
  }

  .wk-article-nav-index {
    padding: 10px 12px;
    gap: 6px;
  }

  .wk-article-index-pill {
    padding: 6px 9px;
    font-size: 11px;
  }

  .wk-article-group {
    padding: 8px;
  }

  .wk-article-row {
    padding: 9px 10px;
  }

  .wk-article-h-card {
    grid-template-columns: 1fr;
  }

  .wk-article-h-image {
    aspect-ratio: 16 / 9;
  }
}
