/* Shared Editorial design system. Loaded after legacy page styles. */
:root {
  color-scheme: light;
  --editorial-paper: #F9F8F6;
  --editorial-ink: #1C1C1C;
  --editorial-muted: rgba(28, 28, 28, .60);
  --editorial-faint: rgba(28, 28, 28, .40);
  --editorial-line: rgba(28, 28, 28, .10);
  --editorial-line-strong: rgba(28, 28, 28, .40);
  --editorial-card: #F9F8F6;
  --editorial-accent: #1C1C1C;
}

html, body {
  min-height: 100%;
  background: var(--editorial-paper) !important;
  color: var(--editorial-ink) !important;
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif !important;
}

body {
  background-image: none !important;
  background-attachment: initial !important;
  animation: none !important;
}

body::before, body::after { display: none !important; content: none !important; }

body * {
  box-shadow: none !important;
  text-shadow: none !important;
}

/* Keep illustrations and chart fills intact; neutralize only shared page surfaces below. */

h1, h2, h3, h4, .portal-hero-slide h2, .portal-card__copy h2,
.summary-panel h2, .favorite-card h2, .detail-head h2, .history-head h2 {
  color: var(--editorial-ink) !important;
  font-family: Georgia, "Songti SC", "STSong", serif !important;
  font-weight: 400 !important;
  letter-spacing: -.045em !important;
}

p, li, td, dd, .description, .portal-card__copy > p:not(.eyebrow) {
  line-height: 1.75;
}

.eyebrow, .micro, .label, .portal-card__state, .portal-hero-role,
.workspace-status-label, .metric-label, .table-caption {
  color: var(--editorial-faint) !important;
  font-size: 11px !important;
  font-weight: 400 !important;
  letter-spacing: .18em !important;
  text-transform: uppercase;
}

