:root {
  --navy: #16325c;
  --navy-2: #0f2442;
  --accent: #1f6feb;
  --accent-ink: #ffffff;
  --ink: #17202c;
  --muted: #5b6676;
  --line: #dfe4ea;
  --bg: #ffffff;
  --bg-2: #f5f7fa;
  --ok: #157347;
  --ok-bg: #e7f5ee;
  --radius: 10px;
  --wrap: 1120px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { line-height: 1.55; font-size: 16px; background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.9rem, 4vw, 2.75rem); }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: #fff; position: sticky; top: 0; z-index: 10; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.1rem; color: var(--navy); }
.brand:hover { text-decoration: none; }
.brand-mark { width: 32px; height: 32px; border-radius: 7px; background: var(--navy); color: #fff; display: grid; place-items: center; font-weight: 800; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { color: var(--ink); padding: 8px 12px; border-radius: 8px; font-weight: 500; }
.nav a:hover { background: var(--bg-2); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--navy); background: var(--bg-2); }

/* Hero */
.hero { background: linear-gradient(160deg, var(--navy-2), var(--navy)); color: #fff; padding: 72px 0 64px; }
.hero h1 { max-width: 18ch; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; font-weight: 600; color: #9fb7dc; }
.lead { font-size: 1.125rem; color: inherit; opacity: .92; max-width: 62ch; }
.hero .lead { color: #d7e2f3; }
.hero-search { display: flex; gap: 10px; margin: 28px 0 18px; max-width: 640px; flex-wrap: wrap; }
.hero-search .search { flex: 1 1 280px; }
.hero-meta a { color: #c9d8f0; }
.hero-meta { color: #7f98c0; font-size: .95rem; }

/* Search inputs */
.search { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 0 14px; color: var(--muted); }
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(31,111,235,.18); }
.search input { border: 0; outline: 0; font: inherit; padding: 12px 0; width: 100%; color: var(--ink); background: transparent; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; }
.btn:hover { text-decoration: none; border-color: #b9c3cf; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #185fcc; border-color: #185fcc; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* Sections */
.section { padding: 44px 16px; }
.page-head { padding-bottom: 16px; }
.narrow { max-width: 780px; }
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; background: #fff; }
.highlights { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.highlights p { color: var(--muted); margin: 0; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.tile { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); font-weight: 500; }
.tile:hover { border-color: var(--accent); text-decoration: none; background: var(--bg-2); }
.tile-n { color: var(--muted); font-variant-numeric: tabular-nums; font-size: .9rem; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); font-size: .95rem; }
.chip:hover { border-color: var(--accent); text-decoration: none; }

.cta { background: var(--bg-2); border-top: 1px solid var(--line); }
.cta-inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; padding: 40px 16px; }
.cta p { margin: 0; color: var(--muted); }

/* Tables */
.filter { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.filter .search { flex: 1 1 320px; max-width: 520px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table.parts { width: 100%; border-collapse: collapse; font-size: .95rem; }
.parts th { text-align: left; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: var(--bg-2); padding: 10px 14px; border-bottom: 1px solid var(--line); }
.parts td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.parts tr:last-child td { border-bottom: 0; }
.parts tbody tr:hover { background: #fafbfd; }
.pn { font-weight: 600; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92rem; overflow-wrap: anywhere; }
.badge { display: inline-flex; align-items: center; gap: 4px; color: var(--ok); background: var(--ok-bg); border-radius: 999px; padding: 2px 10px 2px 7px; font-size: .8rem; font-weight: 600; white-space: nowrap; }
.badge .ic { width: 14px; height: 14px; }
.badge-lg { font-size: .9rem; padding: 4px 12px 4px 9px; margin-bottom: 12px; }
.empty { margin-top: 14px; }

/* Part page */
.crumbs { font-size: .9rem; color: var(--muted); margin-bottom: 20px; }
.crumbs a { color: var(--muted); }
.part { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 32px; align-items: start; }
.part-pn { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: clamp(1.6rem, 4vw, 2.4rem); overflow-wrap: anywhere; margin-bottom: .2em; }
.part-mfr { font-size: 1.15rem; font-weight: 600; }
.part .lead { color: var(--ink); }
.specs { margin: 24px 0 0; border-top: 1px solid var(--line); }
.specs div { display: grid; grid-template-columns: 160px 1fr; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; font-weight: 500; word-break: break-word; }
.rfq { position: sticky; top: 84px; background: var(--bg-2); }
.rfq .btn { width: 100%; justify-content: center; }
.rfq .small { margin: 14px 0 0; }
.contact-card { margin-top: 24px; }
.contact-card .specs { margin: 0 0 20px; border-top: 0; }

/* Footer */
.site-footer { background: var(--navy-2); color: #c4d0e2; margin-top: 48px; }
.site-footer a { color: #fff; }
.site-footer .muted { color: #8ea2c2; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; padding: 44px 16px 24px; }
.footer-grid p { margin: 0 0 .4em; }
.footer-brand { color: #fff; margin-bottom: 12px; }
.footer-brand .brand-mark { background: #fff; color: var(--navy); }
.footer-h { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: #8ea2c2; }
.legal { font-size: .8rem; padding: 16px 16px 32px; border-top: 1px solid rgba(255,255,255,.08); }

.dialog { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; text-align: center; max-width: 320px; }
.dialog::backdrop { background: rgba(10,20,40,.5); }

@media (max-width: 860px) {
  .part { grid-template-columns: 1fr; }
  .rfq { position: static; }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .parts td, .parts th { padding: 10px; }
  .pn { overflow-wrap: normal; white-space: nowrap; }
  .hide-sm { display: none; }
  .hero { padding: 48px 0 44px; }
  .specs div { grid-template-columns: 120px 1fr; }
  .section { padding: 32px 16px; }
  .header-inner { padding-top: 8px; padding-bottom: 8px; }
  .nav a { padding: 6px 8px; }
}

/* Part photo */
.part-top { display: flex; gap: 24px; align-items: center; margin-bottom: 8px; }
.part-photo { margin: 0; flex: none; width: 168px; }
.part-photo img { width: 168px; height: 168px; object-fit: contain; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; display: block; }
.part-photo figcaption { font-size: .75rem; color: var(--muted); margin-top: 6px; text-align: center; }
.photo-ph { width: 168px; height: 168px; border: 1px dashed #c8d0da; border-radius: var(--radius); background: var(--bg-2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--muted); font-size: .8rem; }
.photo-ph svg { width: 64px; height: 64px; fill: none; stroke: #9aa6b5; stroke-width: 2; stroke-linecap: round; }
@media (max-width: 640px) {
  .part-top { flex-direction: column; align-items: flex-start; gap: 16px; }
  .part-photo, .part-photo img, .photo-ph { width: 140px; }
  .part-photo img, .photo-ph { height: 140px; }
}

/* Quote request form */
.rfq-form { display: grid; gap: 10px; margin-bottom: 12px; }
.field { display: grid; gap: 4px; min-width: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field label { font-size: .85rem; font-weight: 600; color: var(--ink); }
.field input, .field textarea { font: inherit; font-size: .95rem; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); width: 100%; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(31,111,235,.18); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin: 0; min-height: 1.2em; }
.form-status.ok { color: var(--ok); }
.form-status.err { color: #b42318; }
.rfq .or { margin: 4px 0 8px; }
.rfq .btn-row .btn { width: auto; flex: 1 1 auto; }
.aliases { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85rem; font-weight: 400; color: var(--muted); }
.spec-tiles .tile { align-items: flex-start; }
.steps { padding-left: 1.2em; display: grid; gap: 18px; }
.steps h2 { font-size: 1.05rem; margin-bottom: .3em; }
.steps p { color: var(--muted); margin: 0; }
.page-head .chips { margin-top: 12px; }
@media (max-width: 400px) { .field-row { grid-template-columns: 1fr; } }
.rfq .rfq-form .form-status { margin: 0; min-height: 0; }
.rfq .rfq-form .form-status:empty { display: none; }

/* Language switch + Chinese typography */
.nav .lang-switch { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; margin-left: 4px; font-weight: 600; color: var(--navy); }
.nav .lang-switch:hover { border-color: var(--accent); background: var(--bg-2); }
.nav .lang-switch .ic { width: 16px; height: 16px; }
html[lang="zh-CN"] body, [lang="zh-CN"] { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Source Han Sans SC", sans-serif; }
html[lang="zh-CN"] h1, html[lang="zh-CN"] h2 { letter-spacing: 0; }
html[lang="zh-CN"] .lead { line-height: 1.75; }
html[lang="zh-CN"] .hero h1 { max-width: 16em; }
