:root {
  --bg: #F7F7F5;
  --bg-card: #FFFFFF;
  --border: #E8E7E3;
  --text-primary: #1A1A1A;
  --text-secondary: #6B6B6B;
  --text-tertiary: #A0A09A;
  --accent: #1A1A1A;
  --accent-red: #C43E2A;
  --accent-bg: rgba(0, 0, 0, 0.04);
  --hover-bg: rgba(0, 0, 0, 0.025);
  --font-stack: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Segoe UI', sans-serif;
  --font-serif: 'Noto Serif SC', 'Source Han Serif SC', Georgia, serif;

  /* z-index */
  --z-topbar: 20;
  --z-dropdown: 30;
  --z-overlay: 40;
  --z-modal: 50;
  --z-toast: 60;

  /* Section colors — monochrome */
  --color-industry: #1A1A1A;
  --color-methods: #333333;
  --color-big-tech: #1A1A1A;
  --color-ai-design: #1A1A1A;
  --color-research: #333333;
  --color-trends: #1A1A1A;
  --color-tools: #333333;
  --color-articles: #1A1A1A;
  --color-career: #333333;
}

[data-theme="dark"] {
  --bg: #121210;
  --bg-card: #1C1C19;
  --border: #2A2A26;
  --text-primary: #E8E6E0;
  --text-secondary: #908E88;
  --text-tertiary: #5A5850;
  --accent: #E8E6E0;
  --accent-red: #E05A47;
  --accent-bg: rgba(255, 255, 255, 0.05);
  --hover-bg: rgba(255, 255, 255, 0.035);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121210;
    --bg-card: #1C1C19;
    --border: #2A2A26;
    --text-primary: #E8E6E0;
    --text-secondary: #908E88;
    --text-tertiary: #5A5850;
    --accent: #E8E6E0;
    --accent-bg: rgba(255, 255, 255, 0.05);
    --hover-bg: rgba(255, 255, 255, 0.035);
  }
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* Global theme transition */
body.theme-transitioning,
body.theme-transitioning .topnav,
body.theme-transitioning .main-content,
body.theme-transitioning .page-container {
  transition: background-color 300ms ease, color 300ms ease, border-color 300ms ease;
}

body {
  font-family: var(--font-stack);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* Hide all scrollbars globally */
*::-webkit-scrollbar { display: none; }
* { scrollbar-width: none; -ms-overflow-style: none; }

/* ===== APP LAYOUT ===== */
#app {
  display: flex;
  min-height: 100vh;
}

/* ===== TOP NAVIGATION ===== */
.topnav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: rgba(247,247,245,0.6);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: var(--z-topbar);
}
[data-theme="dark"] .topnav {
  background: rgba(18,18,16,0.6);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .topnav {
    background: rgba(18,18,16,0.6);
  }
}

.topnav-inner {
  max-width: 900px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 24px;
}

.topnav-brand {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  margin-right: 32px;
  letter-spacing: -0.3px;
}

.topnav-links {
  display: flex;
  gap: 8px;
  flex: 1;
}

.topnav-link {
  font-size: 14px;
  color: var(--text-tertiary);
  text-decoration: none;
  padding: 6px 14px;
  transition: color 150ms ease;
  letter-spacing: 0;
}

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

.topnav-link.active {
  color: var(--text-primary);
  font-weight: 600;
  position: relative;
}
.topnav-link.active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 1.5px;
  border-radius: 1px;
  background: var(--text-primary);
}

.topnav-right {
  display: flex;
  align-items: center;
  gap: 4px;
}

.topnav-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 6px;
  background: none;
  color: var(--text-primary);
  cursor: pointer;
  transition: background 150ms ease;
}

.topnav-icon-btn:hover {
  background: var(--hover-bg);
}

.topnav-icon-btn:active {
  transform: scale(0.92);
}

/* Show sun in dark mode, moon in light mode */
.theme-icon-dark { display: none; }
[data-theme="dark"] .theme-icon-light { display: none; }
[data-theme="dark"] .theme-icon-dark { display: block; }

/* Hide topnav links on mobile */
@media (max-width: 768px) {
  .topnav-links { display: none; }
  .topnav-inner { padding: 0 16px; }
  .topnav-brand { margin-right: auto; }
}

/* ===== MAIN CONTENT ===== */
.main-content {
  flex: 1;
  min-height: 100vh;
  position: relative;
  padding-top: 56px;
}