body, main, section, nav, header, footer, article, aside, form, fieldset,
.topbar, .portal-topbar, .portal-hero, .portal-card, .summary-panel,
.app-card, .task, .panel, .detail, .detail-card, .history, .metric-card,
.stat-card, .favorite-card, .login-panel, .login-card, .filter-shell,
.filter-panel, .filter-grid, .filter-footer, .search-result-card,
.table-wrap, .toolbar, .global-search, .workspace-status, .empty,
.summary-item, .account-setting, .collection-card, .collection-option,
.segmented, .hero, .mark, .shell, .reader, .light-shell {
  color: var(--editorial-ink) !important;
  border-color: var(--editorial-line) !important;
  border-radius: 0 !important;
  background-color: var(--editorial-paper) !important;
  background-image: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

section, nav, .app-card, .topbar, .task, .panel, .detail, .detail-card,
.history, .metric-card, .stat-card, .favorite-card, .portal-card,
.login-panel, .login-card, .filter-shell, .filter-panel, .summary-panel,
.search-result-card, .collection-card, .collection-option, .account-setting {
  border: 1px solid var(--editorial-line) !important;
}

.fox-reference-home, .fox-home-page, .fox-home-stage, .fox-home-header, .fox-home-nav,
.fox-home-hero, .fox-home-collections, .fox-app-card, .fox-manage-card,
.fox-home-recommendations, .fox-home-management, .fox-home-brand, .fox-home-status,
.fox-home-hero::before, .fox-home-hero::after, .fox-home-card::before,
.fox-home-card::after, .portal-hero::before, .portal-hero::after,
.portal-card::before, .portal-card::after, .summary-panel::before,
.summary-panel::after, .workspace-status-art, .botanical-credit,
.light-head::after, .light-shell .reader::after {
  background-image: none !important;
}

.fox-reference-home, .fox-home-page, .fox-home-stage, .fox-home-header, .fox-home-nav,
.fox-home-hero, .fox-home-collections, .fox-app-card, .fox-manage-card, .portal-hero,
.portal-card, .summary-panel, .topbar, .portal-topbar, .portal-tool,
.portal-brand-mark, .brand-mark, .mark, .login-card, .login-card .identity-mark {
  color: var(--editorial-ink) !important;
  background-color: var(--editorial-paper) !important;
  border-color: var(--editorial-line) !important;
}

.fox-home-collections {
  position: relative !important;
  inset: auto !important;
  min-height: 0 !important;
  padding: 32px clamp(24px, 6vw, 96px) !important;
  border-top: 1px solid var(--editorial-line) !important;
}

.fox-home-stage { min-height: 0 !important; overflow: visible !important; }
.fox-home-header { position: relative !important; top: auto !important; left: auto !important; width: 100% !important; min-height: 72px !important; padding: 12px 6vw !important; transform: none !important; border-bottom: 1px solid var(--editorial-line) !important; }
.fox-home-hero { min-height: 460px !important; padding: 100px 8vw 80px !important; }
.fox-home-slide h2 { font-size: clamp(42px, 7vw, 96px) !important; }
.fox-home-kicker, .fox-home-description, .fox-home-visual-caption { color: var(--editorial-muted) !important; }
.fox-home-open, .portal-hero-slide a { min-height: 40px !important; padding: 10px 20px !important; border: 1px solid var(--editorial-ink) !important; color: var(--editorial-paper) !important; background: var(--editorial-ink) !important; }
.fox-home-visual, .fox-home-flower, .fox-home-visual-caption, .fox-app-card-art, .fox-manage-card-art { display: none !important; }
.fox-home-collections { grid-template-columns: minmax(0, 1fr) !important; gap: 40px !important; }
.fox-home-recommendations > header::before, .fox-home-management > header::before { display: none !important; }
.fox-home-recommendations > header h2, .fox-home-management > header h2 { color: var(--editorial-ink) !important; font: 400 28px Georgia, "Songti SC", serif !important; }
.fox-app-card, .fox-manage-card { min-height: 0 !important; padding: 22px !important; color: var(--editorial-ink) !important; background: var(--editorial-paper) !important; border: 1px solid var(--editorial-line) !important; }
.fox-app-card-copy, .fox-app-card-copy strong, .fox-app-card-copy small, .fox-app-card-copy > span, .fox-app-card-arrow,
.fox-manage-card > span:not(.fox-manage-card-art), .fox-manage-card strong, .fox-manage-card small, .fox-manage-card b { color: var(--editorial-ink) !important; }
.fox-home-card, .portal-card { min-height: 0 !important; }
.portal-hero { animation: none !important; }
.portal-card:hover, .portal-card:hover::before, .portal-tool:hover {
  transform: none !important;
}

a, .topbar a, .topbar .breadcrumb a, .portal-card__meta,
.portal-hero a, footer a, .quiet-button {
  color: var(--editorial-ink) !important;
  text-decoration-color: var(--editorial-faint) !important;
}

a:hover, .topbar a:hover, .portal-card:hover .portal-card__copy h2 {
  color: var(--editorial-ink) !important;
}

button, .button, .btn, .primary, .next-button, .wechat-button,
.email-actions button, .summary-icon, .lock-icon, .icon-action, .add,
.save, .approve, .confirm, .complete {
  min-height: 40px;
  padding: 10px 20px !important;
  border: 1px solid var(--editorial-ink) !important;
  color: var(--editorial-paper) !important;
  background: var(--editorial-ink) !important;
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  letter-spacing: .04em !important;
  transition: color .2s ease, background-color .2s ease, border-color .2s ease !important;
}
button, input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), select, textarea {
  border-radius: 0 !important;
}

button:hover, .button:hover, .btn:hover, .primary:hover,
.next-button:hover, .wechat-button:hover, .email-actions button:hover,
.portal-tool:hover, .icon-button:hover {
  color: var(--editorial-ink) !important;
  background: var(--editorial-paper) !important;
  border-color: var(--editorial-ink) !important;
}

button:disabled, button[disabled], .wechat-button[aria-disabled="true"] {
  color: var(--editorial-muted) !important;
  background: var(--editorial-paper) !important;
  border-color: var(--editorial-line) !important;
  opacity: .7;
}

