:root {
  color-scheme: light;
  --bg: #f7f8fa;
  --card: #ffffff;
  --text: #222831;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #f3f4f6;
  --primary: #111827;
  --accent: #217346;
  --accent-dark: #1a5c38;
  --blue: #2563eb;
  --danger: #dc2626;
  --shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  overflow-x: hidden;
}

#app {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
select,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.boot-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  color: var(--muted);
}

.boot-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 14px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  font-size: 24px;
  line-height: 1;
  white-space: nowrap;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 58px;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.site-header-inner {
  max-width: 1180px;
  width: 100%;
  height: 100%;
  margin: 0 auto;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 750;
  letter-spacing: 0;
  min-width: 0;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #111827;
  color: #fff;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.main-nav a,
.header-actions button,
.header-actions a,
.header-actions .fish-button {
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 0 12px;
  color: #4b5563;
  border: 0;
  background: transparent;
}

.main-nav a.active,
.main-nav a:hover,
.header-actions button:hover,
.header-actions a:hover {
  background: #f1f5f9;
  color: #111827;
}

.fish-button {
  position: relative;
  background: #111827 !important;
  color: #fff !important;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font: inherit;
}

.fish-tooltip {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: max-content;
  max-width: min(320px, 92vw);
  padding: 10px 12px;
  background: #111827;
  color: #f9fafb;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.65;
  text-align: left;
  white-space: normal;
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.22);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease, visibility 0.15s ease;
  z-index: 200;
}

.fish-tooltip::before {
  content: "";
  position: absolute;
  bottom: 100%;
  right: 18px;
  border: 6px solid transparent;
  border-bottom-color: #111827;
}

.fish-button:hover .fish-tooltip,
.fish-button:focus-visible .fish-tooltip {
  opacity: 1;
  visibility: visible;
}

.header-actions .fish-button:hover {
  background: #111827 !important;
  color: #fff !important;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.page-wrap {
  max-width: 1180px;
  width: 100%;
  margin: 18px auto 0;
  padding: 0 18px;
}

.layout-grid {
  display: grid;
  grid-template-columns: 188px minmax(0, 1fr) 286px;
  gap: 18px;
  align-items: start;
  min-width: 0;
}

.layout-grid-two-col {
  grid-template-columns: 188px minmax(0, 1fr);
}

.page-document-wrap .page-document {
  border: 0;
  box-shadow: none;
  padding: 24px 28px;
  min-height: 620px;
}

.left-rail,
.right-rail {
  position: sticky;
  top: 76px;
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  min-width: 0;
}

.category-menu {
  padding: 8px;
  display: flex;
  flex-direction: column;
}

.category-menu-main {
  display: grid;
  gap: 2px;
}

.category-menu-footer {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  flex-shrink: 0;
}

.category-menu-label {
  padding: 0 10px 8px;
  font-size: 12px;
  color: #9ca3af;
}

.category-menu a,
.category-menu button {
  width: 100%;
  height: 38px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #4b5563;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  text-align: left;
}

.category-menu a.active,
.category-menu a:hover,
.category-menu button.active,
.category-menu button:hover,
.contact-nav-btn:hover {
  background: #f3f4f6;
  color: #111827;
}

.contact-nav-btn {
  cursor: pointer;
  font: inherit;
}

.contact-nav-btn .contact-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

.contact-backdrop {
  background: rgba(15, 23, 42, 0.55);
  z-index: 90;
}

.contact-modal {
  width: min(560px, 100%);
  background: #1f2937;
  color: #e5e7eb;
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  padding: 22px 24px 24px;
}

.contact-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 18px;
}

.contact-modal-header h2 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  color: #f9fafb;
}

.contact-modal-header p {
  margin: 8px 0 0;
  color: #9ca3af;
  font-size: 13px;
}

.contact-close-btn {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #9ca3af;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex: 0 0 auto;
}

.contact-close-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #f3f4f6;
}

.contact-close-btn svg {
  width: 18px;
  height: 18px;
}