/* Page transitions */
.main-content.view-exit {
  opacity: 0.3;
  transition: opacity 120ms ease;
}
.view-enter {
  animation: viewFadeIn 300ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes viewFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-container {
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  padding: 48px 24px;
}

/* ===== TODAY PAGE ===== */
.today-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0;
  margin-bottom: 40px;
}

.today-title {
  font-size: 32px;
  font-weight: 700;
  font-family: var(--font-serif);
  color: var(--text-primary);
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  letter-spacing: -0.5px;
}

.today-date-text {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 6px;
  letter-spacing: 0.5px;
}

.today-archive-link {
  display: flex;
  align-items: center;
  gap: 2px;
  font-family: var(--font-stack);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-tertiary);
  text-decoration: none;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  transition: color 150ms ease, border-color 150ms ease;
}
.today-archive-link:hover {
  color: var(--text-primary);
  border-color: var(--text-primary);
}
.today-archive-link svg {
  flex-shrink: 0;
}

/* AI Summary Card — editorial divider style */
.ai-summary-card {
  background: none;
  border: none;
  border-top: 3px double var(--text-tertiary);
  border-bottom: 1px solid var(--text-tertiary);
  padding: 24px 0;
  margin-bottom: 0;
}

.ai-summary-header {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 10px;
  color: var(--text-tertiary);
}

.ai-summary-text {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-primary);
}

/* ===== ARTICLE CARD ===== */
.article-card {
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  position: relative;
  transition: background 150ms ease, padding 150ms ease, margin 150ms ease;
  cursor: pointer;
  animation: fade-up 400ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.article-card:first-child {
  padding-top: 28px;
}

.article-card:last-child {
  border-bottom: none;
}

.article-card:hover {
  background: var(--hover-bg);
  padding-left: 16px;
  padding-right: 16px;
  margin: 0 -16px;
}

.article-card.focused {
  background: var(--hover-bg);
}
.link-card.focused,
.link-featured-card.focused {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.article-high-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-red);
  flex-shrink: 0;
  margin-top: 8px;
  position: relative;
  cursor: default;
}
.article-high-dot::after {
  content: '精选推荐';
  position: absolute;
  left: 50%;
  bottom: calc(100% + 6px);
  transform: translateX(-50%);
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 500;
  color: var(--bg);
  background: var(--text-primary);
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 150ms ease;
}
.article-high-dot:hover::after {
  opacity: 1;
}
.article-title {
  font-size: 18px;
  font-weight: 700;
  font-family: var(--font-stack);
  color: var(--text-primary);
  line-height: 1.45;
  margin-bottom: 8px;
  cursor: pointer;
  -webkit-font-smoothing: antialiased;
}

.article-summary {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.75;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* expanded summary handled by cross-fade below */

.article-full-content {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 350ms cubic-bezier(0.22, 1, 0.36, 1);
  overflow: hidden;
}

.article-full-content > * {
  overflow: hidden;
}

.article-card.expanded .article-full-content {
  grid-template-rows: 1fr;
}

.article-full-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.85;
  padding-top: 12px;
}
.detail-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0;
}
.detail-section + .detail-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.detail-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.detail-content {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.9;
}

.article-original-link {
  display: inline-flex;
  align-items: center;
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-tertiary);
  text-decoration: none;
  transition: color 150ms ease;
}
.article-original-link:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

/* ===== ARCHIVE PAGE ===== */
.archive-page {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 56px);
  overflow: hidden;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

.archive-header {
  flex-shrink: 0;
  padding: 32px 24px 24px;
}
.archive-title {
  font-size: 26px;
  font-weight: 700;
  font-family: var(--font-serif);
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}
.archive-subtitle {
  font-size: 13px;
  color: var(--text-tertiary);
}

.archive-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  align-items: start;
  flex: 1;
  overflow-y: auto;
  padding: 0 24px 32px;
}

.archive-left {
  position: sticky;
  top: 0;
}

.archive-right {
  min-width: 0;
}

.archive-right-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
}

/* Calendar */
.calendar-wrapper {
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 16px;
  background: var(--bg-card);
}

.calendar-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.cal-nav-btn {
  background: none;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  padding: 6px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 150ms ease, color 150ms ease;
}

.cal-nav-btn:hover {
  background: var(--hover-bg);
  color: var(--text-primary);
}

.cal-nav-btn:active {
  transform: scale(0.92);
}