.ghost, .ghost-button, .reviewer-toggle, .email-secondary,
.close, .icon-button, .quiet-button, .portal-tool, .file-picker {
  color: var(--editorial-ink) !important;
  background: transparent !important;
  border: 1px solid var(--editorial-line) !important;
}

input, select, textarea, .reviewer-form input, .search-field input {
  min-height: 42px;
  padding: 10px 2px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--editorial-line-strong) !important;
  color: var(--editorial-ink) !important;
  background: transparent !important;
  font-size: 14px !important;
  outline: none !important;
  transition: border-color .2s ease !important;
}

input:focus, select:focus, textarea:focus,
.reviewer-form input:focus, .search-field input:focus {
  border-bottom-color: var(--editorial-ink) !important;
  outline: none !important;
}

input:focus-visible, select:focus-visible, textarea:focus-visible,
button:focus-visible, a:focus-visible, summary:focus-visible,
.topbar-icon:focus-visible, .portal-tool:focus-visible {
  outline: 2px solid var(--editorial-ink) !important;
  outline-offset: 3px !important;
}

input::placeholder, textarea::placeholder { color: var(--editorial-faint) !important; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--editorial-ink) !important; }

th {
  color: var(--editorial-muted) !important;
  background: var(--editorial-paper) !important;
  border-bottom: 1px solid var(--editorial-line-strong) !important;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .12em;
  text-transform: uppercase;
}

td, tbody tr, tbody tr:nth-child(even), tbody tr:hover {
  color: var(--editorial-ink) !important;
  background: var(--editorial-paper) !important;
  border-color: var(--editorial-line) !important;
}

.muted, .quiet, .subtitle, .hint, .portal-card__copy > p:not(.eyebrow),
.portal-hero p, .light-foot, .privacy, .description, .status {
  color: var(--editorial-muted) !important;
}

.error, .danger, .danger-button, .status-line:before,
.stats strong, .profile-meta text, .avatar, .record {
  color: var(--editorial-muted) !important;
  background-color: transparent !important;
  border-color: var(--editorial-line) !important;
}

.pagination a, .topbar-nav a, nav a, .tab, .portal-home-nav a {
  color: var(--editorial-muted) !important;
  background: transparent !important;
  border-bottom: 1px solid transparent !important;
}

.pagination a:hover, .topbar-nav a:hover, nav a:hover,
.topbar-nav a.active, nav a[aria-current="page"], .tab.active {
  color: var(--editorial-ink) !important;
  border-bottom-color: var(--editorial-ink) !important;
}

img[alt*="flower" i], img[alt*="botanical" i],
.botanical-mark, .identity-mark { display: none !important; }