.contact-block + .contact-block {
  margin-top: 22px;
}

.contact-block h3 {
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  color: #60a5fa;
  font-weight: 600;
}

.contact-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.contact-icon-accent {
  color: #60a5fa;
}

.contact-wechat-row {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.contact-qr-wrap {
  width: 132px;
  height: 132px;
  border-radius: 10px;
  background: #fff;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-sizing: border-box;
}

.contact-qr-image {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
  display: block;
}

.contact-qr-placeholder {
  width: 100%;
  height: 100%;
  color: #111827;
  display: grid;
  place-items: center;
}

.contact-qr-placeholder svg {
  width: 100%;
  height: 100%;
}

.contact-wechat-copy p {
  margin: 0;
  line-height: 1.7;
  color: #d1d5db;
  font-size: 14px;
}

.contact-wechat-copy p + p {
  margin-top: 10px;
}

.contact-wechat-id span {
  color: #60a5fa;
  font-weight: 600;
}

.contact-email {
  margin: 0;
  color: #d1d5db;
  font-size: 14px;
}

.contact-email a {
  color: #f3f4f6;
}

.contact-email a:hover {
  color: #60a5fa;
}

.content-panel {
  min-height: 680px;
  overflow: hidden;
  min-width: 0;
}

.source-tabs {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip,
.subtab,
.refresh-btn {
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #4b5563;
  padding: 0 11px;
  flex: 0 0 auto;
  white-space: nowrap;
}

.chip.active,
.subtab.active {
  color: #111827;
  background: #f1f5f9;
  border-color: #d1d5db;
  font-weight: 650;
}

.list-toolbar {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
}

.subtabs {
  display: flex;
  gap: 8px;
  overflow: auto;
}

.meta-line {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.news-list {
  padding: 0;
}

.news-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.news-item:hover {
  background: #fbfdff;
}

.news-item.no-image {
  grid-template-columns: 42px minmax(0, 1fr);
}

.rank {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #f3f4f6;
  color: #6b7280;
  display: grid;
  place-items: center;
  font-weight: 700;
}

.news-item:nth-child(1) .rank,
.news-item:nth-child(2) .rank,
.news-item:nth-child(3) .rank {
  background: #111827;
  color: #fff;
}

.news-title {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.news-desc {
  margin: 7px 0 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.news-meta {
  margin-top: 9px;
  display: flex;
  gap: 10px;
  color: #9ca3af;
  font-size: 12px;
}

.thumb {
  width: 82px;
  height: 58px;
  border-radius: 8px;
  object-fit: cover;
  background: #eef2f7;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.thumb.is-loaded {
  opacity: 1;
}

.skeleton {
  padding: 16px;
}

.skeleton-row {
  height: 66px;
  margin-bottom: 12px;
  border-radius: 10px;
  background: linear-gradient(90deg, #f1f5f9, #ffffff, #f1f5f9);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}

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

.empty-state {
  min-height: 320px;
  display: grid;
  place-items: center;
  color: var(--muted);
  text-align: center;
  padding: 40px;
}

.right-rail {
  display: grid;
  gap: 12px;
}

.side-card {
  padding: 14px;
}

.side-card h2,
.side-card h3 {
  margin: 0 0 10px;
  font-size: 15px;
}

.side-card p {
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
}

.side-card-actions {
  margin-top: 10px;
}

.sidebar-action-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0;
}

.tag {
  height: 24px;
  border-radius: 999px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  background: #f1f5f9;
  color: #475569;
}

.service-item {
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.service-item:first-of-type {
  border-top: 0;
}

.service-title {
  font-weight: 650;
}

.service-desc {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.footer {
  max-width: 1180px;
  margin: 26px auto 0;
  padding: 24px 18px 36px;
  color: #6b7280;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid var(--line);
}

.footer-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  background: rgba(15, 23, 42, 0.32);
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-backdrop.show {
  display: flex;
}

.theme-modal {
  width: min(720px, 100%);
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 22px;
}

.theme-modal header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.theme-card {
  display: grid;
  grid-template-columns: 86px 1fr auto;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  align-items: center;
}

.theme-icon {
  height: 64px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 32px;
  font-weight: 800;
}

.primary-btn,
.ghost-btn,
.icon-btn {
  border: 1px solid var(--line);
  border-radius: 8px;
  height: 34px;
  padding: 0 12px;
  background: #fff;
}

.primary-btn {
  background: #111827;
  color: #fff;
  border-color: #111827;
}

.page-document {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 32px;
  min-height: 620px;
}

.page-document h1 {
  margin: 0 0 8px;
  font-size: 28px;
}

.page-document section {
  margin-top: 26px;
}

.page-document p,
.page-document li {
  line-height: 1.8;
  color: #4b5563;
}

.settings-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 18px;
}

.settings-list,
.setting-source-grid {
  display: grid;
  gap: 10px;
}

.subscription-item,
.setting-source {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
}

.subscription-item {
  cursor: grab;
}

.toggle {
  width: 42px;
  height: 24px;
  border-radius: 999px;
  border: 0;
  background: #d1d5db;
  padding: 3px;
}

.toggle::after {
  content: "";
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.16s ease;
}

.toggle.on {
  background: var(--accent);
}

.toggle.on::after {
  transform: translateX(18px);
}

/* Excel theme */
.excel-page {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #fff;
  color: #1f2937;
  display: flex;
  flex-direction: column;
}

.excel-titlebar {
  height: 36px;
  flex: 0 0 36px;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  user-select: none;
}

.excel-title-left,
.excel-title-right {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 13px;
}

.excel-titlebar button {
  border: 0;
  background: transparent;
  color: inherit;
  height: 28px;
  padding: 0 10px;
}

.excel-titlebar button:hover {
  background: var(--accent-dark);
}

.excel-tabs {
  height: 40px;
  flex: 0 0 40px;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 0 8px;
  border-bottom: 1px solid #d1d5db;
  background: #fff;
}

.excel-tabs button {
  height: 30px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  padding: 0 10px;
}

.excel-tabs button.active {
  background: var(--accent);
  color: #fff;
}

.excel-ribbon {
  height: 88px;
  flex: 0 0 88px;
  display: grid;
  grid-template-columns: 1.2fr 1.5fr 1fr 1fr 1.2fr;
  background: #f3f2f1;
  border-bottom: 1px solid #d1d5db;
  overflow: hidden;
}

.ribbon-group {
  border-right: 1px solid #d1d5db;
  padding: 6px 8px;
}

.ribbon-label {
  font-size: 11px;
  color: #6b7280;
  margin-bottom: 5px;
}

.ribbon-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.ribbon-buttons button,
.ribbon-buttons select {
  height: 25px;
  border: 1px solid #d1d5db;
  background: #fff;
  border-radius: 3px;
  padding: 0 7px;
  font-size: 12px;
}

.formula-bar {
  height: 26px;
  flex: 0 0 26px;
  display: grid;
  grid-template-columns: 58px 36px 1fr;
  border-bottom: 1px solid #d1d5db;
  background: #fff;
  font-size: 12px;
}

.formula-bar div,
.formula-bar input {
  border-right: 1px solid #d1d5db;
  display: flex;
  align-items: center;
  justify-content: center;
}

.formula-bar input {
  border: 0;
  justify-content: flex-start;
  padding: 0 8px;
  outline: none;
}

.excel-workspace {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: 186px minmax(0, 1fr);
  background: #fff;
}

.excel-workspace.side-collapsed {
  grid-template-columns: 28px minmax(0, 1fr);
}

.excel-side {
  position: relative;
  border-right: 1px solid #e5e7eb;
  background: #fff;
  overflow: hidden;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.excel-side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 8px 8px 6px;
  border-bottom: 1px solid #f0f0f0;
  flex-shrink: 0;
}

.excel-side-head h2 {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-size: 11px;
  font-weight: 600;
  color: #9ca3af;
}

.excel-side-toggle {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  border: 1px solid transparent;
  border-radius: 2px;
  background: transparent;
  color: #9ca3af;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.excel-side-toggle:hover {
  background: #f3f4f6;
  border-color: #e5e7eb;
  color: #6b7280;
}

.excel-side-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.excel-workspace.side-collapsed .excel-side-body {
  display: none;
}

.excel-workspace.side-collapsed .excel-side-head {
  justify-content: center;
  padding: 8px 4px;
  border-bottom: 0;
}

.excel-workspace.side-collapsed .excel-side-head h2 {
  display: none;
}

.excel-side h2,
.excel-side-section {
  font-size: 11px;
  font-weight: 600;
  color: #9ca3af;
  margin: 10px 10px 6px;
}

.excel-side-head h2 {
  margin: 0;
}

.excel-side button {
  width: calc(100% - 16px);
  margin: 2px 8px;
  height: 28px;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 2px;
  text-align: left;
  padding: 0 8px;
  font-size: 12px;
  color: #6b7280;
}

.excel-side button:hover {
  background: #f9fafb;
  color: #4b5563;
}

.excel-side button.active {
  background: #f3f4f6;
  border-color: #e5e7eb;
  color: #374151;
  font-weight: 500;
}

.excel-grid-wrap {
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: auto;
  position: relative;
  display: flex;
  flex-direction: column;
  background-image:
    linear-gradient(#e5e7eb 1px, transparent 1px),
    linear-gradient(90deg, #e5e7eb 1px, transparent 1px);
  background-size: 120px 32px;
}

.excel-controls {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid #e5e7eb;
}

.excel-filter {
  position: relative;
}

.excel-filter-trigger {
  height: 28px;
  border: 1px solid transparent;
  border-radius: 2px;
  background: transparent;
  padding: 0 8px;
  font-size: 12px;
  color: #6b7280;
  cursor: pointer;
}

.excel-filter-trigger:hover {
  border-color: #d1d5db;
  background: #fff;
  color: #374151;
}

.excel-filter-menu {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  min-width: 148px;
  max-width: 240px;
  border: 1px solid #d1d5db;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
  z-index: 6;
  padding: 4px 0;
}

.excel-filter-option {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 6px 12px;
  font-size: 12px;
  color: #374151;
  cursor: pointer;
}

.excel-filter-option:hover,
.excel-filter-option.active {
  background: #f3f4f6;
}

.excel-filter-option.active {
  color: #111827;
  font-weight: 500;
}

.excel-control-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.excel-controls select,
.excel-controls button,
.excel-controls a {
  height: 28px;
  border: 1px solid #d1d5db;
  background: #fff;
  border-radius: 2px;
  padding: 0 8px;
  font-size: 12px;
  color: #374151;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  box-sizing: border-box;
}

.excel-controls a:hover {
  background: #f9fafb;
  color: #374151;
}

.excel-table-area {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.excel-grid-wrap.viewing-article > .excel-controls,
.excel-grid-wrap.viewing-article .excel-table-area > .excel-table {
  display: none;
}

.excel-article-view {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
}

.excel-article-view[hidden] {
  display: none !important;
}

.excel-article-toolbar {
  flex: 0 0 auto;
  position: static;
  justify-content: flex-end;
}

.excel-article-toolbar.toolbar-has-hint {
  justify-content: space-between;
}

.excel-article-hint {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-size: 12px;
  line-height: 1.4;
  color: #6b7280;
  padding-right: 12px;
}

.excel-article-hint[hidden] {
  display: none !important;
}

.excel-article-content {
  flex: 1;
  min-height: 0;
  overflow: auto;
  background: rgba(255, 255, 255, 0.78);
  padding: 0;
  background-image:
    linear-gradient(#e5e7eb 1px, transparent 1px),
    linear-gradient(90deg, #e5e7eb 1px, transparent 1px);
  background-size: 120px 32px;
}

.excel-text-sheet {
  width: max(960px, 100%);
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.78);
}

.excel-table.excel-text-sheet th,
.excel-table.excel-text-sheet td {
  white-space: normal;
  word-break: break-word;
  overflow: visible;
  text-overflow: clip;
  vertical-align: top;
  height: auto;
  min-height: 32px;
  line-height: 1.45;
  padding: 4px 8px;
}

.excel-table.excel-text-sheet td:nth-child(2) {
  text-align: left;
}

.excel-text-row-head td {
  background: #f3f4f6;
  font-weight: 600;
  color: #374151;
}

.excel-text-row:hover td {
  background: #eef6f0;
}

.excel-text-row-head:hover td {
  background: #eef6f0;
}

.excel-article-content[hidden] {
  display: none !important;
}

.excel-article-frame {
  flex: 1;
  width: 100%;
  min-height: 0;
  border: 0;
  background: #fff;
}

.excel-article-frame[hidden] {
  display: none !important;
}

.excel-article-summary-meta {
  margin: 0 0 16px;
  font-size: 12px;
  color: #6b7280;
}

.excel-article-summary-body p {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.85;
  color: #374151;
  white-space: pre-wrap;
  word-break: break-word;
}

.excel-article-document {
  max-width: 860px;
  margin: 0 auto;
}

.excel-article-heading {
  margin: 0 0 14px;
  font-size: 18px;
  line-height: 1.45;
  font-weight: 650;
  color: #111827;
}

.excel-article-document p {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.85;
  color: #374151;
  white-space: pre-wrap;
  word-break: break-word;
}

.excel-article-plain {
  margin: 0;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.85;
  color: #374151;
  white-space: pre-wrap;
  word-break: break-word;
}

.excel-article-status {
  margin: 0;
  padding: 24px 8px;
  text-align: center;
  font-size: 13px;
  color: #6b7280;
}

.excel-article-error p {
  margin: 0 0 8px;
}

.excel-table {
  width: max(960px, 100%);
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.78);
}

.excel-table th,
.excel-table td {
  border: 1px solid #d1d5db;
  height: 32px;
  padding: 0 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13px;
}

.excel-table th {
  background: #f3f4f6;
  color: #374151;
  font-weight: 600;
}

.excel-table tr:hover td {
  background: #eef6f0;
}

.excel-statusbar {
  height: 22px;
  flex: 0 0 22px;
  border-top: 1px solid #d1d5db;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  font-size: 11px;
}

.excel-help-modal {
  width: min(420px, 100%);
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.12);
  padding: 22px 24px 18px;
}

.excel-help-title {
  margin: 0 0 14px;
  font-size: 16px;
  font-weight: 700;
  color: #111827;
}

.excel-help-list {
  margin: 0;
  padding-left: 18px;
  color: #374151;
  line-height: 1.85;
  font-size: 14px;
}

.excel-help-list li + li {
  margin-top: 4px;
}

.excel-help-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}

.excel-help-confirm {
  height: 32px;
  padding: 0 14px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  background: #fff;
  color: #374151;
  font-size: 13px;
  cursor: pointer;
}

.excel-help-confirm:hover {
  background: #f9fafb;
}

.boss-hidden .excel-side,
.boss-hidden .excel-controls,
.boss-hidden .excel-table-area {
  visibility: hidden;
}

.boss-hidden .excel-grid-wrap::after {
  content: "";
  position: absolute;
  top: 90px;
  left: 80px;
  font-size: 18px;
  font-weight: 650;
  color: #374151;
}

@media (max-width: 980px) {
  .layout-grid {
    grid-template-columns: 1fr;
    max-width: 100%;
  }

  .left-rail,
  .right-rail {
    position: static;
  }

  .category-menu {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    overflow: visible;
    min-height: 0;
  }

  .category-menu-main {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  .category-menu-footer {
    margin-top: 10px;
    padding-top: 10px;
    padding-left: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
    display: block;
  }

  .category-menu-label {
    display: block;
  }

  .layout-grid-two-col {
    grid-template-columns: 1fr;
  }

  .contact-wechat-row {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .contact-wechat-copy {
    text-align: center;
  }

  .source-tabs,
  .subtabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    max-width: 100%;
  }

  .list-toolbar {
    min-width: 0;
  }

  .category-menu a,
  .category-menu button {
    width: auto;
    flex: 0 0 auto;
  }

  .main-nav {
    display: none;
  }

  .header-actions a {
    display: none;
  }

  .fish-button {
    padding: 0 10px !important;
    white-space: nowrap;
  }

  .news-item {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .thumb {
    display: none;
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }

  .footer {
    flex-direction: column;
  }

  .excel-ribbon {
    grid-template-columns: repeat(3, minmax(160px, 1fr));
    overflow-x: auto;
  }

  .excel-workspace {
    grid-template-columns: 132px minmax(0, 1fr);
  }
}

/* Hacker News inspired efficiency UI for the normal site shell only. */
.app-shell {
  --bg: #f6f6ef;
  --card: #f6f6ef;
  --text: #000000;
  --muted: #828282;
  --line: transparent;
  --primary: #000000;
  --accent: #ff6600;
  width: min(1128px, 85vw);
  min-height: calc(100vh - 16px);
  margin: 8px auto;
  background: #f6f6ef;
  color: #000;
  overflow: visible;
  font-family: Verdana, Geneva, sans-serif;
  font-size: 10pt;
}

body:has(.app-shell) {
  background: #ffffff;
}

.app-shell .site-header {
  position: static;
  height: auto;
  min-height: 24px;
  background: #ff6600;
  border-bottom: 0;
  backdrop-filter: none;
}

.app-shell .site-header-inner {
  max-width: none;
  height: auto;
  min-height: 24px;
  padding: 2px;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
}

.app-shell .brand {
  gap: 4px;
  font-weight: 700;
  letter-spacing: 0;
  color: #000;
  flex: 0 0 auto;
}

.app-shell .brand:hover {
  color: #000;
}

.app-shell .brand-mark {
  width: 18px;
  height: 18px;
  border: 1px solid #fff;
  border-radius: 0;
  background: #0f766e;
  color: #fff;
  font-size: 13px;
  line-height: 1;
}

.app-shell .main-nav {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.app-shell .main-nav::-webkit-scrollbar {
  display: none;
}

.app-shell .main-nav a,
.app-shell .header-actions a,
.app-shell .header-actions button {
  height: auto;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #000;
  font-size: 10pt;
  line-height: 1.2;
}

.app-shell .main-nav a + a::before {
  content: "|";
  padding: 0 4px;
  color: #000;
  font-weight: 400;
}

.app-shell .main-nav a.active,
.app-shell .main-nav a:hover,
.app-shell .header-actions a.active,
.app-shell .header-actions a:hover,
.app-shell .header-actions button:hover {
  background: transparent;
  color: #000;
  text-decoration: underline;
}

.app-shell .header-actions {
  margin-left: auto;
  gap: 6px;
}

.app-shell .fish-button {
  background: transparent !important;
  color: #000 !important;
  box-shadow: none;
  font: inherit;
}

.app-shell .fish-tooltip {
  font-family: Verdana, Geneva, sans-serif;
}

.app-shell .page-wrap {
  max-width: none;
  margin: 0;
  padding: 0;
}

.app-shell .hn-layout {
  width: 100%;
}

.app-shell .panel,
.app-shell .content-panel {
  min-height: 0;
  overflow: visible;
  background: #f6f6ef;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.app-shell .source-tabs,
.app-shell .list-toolbar {
  height: auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  padding: 8px 6px 0 42px;
  border-bottom: 0;
  color: #000;
}

.app-shell .list-toolbar {
  padding-top: 3px;
  padding-bottom: 6px;
}

.app-shell .source-tabs::before {
  content: "sources:";
  margin-right: 6px;
  color: #828282;
}

.app-shell .subtabs::before {
  content: "tabs:";
  margin-right: 6px;
  color: #828282;
}

.app-shell .source-tabs,
.app-shell .subtabs {
  flex-wrap: wrap;
  overflow: visible;
}

.app-shell .chip,
.app-shell .subtab,
.app-shell .refresh-btn {
  height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #000;
  font-size: 10pt;
  line-height: 1.2;
}

.app-shell .chip + .chip::before,
.app-shell .subtab + .subtab::before {
  content: "|";
  padding: 0 4px;
  color: #828282;
  font-weight: 400;
}

.app-shell .chip.active,
.app-shell .subtab.active {
  background: transparent;
  border: 0;
  color: #000;
  font-weight: 700;
  text-decoration: underline;
}

.app-shell .meta-line {
  margin-left: auto;
  gap: 6px;
  color: #828282;
  font-size: 8pt;
}

.app-shell .refresh-btn:hover {
  text-decoration: underline;
}

.app-shell .news-list {
  padding: 0 0 12px;
}

.app-shell .news-item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 4px;
  padding: 2px 6px;
  border: 0;
  background: transparent;
}

.app-shell .news-item:hover {
  background: transparent;
}

.app-shell .rank {
  width: auto;
  height: auto;
  display: block;
  padding: 0;
  border-radius: 0;
  background: transparent !important;
  color: #828282 !important;
  text-align: right;
  font-size: 10pt;
  font-weight: 400;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
}

.app-shell .rank::after {
  content: ".";
}

.app-shell .news-main {
  min-width: 0;
}

.app-shell .news-title {
  margin: 0;
  font-size: 10pt;
  line-height: 1.25;
  font-weight: 400;
  overflow-wrap: break-word;
}

.app-shell .news-title a {
  color: #000;
}

.app-shell .news-title a:hover {
  text-decoration: underline;
}

.app-shell .news-site {
  color: #828282;
  font-size: 8pt;
}

.app-shell .news-desc {
  display: none;
}

.app-shell .news-meta {
  margin: 1px 0 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  color: #828282;
  font-size: 7pt;
  line-height: 1.35;
}

.app-shell .news-meta span + span::before {
  content: "|";
  padding: 0 4px;
  color: #828282;
}

.app-shell .thumb {
  display: none !important;
}

.app-shell .empty-state {
  min-height: 180px;
  color: #828282;
}

.app-shell .footer {
  max-width: none;
  margin: 14px 0 0;
  padding: 18px 6px 28px;
  display: block;
  text-align: center;
  color: #828282;
  border-top: 2px solid #ff6600;
  font-size: 8pt;
}

.app-shell .footer > div {
  display: none;
}

.app-shell .footer-links {
  justify-content: center;
  gap: 0;
}

.app-shell .footer-links a + a::before {
  content: "|";
  padding: 0 6px;
  color: #828282;
}

.app-shell .page-document {
  min-height: 0;
  padding: 14px 42px 28px;
  border: 0;
  border-radius: 0;
  background: #f6f6ef;
  box-shadow: none;
}

.app-shell .page-document h1 {
  font-size: 13pt;
}

.app-shell .page-document p,
.app-shell .page-document li {
  color: #000;
  line-height: 1.5;
}

.app-shell .settings-grid {
  grid-template-columns: 1fr;
}

.app-shell .subscription-item,
.app-shell .setting-source {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 3px 0;
}

@media (max-width: 980px) {
  .app-shell {
    width: 100%;
    min-height: 100vh;
    margin: 0;
  }

  .app-shell .site-header-inner {
    flex-wrap: wrap;
  }

  .app-shell .main-nav {
    order: 3;
    flex-basis: 100%;
  }

  .app-shell .source-tabs,
  .app-shell .list-toolbar {
    padding-left: 6px;
    align-items: flex-start;
  }

  .app-shell .meta-line {
    margin-left: 0;
  }

  .app-shell .news-item {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .app-shell .header-actions a {
    display: inline-flex;
  }
}