.cal-month-label {
  font-size: 16px;
  font-weight: 500;
  min-width: 100px;
  text-align: center;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.cal-header {
  text-align: center;
  font-size: 12px;
  color: var(--text-tertiary);
  padding: 4px 0;
}

.cal-day {
  text-align: center;
  font-size: 14px;
  border-radius: 50%;
  position: relative;
  color: var(--text-primary);
  width: 32px;
  height: 32px;
  line-height: 32px;
  margin: 2px auto;
}

.cal-day.empty { visibility: hidden; }

.cal-day.today {
  font-weight: 700;
}

.cal-day.selected {
  background: var(--text-primary);
  color: var(--bg);
  font-weight: 600;
}

.cal-day.has-data::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text-primary);
}

.cal-day.has-data { cursor: pointer; transition: background 150ms ease; }
.cal-day.has-data:hover { background: var(--hover-bg); }
.cal-day.has-data:active { transform: scale(0.9); }
.cal-day.selected:hover { background: var(--text-primary); }

.cal-legend {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-tertiary);
}

.cal-legend-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.archive-month-stats {
  margin-top: 20px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-card);
}

.archive-month-stats-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.archive-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 13px;
}

.archive-stat-label {
  color: var(--text-secondary);
}

.archive-stat-value {
  font-weight: 600;
  color: var(--text-primary);
}

/* ===== SEARCH MODAL ===== */
.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  z-index: var(--z-modal);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 10vh 24px 0;
}

.search-modal {
  width: 100%;
  max-width: 560px;
  max-height: 70vh;
  background: var(--bg);
  border-radius: 12px;
  box-shadow: 0 24px 48px -12px rgba(0,0,0,0.18);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: searchSlideIn 200ms ease both;
}
@keyframes searchSlideIn {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}

.search-modal-input-row {
  display: flex;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  gap: 10px;
}

.search-modal-icon {
  font-size: 18px;
  color: var(--text-tertiary);
}

.search-modal-input {
  flex: 1;
  border: none;
  background: none;
  font-size: 15px;
  color: var(--text-primary);
  outline: none;
  font-family: inherit;
}

.search-modal-input:focus-visible {
  outline: none;
}

.search-modal-input::placeholder {
  color: var(--text-tertiary);
  font-style: italic;
}
.search-modal-input:focus::placeholder {
  color: transparent;
}

.search-modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  background: none;
  color: var(--text-tertiary);
  cursor: pointer;
  border-radius: 4px;
  transition: color 150ms, background 150ms;
}
.search-modal-close:hover {
  color: var(--text-primary);
  background: var(--hover-bg);
}

.search-modal-body {
  overflow-y: auto;
  padding: 16px 20px;
  flex: 1;
}

.search-suggestions-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}
.search-history-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.search-history-row .search-suggestions-title {
  margin-bottom: 0;
}
.search-clear-history {
  font-size: 12px;
  color: var(--text-tertiary);
  background: none;
  border: none;
  cursor: pointer;
}
.search-clear-history:hover {
  color: var(--text-primary);
}

.search-suggestion-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.search-suggestion-tag {
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 13px;
  color: var(--text-secondary);
  background: var(--bg);
  cursor: pointer;
  transition: border-color 150ms ease, color 150ms ease;
}

.search-suggestion-tag:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.search-results-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-tertiary);
  margin-bottom: 10px;
  margin-top: 16px;
}
.search-results-title:first-child {
  margin-top: 0;
}
.search-more-hint {
  text-align: center;
  font-size: 13px;
  color: var(--text-tertiary);
  padding: 12px 0;
}
.search-result-wiki {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 4px;
  transition: background 150ms ease;
}
.search-result-wiki:hover {
  background: var(--hover-bg);
}
.search-result-wiki-icon {
  font-size: 16px;
  flex-shrink: 0;
}
.search-result-wiki-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}
.search-result-wiki-tags {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-left: auto;
  white-space: nowrap;
}
.search-result-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 4px;
  transition: background 150ms ease;
}
.search-result-link:hover {
  background: var(--hover-bg);
}
.search-result-link-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
}
.search-result-link-name:hover {
  text-decoration: underline;
}
.search-result-link-cat {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-left: auto;
}

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  color: var(--text-tertiary);
  font-size: 14px;
  padding: 60px 0;
}
/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text-primary);
  color: var(--bg);
  padding: 8px 20px;
  border-radius: 4px;
  font-size: 14px;
  z-index: var(--z-toast);
  animation: toast-slide 300ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes toast-out {
  from { opacity: 1; transform: translateX(-50%) translateY(0); }
  to { opacity: 0; transform: translateX(-50%) translateY(8px); }
}
.toast.toast-exit {
  animation: toast-out 200ms ease forwards;
}