@media (max-width: 760px) {
  .fox-home-collections { padding: 24px !important; }
  .fox-home-hero { min-height: 420px !important; }
  .portal-card { padding: 20px !important; }
  .portal-card__copy { padding-top: 0 !important; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}

/* FOOD is a separate route with a wide, data-heavy catalogue table. */
body.product-page {
  min-height: 100vh;
  padding: clamp(12px, 3vw, 36px);
  background: var(--editorial-paper) !important;
  animation: none !important;
}
body.product-page::before, body.product-page::after { display: none !important; }
body.product-page > main {
  display: block !important;
  width: min(100%, 1540px);
  margin: 0 auto;
  padding: clamp(18px, 3vw, 40px);
  border: 0 !important;
  background: var(--editorial-paper) !important;
  backdrop-filter: none !important;
}
body.product-page .title-row {
  align-items: flex-start;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--editorial-line-strong);
}
body.product-page .title-row h1 {
  font-size: clamp(34px, 4vw, 52px);
  letter-spacing: -.04em;
}
body.product-page .toolbar { gap: 10px; margin: 22px 0 14px; }
body.product-page .search-field { flex-basis: min(520px, 100%); }
body.product-page .search-field input { padding-left: 46px !important; }
body.product-page .file-picker { border-color: var(--editorial-line-strong) !important; }
body.product-page .table-wrap, body.product-page .history-list, body.product-page .appearances {
  max-width: 100%;
  overflow: auto;
  border-color: var(--editorial-line) !important;
  background: var(--editorial-paper) !important;
}
body.product-page .detail, body.product-page .history {
  background: var(--editorial-paper) !important;
  border-color: var(--editorial-line) !important;
}
body.product-page .detail-card { background: var(--editorial-paper) !important; }
body.product-page .image-viewer { background: rgba(28, 28, 28, .88) !important; }
body.product-page .image-viewer img { background: #fffefa; }

.wxbox-icon-tooltip {
  position: fixed;
  z-index: 10000;
  max-width: min(280px, calc(100vw - 16px));
  padding: 7px 10px;
  border: 1px solid rgba(255,255,255,.18);
  color: #fffefa;
  background: #24231f;
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  pointer-events: none;
}
.wxbox-icon-tooltip[hidden] { display: none !important; }
button:has(svg)[aria-label], a:has(svg)[aria-label] {
  position: relative;
  min-width: 40px;
  min-height: 40px;
}
button:has(svg)[aria-label] { padding: 0 !important; }

.fox-home-dots { display: flex; align-items: center; gap: 2px; }
.fox-home-dots [data-slide-to] {
  display: grid !important;
  place-items: center;
  width: 44px !important;
  min-width: 44px !important;
  height: 44px !important;
  min-height: 44px !important;
  padding: 0 !important;
  border-color: transparent !important;
  border-radius: 999px !important;
  color: transparent !important;
  background: transparent !important;
  box-shadow: none !important;
}
.fox-home-dots [data-slide-to]::before {
  width: 8px;
  height: 8px;
  border: 1px solid var(--editorial-ink);
  border-radius: 50%;
  background: var(--editorial-paper);
  content: "";
  transition: width .18s ease, background-color .18s ease;
}
.fox-home-dots [data-slide-to][aria-pressed="true"]::before {
  width: 22px;
  border-color: var(--editorial-ink);
  border-radius: 999px;
  background: var(--editorial-ink);
}
.fox-home-dots [data-slide-to]:hover { background: transparent !important; }

@media (max-width: 760px) {
  body.product-page { padding: 8px; }
  body.product-page > main { padding: 18px 14px 28px; }
  body.product-page .title-row { align-items: center; }
  body.product-page .toolbar > button { flex: 1 1 120px; }
  body.product-page .file-picker { flex: 1 1 140px; justify-content: center; }
  body.product-page .table-wrap table { min-width: 1100px; }
  body.product-page .history-list table { min-width: 850px; }
}

/* Search app editorial overrides. */
body:has(.workspace) { color-scheme: light; color: var(--editorial-ink); background: var(--editorial-paper); --blue: var(--editorial-ink); --ink: var(--editorial-ink); --muted: var(--editorial-muted); --line: var(--editorial-line); --paper: var(--editorial-paper); }
.workspace:has(.sidebar) { color: var(--editorial-ink); }
.sidebar,
.hero,
.feature,
.table-panel,
.banner,
.resource-row,
.gallery-card,
.empty-view { color: var(--editorial-ink); background: var(--editorial-paper); border-radius: 0; box-shadow: none; }
.sidebar { border-right: 1px solid var(--editorial-line); }
.sidebar-flower { display: none !important; }
.hero > img,
.feature img,
.resource-row img,
.gallery-card img,
.empty-view img,
.banner img { filter: grayscale(1); mix-blend-mode: normal; }
.brand span, .kicker, .feature .number, .content-row .meta,
.resource-row .meta, .page-heading > span, .menu-count { color: var(--editorial-muted); }
.hero h2, .feature strong, .resource-row h3, .gallery-copy h2,
.page-heading h1, .section-heading, .sidebar-title h2 { font-family: Georgia, "Songti SC", "STSong", serif; font-weight: 400; letter-spacing: -.04em; }
.app-link[aria-current=page],
.menu-link[aria-current=page],
.menu-link:hover,
.app-link:hover,
.feature:hover { color: var(--editorial-ink); background: transparent; }
.app-link[aria-current=page],
.menu-link[aria-current=page] { border-color: var(--editorial-ink); }
.page-heading { border-color: var(--editorial-ink); }
.section-heading { border-color: var(--editorial-ink); }
.feature,
.gallery-card { border-top-color: var(--editorial-ink); }
.banner,
.gallery-card > header { color: var(--editorial-ink); background: transparent; border-bottom: 1px solid var(--editorial-line); }
.content-row,
.list-header { border-color: var(--editorial-line); }
.square,
.chapter-index span,
.menu-icon { background: transparent; border-color: var(--editorial-muted); }
.chapter-index span:first-child,
.menu-link[aria-current=page] .menu-icon { background: var(--editorial-ink); border-color: var(--editorial-ink); }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--editorial-ink); outline-offset: 3px; }

