:root { --blue:#2458f5; --blue-dark:#1946d4; --ink:#192b48; --muted:#63728a; --line:#e2e8f2; --soft:#f3f6fc; font-family:"Microsoft YaHei","PingFang SC",sans-serif; color:var(--ink); background:#fff; font-synthesis:none; }
* { box-sizing:border-box; }
body,h1,h2,p,ul { margin:0; }
body { min-width:min(320px,100%); }
a { color:inherit; text-decoration:none; }
button,input { font:inherit; }
button { color:inherit; cursor:pointer; border:0; touch-action:manipulation; }
img { display:block; max-width:100%; height:auto; }
[hidden] { display:none!important; }
a:focus-visible,button:focus-visible,summary:focus-visible,input:focus-visible { outline:3px solid #b96c29; outline-offset:4px; }
.sr-only { position:absolute; width:1px; height:1px; margin:-1px; padding:0; clip-path:inset(50%); overflow:hidden; white-space:nowrap; }
.skip-link { position:fixed; z-index:20; top:-80px; left:16px; padding:14px 20px; color:#fff; background:var(--ink); }
.skip-link:focus { top:12px; }
.portal-wrap { width:calc(100% - 80px); max-width:1120px; margin-inline:auto; }
.portal-header { border-bottom:1px solid var(--line); }
.header-inner { min-height:72px; display:flex; justify-content:space-between; align-items:center; gap:24px; }
.portal-brand { display:flex; align-items:center; gap:10px; }
.portal-brand img { flex:none; }
.portal-brand strong { display:block; font-size:22px; line-height:1.25; }
.portal-brand small { display:block; color:var(--muted); font-size:11px; margin-top:3px; letter-spacing:.15em; }
.home-link { display:inline-flex; align-items:center; gap:20px; min-height:44px; color:var(--muted); font-size:13px; }
.home-link:hover { color:var(--blue); }
.portal-intro { padding:28px 0 22px; }
h1 { font:600 30px/1.35 "DengXian","Microsoft YaHei",sans-serif; letter-spacing:-.025em; }
.directory-toolbar { display:flex; align-items:center; justify-content:space-between; gap:24px; padding:0 0 16px; border-bottom:1px solid var(--line); }
.subject-filters { display:flex; align-items:center; gap:8px; }
.subject-filters button { min-height:44px; padding:10px 20px; border-radius:8px; background:transparent; color:var(--muted); font-size:14px; white-space:nowrap; }
.subject-filters button:hover { background:var(--soft); color:var(--blue); }
.subject-filters button[aria-pressed="true"] { background:var(--blue); color:#fff; }
.lab-search { display:flex; align-items:center; width:285px; min-height:44px; gap:10px; padding:0 14px; border:1px solid var(--line); border-radius:8px; color:var(--muted); background:#fff; }
.lab-search:focus-within { border-color:var(--blue); }
.lab-search svg { flex:none; }
.lab-search input { width:100%; min-width:0; padding:12px 0; border:0; background:transparent; color:var(--ink); font-size:13px; }
.lab-search input:focus { outline:none; }
.lab-search input::placeholder { color:var(--muted); opacity:1; }
.lab-result-count { margin:16px 0; color:var(--muted); font-size:12px; }
.lab-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:18px; }
.lab-card { position:relative; min-width:0; border:1px solid var(--line); border-radius:16px; background:#fff; overflow:hidden; }
.lab-card:hover,.lab-card:focus-within { border-color:#b8c9f5; box-shadow:0 10px 30px #192b4810; }
.lab-image { position:relative; aspect-ratio:16/9; overflow:hidden; background:#f7f9fd; border-bottom:1px solid var(--line); }
.lab-image img { position:absolute; width:100%; max-width:none; height:auto; }
.lab-image-lever img { width:141%; left:-20.5%; top:-38%; }
.lab-image-ohm img { width:126%; left:-2%; top:-18%; }
.lab-image-resistance img { width:116%; left:-2%; top:-11%; }
.lab-image-fault img { width:108%; left:-3%; top:-4%; }
.lab-copy { padding:18px; }
.lab-copy h2 { font:600 21px/1.4 "DengXian","Microsoft YaHei",sans-serif; }
.lab-open::after { content:''; position:absolute; inset:0; z-index:1; }
.lab-open:focus-visible { outline:none; }
.lab-card:has(a:focus-visible) { outline:3px solid #b96c29; outline-offset:4px; }
.lab-copy>p { margin-top:10px; min-height:50px; color:var(--muted); font-size:13px; line-height:1.85; }
.lab-open { display:flex; align-items:center; justify-content:space-between; gap:14px; min-height:44px; margin-top:16px; padding:10px 14px; border-radius:7px; background:var(--blue); color:#fff; font-size:13px; }
.lab-card:hover .lab-open,.lab-card:focus-within .lab-open { background:var(--blue-dark); }
.lab-open>span { font-size:19px; }
.lab-empty { padding:70px 20px; text-align:center; background:var(--soft); border-radius:12px; }
.lab-empty h2 { font-size:20px; font-weight:500; }
.lab-empty p { margin:14px 0; color:var(--muted); font-size:14px; }
.lab-empty button { min-height:44px; padding:10px 16px; background:transparent; color:var(--blue-dark); font-size:14px; }
.portal-support { margin:28px 0 32px; border-top:1px solid var(--line); }
.portal-support details { border-bottom:1px solid var(--line); }
.portal-support summary { min-height:48px; padding:14px 0; color:var(--muted); cursor:pointer; font-size:13px; }
.portal-support summary:hover { color:var(--blue-dark); }
.portal-support dl,.support-content { margin:0; padding:0 0 20px; color:var(--muted); font-size:13px; line-height:1.9; }
.portal-support dl { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px 28px; }
.portal-support dt { margin-bottom:4px; color:var(--ink); }
.portal-support dd { margin:0; }
.support-content p+p { margin-top:8px; }
.portal-footer { border-top:1px solid var(--line); }
.footer-inner { display:flex; justify-content:space-between; gap:20px; padding-block:24px; color:var(--muted); font-size:11px; line-height:1.8; }
.no-script-note { margin-top:16px; color:var(--muted); font-size:13px; }
@media(max-width:1099px) {
  .lab-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:22px; }
}
@media(max-width:640px) {
  .portal-wrap { width:calc(100% - 40px); }
  .header-inner { min-height:64px; }
  .portal-intro { padding:20px 0 14px; }
  .directory-toolbar { flex-direction:column; align-items:stretch; gap:12px; }
  .lab-result-count { margin-block:12px; }
  .subject-filters button { flex:1; padding-inline:14px; }
  .lab-search { width:100%; }
  .lab-grid { grid-template-columns:1fr; gap:24px; }
  .lab-copy { padding:22px; }
  .lab-copy>p { min-height:0; }
  .portal-support dl { grid-template-columns:1fr; }
  .footer-inner { flex-direction:column; gap:8px; }
}
@media(max-width:370px) {
  .portal-wrap { width:calc(100% - 32px); }
  .portal-brand strong { font-size:19px; }
  .home-link { gap:6px; font-size:11px; }
  .portal-brand img { width:32px; }
  h1 { font-size:28px; }
  .lab-copy { padding:20px; }
  .lab-copy h2 { font-size:22px; }
}
@media(prefers-reduced-motion:no-preference) { .lab-card { transition:border-color .18s,box-shadow .18s; } }