/* ===== CONFIRM DIALOG ===== */
.confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: overlay-in 200ms ease both;
}
.confirm-dialog {
  background: var(--bg);
  border-radius: 8px;
  padding: 24px;
  max-width: 360px;
  width: 90%;
  box-shadow: 0 16px 32px -8px rgba(0,0,0,0.18);
}
.confirm-msg {
  font-size: 15px;
  color: var(--text-primary);
  margin-bottom: 20px;
  line-height: 1.6;
}
.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.confirm-btn {
  padding: 6px 16px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: none;
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
  transition: background 150ms ease, color 150ms ease;
}
.confirm-btn:hover {
  background: var(--hover-bg);
  color: var(--text-primary);
}
.confirm-btn.ok {
  background: var(--text-primary);
  color: var(--bg);
  border-color: var(--text-primary);
}
.confirm-btn.ok:hover {
  opacity: 0.85;
}

/* ===== P2: Article expand cross-fade ===== */
.article-card .article-summary {
  transition: opacity 200ms ease;
}
.article-card.expanded .article-summary {
  opacity: 0;
  height: 0;
  overflow: hidden;
  margin: 0;
}

@keyframes float-gentle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* ===== P2: Pending state dots animation ===== */
.pending-dots {
  display: inline-block;
  width: 1.5em;
  text-align: left;
  overflow: hidden;
  vertical-align: bottom;
}
.pending-dots::after {
  content: '...';
  display: inline-block;
  animation: dots-reveal 1.5s steps(4, end) infinite;
}
@keyframes dots-reveal {
  0% { width: 0; }
  100% { width: 1.5em; }
}
.pending-clock {
  display: inline-block;
  animation: float-gentle 2s ease-in-out infinite;
}