.applications a, main a, .menu-link { position: relative; }
.applications a::after, main a::after, .menu-link::after {
  position: absolute; right: 0; bottom: 2px; left: 0; height: 1px;
  content: ""; background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform 500ms ease;
}
.applications a:hover::after, main a:hover::after, .menu-link:hover::after { transform: scaleX(1); transform-origin: left; }
.banner .kicker { color: var(--editorial-muted); }
body:has(.login-card) .login-card > .email-panel {
  margin-top: 18px !important;
  padding: 18px 0 0 !important;
  border: 0 !important;
  border-top: 1px solid var(--editorial-line) !important;
  background: transparent !important;
}

/* Keep the workspace dashboard flat, legible, and safe on narrow screens. */
.summary-panel::before, .summary-panel::after { display: none !important; }
.summary-panel h2 { padding-left: 0 !important; }
.filter-shell { padding: 0 !important; border: 0 !important; background: transparent !important; }
.global-search {
  display: grid !important; grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 12px !important; padding: 0 !important; border: 0 !important;
  background: transparent !important;
}
.global-search > span { color: var(--editorial-faint) !important; font-size: 11px !important; font-weight: 400 !important; letter-spacing: .18em !important; text-transform: uppercase; }
.filter-grid label {
  padding: 8px 0 !important; border: 0 !important;
  border-bottom: 1px solid var(--editorial-line-strong) !important;
  background: transparent !important; font-weight: 400 !important;
}
.filter-grid label > span { color: var(--editorial-faint) !important; font-weight: 400 !important; letter-spacing: .14em !important; text-transform: uppercase; }
.filter-grid input, .filter-grid select { color: var(--editorial-ink) !important; font-weight: 400 !important; }
.filter-footer { padding: 16px 0 !important; border-top: 1px solid var(--editorial-line) !important; color: var(--editorial-muted) !important; }
.filter-empty { border-style: solid !important; border-color: var(--editorial-line) !important; color: var(--editorial-muted) !important; }
.workspace-status {
  position: static !important; width: min(100%, 400px) !important;
  margin: 24px auto !important; grid-template-columns: 0 minmax(0, 1fr) 34px !important;
  min-height: 0 !important; padding: 12px 0 !important;
  border: 0 !important; border-top: 1px solid var(--editorial-line) !important;
  background: transparent !important;
}
.workspace-status-art { display: none !important; }
.workspace-status-copy strong { color: var(--editorial-ink) !important; font-family: Georgia, "Songti SC", serif; font-weight: 400 !important; }
.workspace-status-copy span { color: var(--editorial-muted) !important; }
.workspace-status-toggle { border: 1px solid var(--editorial-line-strong) !important; color: var(--editorial-ink) !important; background: transparent !important; }
@media (max-width: 760px) {
  .workspace-status { left: auto !important; bottom: auto !important; grid-template-columns: 0 minmax(0, 1fr) 34px !important; }
}
