:root {
  --page: #f5f5f5;
  --surface: #fff;
  --surface-soft: #fafafa;
  --border: #dedede;
  --border-soft: #ebebeb;
  --text: #333;
  --muted: #666;
  --quiet: #888;
  --blue: #005bac;
  --blue-dark: #00447f;
  --radius: 6px;
}

* { box-sizing: border-box; }
html { color-scheme: light; }
body {
  margin: 0;
  min-width: 0;
  background: var(--page);
  color: var(--text);
  font-family: Arial, "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 15px;
  line-height: 1.8;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input { font: inherit; }
[hidden] { display: none !important; }

.container { width: min(1200px, calc(100% - 32px)); margin-inline: auto; }
.page-main { min-height: 50vh; padding-bottom: 34px; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.visually-hidden, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link:focus { position: fixed; z-index: 1000; top: 8px; left: 8px; padding: 8px 12px; background: #fff; color: var(--blue); border: 2px solid var(--blue); }

.site-header { background: var(--surface); border-bottom: 1px solid #ccc; }
.header-primary { min-height: 88px; display: grid; grid-template-columns: minmax(240px, 420px) minmax(280px, 1fr); align-items: center; gap: 42px; padding-block: 14px; }
.brand { min-width: 0; display: inline-flex; align-items: center; gap: 14px; color: #222; font-size: 21px; font-weight: 700; text-decoration: none; }
.brand-logo { width: auto; max-width: 190px; height: 54px; object-fit: contain; }
.brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-search { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 82px; }
.site-search input { min-width: 0; height: 42px; padding: 0 13px; color: #333; background: #fff; border: 2px solid var(--blue); border-radius: 4px 0 0 4px; outline: 0; }
.site-search input:focus { box-shadow: 0 0 0 3px rgb(0 91 172 / 18%); }
.site-search button { height: 42px; color: #fff; font-weight: 700; background: var(--blue); border: 0; border-radius: 0 4px 4px 0; cursor: pointer; }
.site-search button:hover { background: var(--blue-dark); }
.site-search button:focus-visible { outline: 2px solid var(--blue-dark); outline-offset: 2px; }
.search-feedback { position: absolute; top: 44px; left: 0; z-index: 5; margin: 0; color: #b42318; font-size: 13px; line-height: 1.5; }

.nav-band { background: var(--blue); }
.nav-row { min-height: 44px; display: flex; align-items: stretch; justify-content: space-between; }
.site-nav { display: flex; align-items: stretch; }
.site-nav > a, .category-menu > summary { min-width: 112px; display: flex; align-items: center; justify-content: center; padding: 8px 22px; color: #fff; font-weight: 700; text-decoration: none; cursor: pointer; list-style: none; }
.category-menu > summary::-webkit-details-marker { display: none; }
.site-nav > a:hover, .site-nav > a:focus-visible, .category-menu > summary:hover, .category-menu > summary:focus-visible { background: rgb(0 0 0 / 14%); outline: 0; }
.category-menu { position: relative; }
.category-menu-panel { position: absolute; z-index: 20; top: 100%; left: 0; width: min(620px, calc(100vw - 32px)); max-height: calc(100vh - 56px); padding: 14px; overflow-y: auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px 12px; background: #fff; border: 1px solid #d7d7d7; box-shadow: 0 6px 14px rgb(0 0 0 / 10%); }
.category-menu:not([open]) > .category-menu-panel { display: none; }
.category-menu-panel a { padding: 6px 8px; color: #444; text-decoration: none; border-bottom: 1px dotted #ddd; }
.category-menu-panel a:hover, .category-menu-panel a:focus-visible, .category-menu-panel a[aria-current="page"] { color: var(--blue); background: #f3f8fd; }
.nav-note { align-self: center; color: rgb(255 255 255 / 78%); font-size: 13px; }

.directory-intro { padding-top: 24px; }
.intro-panel { min-height: 116px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 480px); align-items: center; gap: 36px; padding: 22px 28px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); }
.intro-panel h1, .result-header h1, .company-heading h1 { margin: 0; color: #222; font-size: clamp(24px, 3vw, 32px); line-height: 1.35; }
.intro-panel > p, .result-header p { margin: 0; color: var(--muted); }
.intro-kicker { margin: 0 0 2px; color: var(--blue); font-size: 13px; font-weight: 700; letter-spacing: .08em; }

.directory-section { padding-top: 20px; }
.directory-section > .panel { padding: 20px 24px; }
.section-title { min-height: 34px; display: flex; align-items: center; margin-bottom: 13px; padding-bottom: 9px; border-bottom: 1px solid var(--border-soft); }
.section-title h2, .detail-section > h2 { position: relative; margin: 0; padding-left: 22px; color: var(--blue); font-size: 18px; line-height: 1.45; }
.section-title h2::before, .detail-section > h2::before { content: "+"; position: absolute; left: 0; top: 2px; width: 16px; height: 16px; display: grid; place-items: center; color: #fff; background: var(--blue); border-radius: 50%; font: 700 13px/1 Arial, sans-serif; }

.company-name-link { color: #222; font-weight: 700; text-decoration: none; text-underline-offset: 2px; }
a.company-name-link:hover, a.company-name-link:focus-visible { color: var(--blue); text-decoration: underline; }
a.company-name-link:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.company-field, .company-date { margin: 2px 0; color: var(--muted); line-height: 1.72; overflow-wrap: anywhere; }
.field-label { color: #555; font-weight: 700; }
.company-inline-facts { display: flex; flex-wrap: wrap; gap: 0 24px; }

.focus-track { position: relative; min-height: 300px; }
.focus-slide { min-height: 300px; display: grid; place-items: center; padding: 34px 72px 62px; color: #fff; border-radius: 4px; }
.focus-slide:nth-child(7n + 1) { background: #123f68; }
.focus-slide:nth-child(7n + 2) { background: #1d3154; }
.focus-slide:nth-child(7n + 3) { background: #0b5c5a; }
.focus-slide:nth-child(7n + 4) { background: #255238; }
.focus-slide:nth-child(7n + 5) { background: #4b3268; }
.focus-slide:nth-child(7n + 6) { background: #743b42; }
.focus-slide:nth-child(7n) { background: #3b5068; }
.focus-copy { width: min(860px, 100%); text-align: center; }
.focus-copy h3 { margin: 0 0 14px; font-size: clamp(22px, 2.4vw, 30px); line-height: 1.4; }
.focus-company-name { color: #fff; font-weight: 700; text-decoration: none; text-underline-offset: 4px; }
.focus-company-name:hover, .focus-company-name:focus-visible { color: #fff; text-decoration: underline; }
.focus-company-name:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
.focus-description { display: -webkit-box; margin: 0; overflow: hidden; color: rgb(255 255 255 / 92%); font-size: 16px; line-height: 1.85; -webkit-box-orient: vertical; -webkit-line-clamp: 4; line-clamp: 4; }
.company-cover { display: grid; place-items: center; overflow: hidden; border: 1px solid #ddd; border-radius: 3px; }
.company-identity { width: 120px; height: 96px; }
.company-cover img { width: 100%; height: 100%; padding: 6px; object-fit: contain; }
.company-cover-generated { padding: 12px; color: #fff; font-weight: 700; line-height: 1.45; text-align: center; }
.company-cover-generated > span { max-width: 100%; overflow-wrap: anywhere; }
.company-cover-color-1 { background: #174f78; }
.company-cover-color-2 { background: #176b68; }
.company-cover-color-3 { background: #496b36; }
.company-cover-color-4 { background: #725126; }
.company-cover-color-5 { background: #6c456f; }
.company-cover-color-6 { background: #784452; }
.company-cover-color-7 { background: #445b73; }
.focus-dots { position: absolute; z-index: 2; top: auto; bottom: 16px; left: 50%; min-height: 0; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0; transform: translateX(-50%); }
.focus-dot { width: 10px; height: 10px; padding: 0; background: rgb(255 255 255 / 44%); border: 1px solid rgb(255 255 255 / 72%); border-radius: 50%; cursor: pointer; }
.focus-dot[aria-current="true"] { background: #fff; border-color: #fff; }
.focus-dot:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

.recommended-company-list, .latest-company-list, .selected-company-list, .recent-company-list, .company-list, .similar-list { margin: 0; padding: 0; list-style: none; }
.recommended-company-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
.recommended-company-item { min-width: 0; display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 18px; padding: 18px 6px; border-bottom: 1px solid var(--border-soft); }
.recommended-company-item:hover, .selected-company-item:hover, .latest-company-item:hover, .directory-company-row:hover { background: var(--surface-soft); }
.recommended-company-item .company-identity { width: 160px; height: 120px; }
.recommended-company-item .company-cover-image img { padding: 0; object-fit: cover; }
.recommended-company-body h3 { margin: 0 0 5px; font-size: 18px; line-height: 1.45; }
.recommended-company-item .company-field--description,
.selected-company-item .company-field--description { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.recommended-company-item .company-field--products,
.recommended-company-item .company-field--address,
.recommended-company-item .company-field--capital,
.recommended-company-item .company-field--established,
.selected-company-item .company-field--products,
.selected-company-item .company-field--address { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recommended-company-item .company-inline-facts { min-width: 0; flex-wrap: nowrap; gap: 0 14px; }
.recommended-company-item .company-inline-facts > .company-field { flex: 0 1 auto; }

.latest-company-item { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, .8fr) 150px; gap: 14px; align-items: center; padding: 13px 6px; border-bottom: 1px dotted #d9d9d9; }
.latest-company-item > * { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.latest-company-item > h3, .selected-company-item > h3 { margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.latest-company-item > h3 > .company-name-link { color: #222; font-size: 16px; text-decoration: none; }
.latest-company-item > h3 > .company-name-link:hover, .latest-company-item > h3 > .company-name-link:focus-visible { color: var(--blue); text-decoration: underline; }
.latest-company-item > h3 > .company-name-link:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.latest-company-item .company-field, .latest-company-item .company-date { margin: 0; font-size: 14px; }
.latest-company-item .company-date { width: 150px; overflow: visible; text-overflow: clip; white-space: nowrap; }

.selected-company-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; }
.selected-company-item { min-width: 0; padding: 14px 6px; border-bottom: 1px solid var(--border-soft); }
.selected-company-item > h3 { margin-bottom: 5px; font-size: 17px; }
.selected-company-item > h3 > .company-name-link { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-company-item { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 18px; padding: 9px 6px; border-bottom: 1px dotted #ddd; }
.recent-company-item time { color: var(--quiet); font-size: 14px; }

.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-block: 18px 12px; color: var(--quiet); font-size: 14px; }
.breadcrumb a { color: var(--blue); text-decoration: none; }
.about-shell { padding-bottom: 24px; }
.about-panel { padding: 28px 32px; }
.about-panel h1 { margin-bottom: 18px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.about-copy { max-width: 920px; }
.about-copy p { margin: 0; color: var(--muted); font-size: 16px; line-height: 2; text-align: justify; }
.about-copy p + p { margin-top: 14px; }
.category-results { padding: 22px 24px; }
.result-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; padding-bottom: 15px; border-bottom: 1px solid var(--border); }
.result-header strong { flex: 0 0 auto; color: var(--blue); font-size: 15px; }
.result-list { margin-top: 2px; }
.directory-company-row { min-height: 186px; display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 22px; align-items: center; padding: 18px 8px; border-bottom: 1px solid var(--border); transition: background-color .15s ease; }
.directory-company-row .company-identity { width: 220px; max-width: 100%; height: auto; aspect-ratio: 22 / 15; }
.directory-company-body h2 { margin: 0 0 7px; font-size: 20px; line-height: 1.45; }
.directory-company-row a.company-name-link { color: #222; text-decoration: none; }
.directory-company-row a.company-name-link:hover, .directory-company-row a.company-name-link:focus-visible { color: var(--blue); text-decoration: underline; }
.directory-company-row a.company-name-link:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.directory-company-row .company-inline-facts { flex-wrap: nowrap; gap: 0 12px; }
.directory-company-row .company-inline-facts > .company-field { min-width: 0; }
.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; padding-top: 22px; }
.pagination a, .pagination span { min-width: 36px; height: 34px; display: grid; place-items: center; padding: 0 10px; color: #555; text-decoration: none; background: #fff; border: 1px solid #d7d7d7; border-radius: 3px; }
.pagination a[aria-current="page"] { color: #fff; background: var(--blue); border-color: var(--blue); }
.pagination span[aria-disabled="true"] { color: #aaa; background: #f7f7f7; }

.detail-shell { padding: 0 0 24px; background: transparent; }
.company-heading { padding: 20px 24px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); }
.company-content { padding-top: 12px; }
.detail-section { margin-bottom: 18px; padding: 20px 24px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); }
.detail-section > h2 { margin-bottom: 15px; padding-bottom: 9px; border-bottom: 1px solid var(--border-soft); }
.detail-section > h2 > span[aria-hidden="true"] { display: none; }
.detail-section p { color: var(--muted); overflow-wrap: anywhere; }
.text-expand { padding: 0; color: var(--blue); background: transparent; border: 0; cursor: pointer; }
.text-expand:hover, .text-expand:focus-visible { text-decoration: underline; }
.company-cover-detail { width: min(520px, 100%); aspect-ratio: 22 / 15; margin: 0 0 16px; }
.company-cover-detail img { padding: 8px; background: #fff; object-fit: contain; }
.company-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; border-top: 1px solid var(--border); border-left: 1px solid var(--border); }
.company-facts > div { min-width: 0; display: grid; grid-template-columns: 140px minmax(0, 1fr); border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.company-facts > .company-fact-wide { grid-column: 1 / -1; }
.company-facts dt, .company-facts dd { margin: 0; padding: 10px 12px; overflow-wrap: anywhere; }
.company-facts dt { color: #555; font-weight: 700; background: #f3f8fd; }
.company-facts dd { color: var(--muted); background: #fff; }
.detail-section table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.detail-section th, .detail-section td { padding: 10px 12px; overflow-wrap: anywhere; border: 1px solid var(--border); }
.detail-section th { width: 150px; background: #f3f8fd; }
.related-company-section { margin-top: 18px; }
.similar-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; }
.similar-list li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 4px; border-bottom: 1px dotted #ddd; }
.similar-list span { flex: 0 0 auto; color: var(--quiet); }

.site-footer { margin-top: 8px; color: #eee; background: #3b3b3b; }
.footer-compact { padding-block: 17px 15px; text-align: center; }
.footer-nav ul { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; margin: 0; padding: 0; list-style: none; }
.footer-nav li { display: flex; align-items: center; }
.footer-nav li + li { margin-left: 12px; padding-left: 12px; border-left: 1px solid #777; }
.footer-nav a { color: #eee; text-decoration: none; }
.footer-nav a:hover, .footer-nav a:focus-visible { color: #fff; text-decoration: underline; }
.footer-nav a:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.footer-copyright { margin: 6px 0 0; color: #bdbdbd; font-size: 13px; line-height: 1.6; }

@media (max-width: 820px) {
  .container { width: min(100% - 24px, 1200px); }
  .header-primary { grid-template-columns: 1fr; gap: 12px; padding-block: 12px 18px; }
  .brand { justify-self: start; max-width: 100%; font-size: 19px; }
  .brand-logo { max-width: 160px; height: 46px; }
  .site-search { width: 100%; }
  .nav-row { display: block; }
  .site-nav { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .site-nav > a, .category-menu { width: auto; min-width: 0; }
  .site-nav > a, .category-menu > summary { width: 100%; height: 100%; min-width: 0; padding-inline: 8px; white-space: nowrap; }
  .category-menu-panel { left: 50%; transform: translateX(-50%); grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav-note { display: none; }
  .intro-panel { grid-template-columns: 1fr; gap: 6px; min-height: 0; padding: 19px 20px; }
  .directory-section { padding-top: 14px; }
  .directory-section > .panel, .category-results { padding: 17px 16px; }
  .about-panel { padding: 20px; }
  .recommended-company-list, .selected-company-list, .similar-list { grid-template-columns: 1fr; }
  .focus-slide { padding-inline: 40px; }
  .latest-company-item { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, .8fr) 150px; gap: 8px; padding-inline: 2px; }
  .result-header { display: block; }
  .result-header strong { display: block; margin-top: 10px; }
  .directory-company-row { min-height: 186px; grid-template-columns: 220px minmax(0, 1fr); gap: 14px; padding-inline: 2px; }
  .directory-company-row .company-identity { width: 220px; max-width: 100%; height: auto; aspect-ratio: 22 / 15; }
  .company-facts { grid-template-columns: 1fr; }
  .company-facts > div { grid-template-columns: 104px minmax(0, 1fr); }
}

@media (max-width: 430px) {
  body { font-size: 14px; }
  .container { width: calc(100% - 18px); }
  .brand { gap: 8px; font-size: 17px; }
  .brand-logo { max-width: 120px; height: 40px; }
  .site-search { grid-template-columns: minmax(0, 1fr) 62px; }
  .site-search input { padding-inline: 9px; font-size: 13px; }
  .site-nav > a, .category-menu > summary { padding: 8px 9px; font-size: 13px; }
  .category-menu-panel { width: calc(100vw - 18px); padding: 9px; gap: 1px 6px; }
  .intro-panel h1, .result-header h1, .company-heading h1 { font-size: 23px; }
  .focus-track, .focus-slide { min-height: 260px; }
  .focus-slide { padding: 26px 18px 52px; }
  .focus-copy h3 { margin-bottom: 10px; font-size: 21px; }
  .focus-description { font-size: 14px; line-height: 1.75; }
  .recommended-company-item { grid-template-columns: 112px minmax(0, 1fr); gap: 12px; padding-inline: 0; }
  .recommended-company-item .company-identity { width: 112px; height: 84px; }
  .recommended-company-item .company-inline-facts { flex-wrap: wrap; gap: 0 12px; }
  .directory-company-row { grid-template-columns: 1fr; }
  .directory-company-row .company-identity { width: 220px; max-width: 100%; height: auto; aspect-ratio: 22 / 15; justify-self: center; }
  .latest-company-item { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, .8fr) 150px; gap: 6px; }
  .latest-company-item > h3 > .company-name-link { font-size: 14px; }
  .latest-company-item .company-field, .latest-company-item .company-date { font-size: 13px; }
  .directory-company-body h2 { font-size: 18px; }
  .recent-company-item { grid-template-columns: 88px minmax(0, 1fr); gap: 8px; }
  .detail-section { padding: 16px 12px; }
  .about-panel { padding: 18px 14px; }
  .about-copy p { font-size: 15px; line-height: 1.9; }
  .company-facts > div { grid-template-columns: 96px minmax(0, 1fr); }
  .company-facts dt, .company-facts dd { padding: 8px; }
  .pagination a, .pagination span { min-width: 32px; padding-inline: 7px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