/* ===== LOADING SKELETON ===== */
.skeleton {
  background: linear-gradient(90deg, var(--border) 25%, transparent 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}

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

.skeleton-line { height: 16px; margin-bottom: 8px; }
.skeleton-line.short { width: 40%; }
.skeleton-line.medium { width: 70%; }
.skeleton-line.long { width: 100%; }

/* ===== MICRO ANIMATIONS ===== */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.link-card, .link-featured-card {
  animation: fade-up 400ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.wink-section {
  animation: fade-up 400ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.wink-section:nth-child(2) { animation-delay: 60ms; }
.wink-section:nth-child(3) { animation-delay: 120ms; }
.wink-section:nth-child(4) { animation-delay: 180ms; }
.wink-section:nth-child(5) { animation-delay: 240ms; }
.wink-section:nth-child(6) { animation-delay: 300ms; }
.wink-section:nth-child(7) { animation-delay: 360ms; }

/* Smooth expand chevron */
.article-expand-hint svg {
  transition: transform 300ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* Search overlay fade */
.search-overlay {
  animation: overlay-in 200ms ease both;
}
@keyframes overlay-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes toast-slide {
  from { opacity: 0; transform: translateX(-50%) translateY(12px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ===== RESPONSIVE ===== */

/* Tablet / narrow windows */
@media (max-width: 1024px) {
  .page-container {
    max-width: 100%;
    padding: 24px 24px;
  }
}

/* Small screens */
@media (max-width: 768px) {
  * { -webkit-tap-highlight-color: transparent; }

  html, body { overflow-x: hidden; }

  .page-container {
    max-width: 100%;
    padding: 24px 16px;
  }

  .archive-page {
    height: auto;
    overflow: visible;
  }
  .archive-layout {
    grid-template-columns: 1fr;
    padding: 0 16px 16px;
    overflow: visible;
  }
  .archive-left {
    position: static;
  }
  .archive-header {
    padding: 20px 16px 16px;
  }

  .link-grid {
    grid-template-columns: 1fr !important;
  }

  .link-daily-grid {
    grid-template-columns: 1fr !important;
  }

}

/* 超小屏幕适配 */
@media (max-width: 480px) {

  .page-container {
    padding: 16px 12px;
  }
}

/* ===== ARCHIVE BACK LINK ===== */
.archive-back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--text-tertiary);
  text-decoration: none;
  margin-bottom: 12px;
  transition: color 150ms ease;
}
.archive-back-link:hover {
  color: var(--text-primary);
}

/* ===== UXLINK PAGE ===== */
.link-header { margin-bottom: 24px; }
.link-title {
  font-size: 32px;
  font-weight: 700;
  font-family: var(--font-serif);
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}
.link-subtitle {
  font-size: 13px;
  color: var(--text-tertiary);
}
.link-daily-section {
  margin-bottom: 24px;
}
.link-section-heading {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-tertiary);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.link-daily-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.link-featured-bottom {
  display: flex;
  align-items: center;
  margin-top: auto;
  gap: 6px;
  flex-wrap: wrap;
}

.link-hash-tag {
  font-size: 12px;
  color: var(--text-tertiary);
}
.link-featured-card {
  border: 1px solid var(--border);
  border-top: none;
  border-left: 3px solid var(--text-primary);
  border-radius: 4px;
  padding: 20px 20px;
  background: var(--bg-card);
  transition: background 200ms ease, box-shadow 200ms ease, border-color 200ms ease, transform 200ms cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  flex-direction: column;
  min-width: 0;
  cursor: pointer;
}
[data-theme="dark"] .link-featured-card {
  background: var(--bg-card);
  border-color: var(--border);
  border-left-color: var(--text-primary);
}
.link-featured-card:hover {
  background: var(--hover-bg);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  border-color: var(--text-tertiary);
  transform: translateY(-2px);
}
[data-theme="dark"] .link-featured-card:hover {
  background: var(--hover-bg);
}
.link-featured-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.link-featured-name:hover {
  text-decoration: underline;
}
.link-arrow {
  color: var(--text-tertiary);
  vertical-align: middle;
  margin-left: 2px;
  flex-shrink: 0;
}
.link-featured-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.link-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.link-card {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 16px 18px;
  background: var(--bg-card);
  transition: background 200ms ease, box-shadow 200ms ease, border-color 200ms ease, transform 200ms cubic-bezier(0.22, 1, 0.36, 1);
  min-width: 0;
  cursor: pointer;
}
.link-card:hover {
  background: var(--hover-bg);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  border-color: var(--text-tertiary);
  transform: translateY(-2px);
}
.link-card:active {
  transform: translateY(0);
  transition-duration: 80ms;
}
.link-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.link-card-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.link-card-name:hover {
  text-decoration: underline;
}
.link-card-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Section filter pills (used by link page) */
.section-pills {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.section-pill {
  padding: 5px 0;
  font-size: 14px;
  border: none;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--text-tertiary);
  cursor: pointer;
  transition: color 150ms ease, border-color 150ms ease;
  white-space: nowrap;
  margin-right: 12px;
  font-family: inherit;
}

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

.section-pill.active {
  color: var(--text-primary);
  font-weight: 600;
  border-bottom-color: var(--text-primary);
}

.link-pills-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
}
.link-pills-wrapper .link-category-pills {
  flex: 1;
  min-width: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}
/* ===== UXWINK PAGE ===== */
/* ===== UXWIKI PAGE ===== */
.wink-header { margin-bottom: 32px; }
.wink-page-title {
  font-size: 32px;
  font-weight: 700;
  font-family: var(--font-serif);
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}
.wink-subtitle {
  font-size: 13px;
  color: var(--text-tertiary);
}
.wink-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}
@media (max-width: 768px) {
  .wink-columns { grid-template-columns: 1fr; }
}
.wink-section { margin-bottom: 32px; }
.wink-section-line {
  height: 1px;
  margin-bottom: 10px;
  background: var(--text-primary);
}
.wink-section-name {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 12px;
  font-weight: 600;
}
.wink-section-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 150ms ease, padding-left 150ms ease;
  letter-spacing: 0.01em;
  position: relative;
}
.wink-section-item::after {
  content: '\2192';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  transition: opacity 150ms ease;
  color: var(--text-tertiary);
  font-size: 13px;
}
.wink-section-item:hover::after {
  opacity: 1;
}
.wink-section-item:hover {
  color: var(--text-primary);
  padding-left: 6px;
}
.wink-section-item:last-child { border-bottom: none; }
.wink-article {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 32px;
  background: var(--bg-card);
}
.wink-article-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  margin-bottom: 6px;
}
.wink-article-title {
  font-size: 22px;
  font-weight: 700;
}
.wink-article-tags {
  display: flex;
  gap: 6px;
  margin-top: 0;
  margin-bottom: 20px;
}
.wink-article-tag {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--hover-bg);
  color: var(--text-secondary);
}
.wink-article-body {
  font-size: 15px;
  line-height: 1.9;
  color: var(--text-secondary);
}
.wink-article-body h3 {
  font-size: 17px;
  color: var(--text-primary);
  margin: 24px 0 12px;
}
.wink-article-body ul,
.wink-article-body ol {
  padding-left: 20px;
  margin-bottom: 16px;
}
.wink-article-body li {
  margin-bottom: 8px;
}
.wink-article-body strong {
  color: var(--text-primary);
}
.wink-article-body blockquote {
  border-left: 2px solid var(--border);
  padding-left: 16px;
  margin: 16px 0;
  color: var(--text-secondary);
  font-style: italic;
}

