:root {
  font-family: "Inter", "Microsoft YaHei UI", "PingFang SC", system-ui, sans-serif;
  color: #0f172a;
  background: #f6f8fb;
  --blue: #2563eb;
  --deep-blue: #1d4ed8;
  --pale: #eff6ff;
  --muted: #64748b;
  --text: #334155;
  --line: #e2e8f0;
  --white: #fff;
  --radius: 12px;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .58; }
a { color: inherit; text-decoration: none; }
p, h1, h2, h3 { margin: 0; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}
[hidden] { display: none !important; }
.icon { display: inline-block; flex: 0 0 auto; vertical-align: middle; width: 19px; height: 19px; }
.wrap { width: min(1280px, calc(100% - 64px)); margin-inline: auto; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 9px 15px; border: 1px solid #cbd5e1; border-radius: 8px; background: white; color: var(--text); font-size: 14px; font-weight: 650; }
.button:hover { color: var(--blue); border-color: var(--blue); }
.button.primary { background: var(--blue); color: white; border-color: var(--blue); }
.button.primary:hover { background: var(--deep-blue); border-color: var(--deep-blue); }
.button.subtle { background: var(--pale); color: var(--deep-blue); border-color: transparent; }
.button.danger { color: #b91c1c; }
.icon-button { display: inline-grid; place-items: center; border: 1px solid transparent; border-radius: 8px; color: var(--muted); background: transparent; width: 37px; height: 37px; padding: 0; }
.icon-button:hover, .icon-button[aria-pressed=true] { color: var(--blue); background: var(--pale); }
.text-button { color: var(--deep-blue); background: transparent; border: 0; padding: 5px 0; font-weight: 600; }
.muted { color: var(--muted); }
.surface { border: 1px solid var(--line); background: white; border-radius: var(--radius); }
.top { background: white; border-bottom: 1px solid var(--line); }
.top-inner { display: flex; align-items: center; min-height: 73px; gap: 44px; }
.brand { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
.brand img { width: 42px; height: 42px; object-fit: contain; }
.brand strong { display: block; font-size: 21px; letter-spacing: -.8px; line-height: 1.14; font-weight: 850; }
.brand small { display: block; color: var(--muted); font-size: 9px; letter-spacing: 1.6px; margin-top: 5px; }
.main-nav { align-self: stretch; display: flex; gap: 32px; align-items: stretch; }
.main-nav a { display: flex; align-items: center; font-weight: 600; font-size: 14px; color: var(--text); border-bottom: 2px solid transparent; padding-top: 2px; white-space: nowrap; }
.main-nav a[aria-current=page] { color: var(--deep-blue); border-color: var(--blue); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 13px; }
.demo-label { color: var(--muted); background: #f1f5f9; border-radius: 5px; padding: 4px 7px; font-size: 11px; white-space: nowrap; }
.market { padding-top: 24px; }
.front-grid { display: grid; grid-template-columns: 222px minmax(0,1fr) 242px; gap: 16px; }
.category-panel { padding: 16px 11px 9px; }
.category-panel h2 { display: flex; align-items: center; gap: 8px; font-size: 15px; margin: 0 7px 10px; }
.category-panel h2 .icon { color: var(--blue); }
.category-button { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; border-radius: 8px; background: transparent; color: var(--text); text-align: left; padding: 9px 7px; }
.category-button:hover, .category-button[aria-pressed=true] { background: var(--pale); }
.category-button b, .category-button small { display: block; }
.category-button b { font-size: 13px; color: #0f172a; margin-bottom: 3px; }
.category-button small { font-size: 11px; color: var(--muted); white-space: nowrap; }
.category-button > .icon { margin-left: auto; width: 13px; color: #94a3b8; }
.tile { display: inline-grid; place-items: center; flex: 0 0 auto; width: 33px; height: 33px; border-radius: 8px; color: #1d4ed8; background: #eff6ff; }
.tile.violet { color: #6d28d9; background: #f5f3ff; }
.tile.green { color: #0f766e; background: #ecfdf5; }
.tile.orange { color: #a64c0c; background: #fff7ed; }
.tile.rose { color: #be185d; background: #fdf2f8; }
.hero { min-height: 311px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 17px; padding: 30px 35px; border-radius: var(--radius); color: white; background: linear-gradient(90deg,#102752 1%,rgba(17,42,92,.93) 29%,rgba(24,55,111,.30) 100%), url('/assets/hero.jpg') center 52% / cover, #1b3c7b; overflow: hidden; }
.hero h1 { font-size: clamp(30px, 3vw, 48px); letter-spacing: -.08em; line-height: 1.2; font-weight: 850; }
.hero h1 span { display: inline-block; }
.hero p { color: #e1edff; font-size: 14px; line-height: 1.75; }
.hero form { width: min(100%, 475px); padding: 4px; display: flex; align-items: center; background: white; border-radius: 9px; gap: 4px; }
.hero form > .icon { color: var(--muted); margin-left: 8px; width: 18px; }
.hero form input { flex: 1; min-width: 0; padding: 8px 5px; outline: none; border: 0; color: var(--text); font-size: 13px; }
.hero form:focus-within { outline: 2px solid #93c5fd; outline-offset: 3px; }
.hero form .button { min-height: 36px; border-radius: 6px; padding: 5px 14px; flex: 0 0 auto; }
.quick-panel { padding: 20px 17px; display: flex; flex-direction: column; align-items: stretch; justify-content: center; gap: 12px; }
.quick-panel > .tile { width: 42px; height: 42px; border-radius: 11px; }
.quick-panel h2 { font-size: 18px; letter-spacing: -.4px; }
.quick-panel p { color: var(--muted); font-size: 13px; line-height: 1.68; margin-bottom: 4px; }
.quick-panel .button { width: 100%; }
.notice { display: flex; align-items: center; gap: 8px; margin: 14px 0 0; padding: 10px 13px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.notice .icon { color: var(--blue); width: 16px; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; margin: 26px 0 13px; gap: 12px; }
.section-head h2 { font-size: 25px; letter-spacing: -.65px; }
.section-head p { margin-top: 4px; font-size: 13px; color: var(--muted); }
.results-grid { display: grid; grid-template-columns: minmax(0,1fr) 266px; gap: 16px; align-items: start; }
.listing-panel { min-width: 0; overflow: hidden; }
.resource-search { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)) auto; align-items: end; gap: 12px; padding: 16px 17px 2px; }
.resource-search label { display: grid; gap: 6px; color: var(--text); font-size: 13px; font-weight: 650; }
.resource-search input { width: 100%; height: 40px; border: 1px solid #94a3b8; border-radius: 7px; padding: 7px 10px; color: var(--text); font-size: 13px; font-weight: 400; }
.filter-bar { padding: 12px 17px; border-bottom: 1px solid var(--line); display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }
.filter-bar .count { margin-left: auto; color: var(--muted); font-size: 12px; }
select, .field input, .field textarea, .manage-tools input { background: white; border: 1px solid #94a3b8; border-radius: 7px; padding: 9px 10px; color: var(--text); font-size: 13px; min-width: 0; }
.filter-bar select { padding: 7px 8px; max-width: 100%; }
.listing { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 13px; align-items: start; padding: 17px; }
.listing + .listing { border-top: 1px solid var(--line); }
.listing > .tile { width: 48px; height: 48px; border-radius: 9px; }
.listing > .tile .icon { width: 23px; height: 23px; }
.listing h3 { font-size: 16px; line-height: 1.5; word-break: break-word; }
.listing h3 a { display: block; }
.listing h3 a:hover { color: var(--blue); }
.meta, .tags { display: flex; align-items: center; flex-wrap: wrap; gap: 7px 12px; font-size: 12px; color: var(--muted); margin-top: 5px; }
.meta span { overflow-wrap: anywhere; }
.pill { font-size: 11px; border-radius: 4px; padding: 3px 7px; color: var(--deep-blue); background: var(--pale); }
.pill.neutral { background: #f1f5f9; color: #475569; }
.listing .tags { margin-top: 8px; }
.resource-pair { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px 18px; margin: 11px 0 0; }
.resource-pair div { border-left: 2px solid var(--line); padding-left: 9px; }
.resource-pair dt { font-size: 11px; font-weight: 650; color: var(--muted); }
.resource-pair dd { margin: 3px 0 0; font-size: 13px; color: var(--text); overflow-wrap: anywhere; }
.company-main { padding-block: 15px 48px; }
.company-main h1 { font-size: clamp(24px,3vw,35px); overflow-wrap: anywhere; }
.directory-search { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; padding: 18px; }
.directory-search label { display: grid; gap: 6px; color: var(--text); font-size: 13px; font-weight: 650; }
.directory-search label:first-child { flex: 1 1 220px; }
.directory-search input { min-width: 0; width: 100%; }
.directory-search input, .directory-search select { height: 40px; border: 1px solid #94a3b8; border-radius: 7px; padding: 8px 10px; background: white; color: var(--text); font-size: 14px; font-weight: 400; }
.directory-count { margin: 18px 0 10px; font-size: 13px; color: var(--muted); }
.company-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(min(100%,265px),1fr)); gap: 14px; }
.company-card { padding: 20px; }
.company-card h2 { font-size: 18px; line-height: 1.55; overflow-wrap: anywhere; }
.company-link { color: var(--deep-blue); text-underline-offset: .15em; }
.company-link:hover { text-decoration: underline; }
.company-code { display: inline-block; font-size: 11px; font-weight: 400; color: var(--muted); overflow-wrap: anywhere; }
.company-card .meta, .company-summary .meta { margin-block: 10px; }
.company-recent { margin-block: 10px; color: var(--text); font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; }
.company-recent span { margin-right: 8px; color: var(--muted); font-size: 12px; }
.company-count { border-top: 1px solid var(--line); padding-top: 12px; font-size: 13px; color: var(--text); }
.company-summary { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 15px; padding: 22px; margin-top: 12px; }
.company-summary > div { min-width: 0; }
.company-post { grid-template-columns: auto minmax(0,1fr); }
.side-info { padding: 17px; }
.side-info + .side-info { margin-top: 12px; }
.side-info h3 { font-size: 15px; display: flex; align-items: center; gap: 8px; }
.side-info h3 .icon { color: var(--blue); }
.side-info ul { list-style: none; padding: 0; margin: 11px 0 0; }
.side-info li { padding: 8px 0; color: var(--text); font-size: 13px; line-height: 1.55; }
.side-info li + li { border-top: 1px solid var(--line); }
.steps strong { color: var(--deep-blue); margin-right: 9px; font-variant-numeric: tabular-nums; }
.side-info p { font-size: 13px; line-height: 1.7; color: var(--muted); margin-top: 10px; }
.empty { color: var(--muted); padding: 34px 18px; text-align: center; line-height: 1.65; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 13px; padding: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.pagination .button { min-height: 32px; padding: 4px 9px; }
footer { border-top: 1px solid var(--line); margin-top: 40px; color: var(--muted); font-size: 12px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-block: 18px; }
footer a:hover { color: var(--blue); }
dialog { width: min(620px, calc(100% - 24px)); max-height: min(90vh, 820px); padding: 0; border: 1px solid var(--line); border-radius: 14px; color: #0f172a; box-shadow: 0 20px 70px #0f172a29; }
dialog::backdrop { background: #0f172a73; }
.dialog-head { position: sticky; top: 0; background: white; z-index: 1; display: flex; align-items: center; gap: 10px; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.dialog-head h2 { font-size: 18px; }
.dialog-content { padding: 19px 20px 21px; }
.dialog-content p { font-size: 14px; line-height: 1.7; color: var(--text); overflow-wrap: anywhere; }
.dialog-content h3 { margin-top: 14px; font-size: 14px; }
.dialog-content .detail-title { font-size: 22px; line-height: 1.4; margin: 0 0 8px; overflow-wrap: anywhere; }
.detail-section { padding-top: 12px; }
.preserve-lines { white-space: pre-wrap; overflow-wrap: anywhere; }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 16px; }
.related-posts { margin-top: 20px; border-top: 1px solid var(--line); }
.related-posts ul { list-style: none; margin: 6px 0 0; padding: 0; }
.related-posts li { padding: 8px 0; }
.related-posts li + li { border-top: 1px solid var(--line); }
.related-posts a { color: var(--deep-blue); font-size: 14px; font-weight: 650; overflow-wrap: anywhere; }
.related-posts a:hover { text-decoration: underline; }
.related-posts p { margin-top: 4px; color: var(--muted); font-size: 12px; }
.dialog-hint { margin-bottom: 14px; }
.fields { display: grid; grid-template-columns: repeat(6,1fr); gap: 12px; }
.field { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 650; color: var(--text); }
.field.third { grid-column: span 2; }
.field textarea { min-height: 65px; resize: vertical; }
.error-text { color: #b91c1c; margin-top: 10px; font-size: 13px; }
#toast { position: fixed; z-index: 3; right: 22px; bottom: 20px; max-width: calc(100% - 44px); background: #0f172a; color: white; padding: 11px 16px; border-radius: 8px; font-size: 14px; box-shadow: 0 6px 22px #0f172a33; }
.workspace { min-height: 100vh; display: grid; grid-template-columns: 214px minmax(0,1fr); }
.workspace aside { padding: 19px 12px; background: white; border-right: 1px solid var(--line); }
.workspace aside .brand { margin: 0 7px 20px; }
.workspace aside details { margin-bottom: 14px; }
.workspace aside summary { color: var(--text); font-size: 13px; padding: 8px; cursor: pointer; }
.workspace aside a.nav-item { display: block; border-radius: 7px; padding: 10px 12px; font-size: 14px; }
.workspace aside a[aria-current=page] { background: var(--pale); color: var(--deep-blue); font-weight: 700; }
.workspace aside a:hover { color: var(--blue); }
.workspace-header { display: flex; align-items: center; gap: 11px; flex-wrap: wrap; min-height: 67px; padding: 9px 22px; background: white; border-bottom: 1px solid var(--line); }
.workspace-identity { font-size: 15px; font-weight: 700; }
.nav-hidden .workspace-identity::before { content: '猫旗·商联 / '; }
.workspace-header .account { display: flex; align-items: center; gap: 11px; margin-left: auto; font-size: 13px; }
.workspace-main { padding: 20px; }
.workspace-main > section.surface { background: transparent; border: 0; border-radius: 0; box-shadow: none; }
.workspace-main > section.surface > .manage-tools, .workspace-main > section.surface .inbox-message { padding-inline: 0; }
.workspace-main > section.surface .table-scroll :is(th, td):first-child { padding-left: 0; }
.workspace-main > section.surface .empty { padding-inline: 0; text-align: left; }
.breadcrumb { margin: 0 0 13px; color: var(--muted); font-size: 13px; }
.manage-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.manage-tools input { margin-left: auto; }
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; text-align: left; width: 100%; font-size: 13px; }
th, td { padding: 12px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
th { background: #f8fafc; white-space: nowrap; }
td { color: var(--text); }
td a { color: var(--deep-blue); text-decoration: underline; text-underline-offset: .17em; }
td:first-child { min-width: 170px; }
td:last-child { min-width: 130px; }
td .text-button { margin-right: 8px; }
.status-published { color: #15803d; background: #f0fdf4; }
.status-pending, .status-rejected { color: #92400e; background: #fffbeb; }
.status-closed { color: #475569; background: #f1f5f9; }
.workspace.compact th, .workspace.compact td { padding-block: 6px; }
.inbox-message { border-bottom: 1px solid var(--line); padding: 15px; font-size: 14px; }
.inbox-message p { margin-top: 6px; line-height: 1.65; }
.workspace.nav-hidden { grid-template-columns: minmax(0,1fr); }
.workspace.nav-hidden aside { display: none; }

@media(max-width: 1100px) {
  .wrap { width: calc(100% - 36px); }
  .front-grid { grid-template-columns: 185px minmax(0,1fr) 202px; gap: 11px; }
  .results-grid { grid-template-columns: minmax(0,1fr) 220px; gap: 11px; }
  .hero { padding: 23px; }
}
@media(max-width: 820px) {
  .top-inner { min-height: 64px; gap: 20px; }
  .main-nav { gap: 16px; }
  .top-actions { gap: 7px; }
  .top-actions .demo-label { display: none; }
  .front-grid { grid-template-columns: 178px minmax(0,1fr); }
  .quick-panel { display: none; }
  .results-grid { grid-template-columns: minmax(0,1fr); }
  .side-column { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px; }
  .side-info + .side-info { margin: 0; }
}
@media(max-width: 560px) {
  .directory-search { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); padding: 14px; gap: 10px; }
  .directory-search label:first-child { grid-column: 1 / -1; }
  .company-summary { padding: 16px; }
  .resource-search { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; padding: 12px 12px 0; }
  .resource-search .button { grid-column: 1 / -1; }
  .resource-pair { grid-template-columns: minmax(0,1fr); }
  .wrap { width: calc(100% - 24px); }
  .top-inner { gap: 9px 13px; flex-wrap: wrap; padding-top: 9px; }
  .brand img { width: 34px; height: 34px; }
  .brand strong { font-size: 18px; }
  .brand small { font-size: 8px; letter-spacing: 1px; }
  .top-actions .button { padding: 7px 9px; min-height: 35px; font-size: 12px; }
  .top-actions .button .icon { width: 14px; }
  .main-nav { order: 3; width: 100%; min-height: 34px; gap: 23px; }
  .main-nav a { font-size: 13px; }
  .market { padding-top: 12px; }
  .front-grid { grid-template-columns: minmax(0,1fr); }
  .hero { order: -1; min-height: 225px; gap: 13px; }
  .hero h1 { font-size: 31px; }
  .hero p { font-size: 13px; }
  .category-panel { display: flex; align-items: start; justify-content: space-between; gap: 3px; padding: 9px 4px; }
  .category-panel h2, .category-button small, .category-button > .icon { display: none; }
  .category-button { gap: 6px; flex-direction: column; justify-content: center; padding: 4px 0; min-width: 0; }
  .category-button b { font-size: 11px; white-space: nowrap; }
  .section-head { margin-top: 19px; }
  .section-head h2 { font-size: 22px; }
  .listing { padding: 12px; gap: 8px; }
  .listing > .tile { width: 34px; height: 34px; }
  .listing > .tile .icon { width: 17px; height: 17px; }
  .listing h3 { font-size: 14px; }
  .side-column { grid-template-columns: minmax(0,1fr); }
  .field.third { grid-column: 1 / -1; }
  .workspace { display: block; }
  .workspace aside { border-bottom: 1px solid var(--line); border-right: none; }
  .workspace aside .brand { margin-bottom: 3px; }
  .workspace aside details { margin: 0; }
  .workspace-main { padding: 12px; }
  .workspace-header { padding-inline: 10px; }
}