/* 上一节 / 下一节导航 */
.wink-article-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.wink-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 2px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-tertiary);
  transition: color 150ms ease;
}
.wink-nav-btn:hover {
  color: var(--accent);
}
.wink-nav-btn svg {
  flex-shrink: 0;
}
.wink-nav-label {
  white-space: nowrap;
}
.wink-nav-title {
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 150ms ease;
}
.wink-nav-btn:hover .wink-nav-title {
  color: var(--accent);
}
.wink-nav-next {
  margin-left: auto;
}

/* ===== SELECTION COLOR ===== */
::selection {
  background: var(--text-primary);
  color: var(--bg);
}

/* ===== 减弱动画偏好 ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ===== 移动端底部导航栏 ===== */
.mobile-tab-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: var(--bg);
  border-top: 1px solid var(--border);
  z-index: var(--z-topbar);
  padding: 0 8px;
  padding-bottom: env(safe-area-inset-bottom);
}
@media (max-width: 768px) {
  .mobile-tab-bar { display: flex; align-items: center; justify-content: space-around; }
  .main-content { padding-bottom: calc(56px + env(safe-area-inset-bottom)); }
}
.mobile-tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 6px 12px;
  color: var(--text-tertiary);
  text-decoration: none;
  font-size: 10px;
  transition: color 150ms ease;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.mobile-tab-item svg {
  width: 22px;
  height: 22px;
}
.mobile-tab-item.active {
  color: var(--accent);
}
.mobile-tab-item:active {
  transform: scale(0.92);
}

/* ===== 跳过导航链接 ===== */
.skip-to-content {
  position: fixed;
  top: -100%;
  left: 16px;
  padding: 8px 16px;
  background: var(--accent);
  color: #fff;
  border-radius: 4px;
  z-index: var(--z-toast);
  font-size: 14px;
  text-decoration: none;
  transition: top 150ms ease;
}
.skip-to-content:focus {
  top: 16px;
}

/* Back to top button */
/* Share poster button */
.share-poster-btn {
  position: fixed;
  bottom: 32px;
  left: 50%;
  margin-left: 430px;
  width: 38px;
  height: 38px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 250ms ease, visibility 250ms ease, transform 250ms ease, background 150ms ease, color 150ms ease;
  z-index: var(--z-topbar);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.share-poster-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.share-poster-btn:hover {
  background: var(--bg-card);
  color: var(--text-primary);
}
.share-poster-btn:active {
  transform: scale(0.92);
}
@media (max-width: 768px) {
  .share-poster-btn {
    bottom: 80px;
    left: auto;
    right: 16px;
    margin-left: 0;
    width: 36px;
    height: 36px;
  }
}

.back-to-top {
  position: fixed;
  bottom: 80px;
  left: 50%;
  margin-left: 430px;
  width: 38px;
  height: 38px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 250ms ease, visibility 250ms ease, transform 250ms ease, background 150ms ease, color 150ms ease;
  z-index: var(--z-topbar);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top:hover {
  background: var(--bg-card);
  color: var(--text-primary);
}
.back-to-top:active {
  transform: scale(0.92);
}

/* ===== FOOTER ===== */
.site-footer {
  text-align: center;
  padding: 32px 24px 28px;
  font-size: 10px;
  color: var(--text-tertiary);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 24px;
  transition: color 150ms;
}

@media (max-width: 768px) {
  .back-to-top {
    bottom: 128px;
    left: auto;
    right: 16px;
    margin-left: 0;
    width: 36px;
    height: 36px;
  }
}

/* ===== ARTICLE EXPAND HINT ===== */
.article-title-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.article-title-row .article-title {
  flex: 1;
}
.article-expand-hint {
  color: var(--text-tertiary);
  flex-shrink: 0;
  margin-top: 4px;
  transition: transform 200ms ease;
}
.article-card.expanded .article-expand-hint {
  transform: rotate(180deg);
}

/* ===== WINK ARTICLE BODY TYPOGRAPHY ===== */
.wink-article-body p {
  margin-bottom: 16px;
}
