:root {
  font-family: "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: #263449;
  background: #f5f6f8;
  font-synthesis: none;
  --ink: #24334a;
  --muted: #647084;
  --accent: #2d5fa8;
  --line: #e1e5eb;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, a, input, select { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { opacity: .5; cursor: default; }
button, a, input, select, textarea { outline-offset: 3px; }
:focus-visible { outline: 2px solid #4275bc; }
[hidden] { display: none !important; }
.site-shell { max-width: 1160px; margin: auto; padding: 0 32px; }
.topbar { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 11px; font-size: 21px; font-weight: 650; letter-spacing: -.5px; white-space: nowrap; }
.brand-suffix { color: #66758a; font-weight: 450; }
.header-nav { display: flex; align-items: center; gap: 26px; font-size: 14px; color: #5d6b7e; }
.header-nav a:hover { color: var(--accent); }
.header-nav a[aria-current="page"] { color: #254e83; font-weight: 600; }
.home-main { min-height: calc(100vh - 156px); }
.home-main .intro { padding-top: 48px; padding-bottom: 30px; }
.entry-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; padding-bottom: 48px; }
.entry-card { display: flex; flex-direction: column; align-items: flex-start; padding: 28px; border: 1px solid var(--line); border-radius: 10px; background: #fff; transition: border-color .15s, background .15s; }
.entry-card:hover { border-color: #9cb3d4; background: #fafcff; }
.entry-symbol { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 9px; background: #edf3fc; color: #315b91; margin-bottom: 18px; }
.entry-symbol svg { width: 24px; height: 24px; }
.entry-card h2 { font-size: 20px; }
.entry-card p { font-size: 15px; color: #586a80; margin: 10px 0 16px; }
.entry-example { font-size: 13px; color: var(--muted); margin-bottom: 25px; }
.entry-action { display: flex; align-items: center; justify-content: space-between; width: 100%; padding-top: 16px; border-top: 1px solid #edf0f4; color: var(--accent); font-size: 14px; font-weight: 500; margin-top: auto; }
.intro { padding: 32px 0 26px; }
h1 { margin: 0 0 8px; font-size: 28px; line-height: 1.4; font-weight: 650; letter-spacing: -.5px; }
.intro-copy { color: var(--muted); margin: 0; font-size: 15px; }
h2 { margin: 0; font-size: 18px; font-weight: 600; line-height: 1.5; }
.section-caption { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.section-title { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.quiet { font-size: 14px; color: var(--muted); }
.tools-section { margin-bottom: 28px; scroll-margin-top: 20px; }
.tools-list { display: grid; gap: 12px; }
.tool-card { padding: 18px 22px; border: 1px solid var(--line); border-radius: 9px; background: #fff; min-width: 0; }
.tool-heading, .tool-title, .tool-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tool-heading { justify-content: space-between; }
.tool-title h3 { margin: 0; font-size: 17px; font-weight: 600; }
.open-source-badge { display: inline-flex; padding: 1px 7px; border: 1px solid #cce3d6; border-radius: 5px; background: #f0f8f3; color: #387451; font-size: 12px; font-weight: 500; white-space: nowrap; }
.tool-source { font-size: 13px; color: var(--accent); }
.tool-source:hover { text-decoration: underline; }
.tool-description { font-size: 14px; color: #586a80; margin: 6px 0; }
.tool-tag-row { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.tool-tag-row:not(:empty) { margin-top:10px; }
.tool-tags { display:flex; flex-wrap:wrap; gap:6px; list-style:none; padding:0; margin:0; min-width:0; }
.tool-tags li { padding:2px 8px; border-radius:4px; background:#f2f5f9; color:#5b708b; font-size:12px; }
.tool-introduction { margin-top:14px; border-top:1px solid #edf0f4; }
.tool-card.has-introduction { cursor:pointer; }
.tool-card.has-introduction:hover { border-color:#b7c8df; }
.tool-intro-toggle { display:inline-flex; align-items:center; justify-content:center; width:36px; height:36px; margin-left:auto; padding:0; border:0; background:transparent; color:var(--accent); cursor:pointer; border-radius:6px; flex-shrink:0; }
.tool-intro-toggle:hover { background:#edf3fc; }
.tool-intro-toggle::after { content:""; width:8px; height:8px; border-right:1.5px solid currentColor; border-bottom:1.5px solid currentColor; transform:rotate(45deg); margin-bottom:4px; }
.tool-intro-toggle[aria-expanded="true"]::after { transform:rotate(225deg); margin-bottom:0; }
.tool-intro-body { padding-top:18px; }
.tool-intro-headline { font-size:17px; font-weight:600; color:#2c4566; line-height:1.6; margin:0 0 8px; }
.tool-intro-copy { font-size:14px; color:#586a80; line-height:1.8; margin:0 0 18px; max-width:850px; }
.tool-highlights { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; padding:0; margin:0; list-style:none; }
.tool-highlight { padding:15px 17px; background:#f7f9fc; border:1px solid #edf1f6; border-radius:7px; }
.tool-highlight h5,.tool-scenarios h5 { font-size:13px; font-weight:600; color:#354e6c; margin:0 0 5px; }
.tool-highlight p { font-size:13px; line-height:1.8; color:#627187; margin:0; }
.tool-scenarios { margin-top:18px; }
.tool-scenarios ul { display:flex; flex-wrap:wrap; gap:6px 20px; padding:0; margin:6px 0 0; list-style:none; color:#586a80; font-size:13px; }
.tool-scenarios li::before { content:"·"; margin-right:7px; color:#6e8cb3; }
.tool-scenario-copy { margin:6px 0 0; font-size:13px; line-height:1.8; color:#586a80; white-space:pre-line; }
.tool-intro-body > .tool-source { display:inline-block; margin-top:16px; }
@media(max-width:640px) { .tool-highlights { grid-template-columns:1fr; } .tool-intro-headline { font-size:16px; } }
.tool-meta, .tool-file-meta { font-size: 12px; color: var(--muted); }
.tool-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-left:auto; }
.tool-query { border: 1px solid #cbd9ec; border-radius: 6px; padding: 7px 12px; background: #edf3fc; color: #315b91; font-size: 13px; }
.tool-query:hover { background: #e1ecfb; }
.tool-detail { margin-top: 14px; scroll-margin-top: 20px; }
.tool-query-status, .tool-guide { font-size: 13px; color: #586a80; margin: 10px 0 0; }
.tool-query-status:empty { display: none; }
.tool-file { display: flex; align-items: center; gap: 16px; justify-content: space-between; padding-top: 12px; margin-top: 12px; border-top: 1px solid #edf0f4; }
.tool-file-info { min-width: 0; }
.tool-filename { font-family: Consolas, monospace; font-size: 13px; color: var(--accent); overflow-wrap: anywhere; text-decoration: underline; text-decoration-color: #b1c3de; text-underline-offset: 3px; }
.tool-file-meta { margin-top: 3px; }
.tool-actions { display: flex; gap: 10px; align-items: center; flex-shrink: 0; }
.tool-download { background: #eaf1fc; border: 1px solid #d9e4f6; color: #345f99; padding: 7px 12px; border-radius: 6px; font-size: 13px; }
.tool-download:hover { background: #dce8f9; }
.tools-note { font-size: 12px; color: var(--muted); margin: 10px 0 0; }
.tool-error { font-size: 14px; color: #885c30; }
.tools-status { font-size: 13px; color: #345478; background: #edf3fc; padding: 12px; border-radius: 6px; overflow-wrap: anywhere; }
.favorites { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; margin-top: 18px; }
.favorites > .quiet { font-size: 14px; font-weight: 600; color: #3b5273; }
.app-grid { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.app-card { border: 1px solid #cbd9ec; border-radius: 6px; padding: 7px 14px; background: #edf3fc; color: #315b91; font-size: 14px; max-width: 100%; transition: border-color .15s, background .15s; }
.app-card:hover { border-color: #7e9fc9; background: #e1ecfb; color: var(--accent); }
.app-card.selected { border-color: #7e9fc9; background: #e1ecfb; color: var(--accent); }
.app-info strong { font-weight: 600; overflow-wrap: anywhere; }
.query-card { margin-top: 0; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 24px; scroll-margin-top: 20px; }
form > label { display: block; font-size: 14px; color: #536278; margin-bottom: 8px; }
.input-row { display: flex; gap: 12px; }
.input-wrap { position: relative; flex: 1; min-width: 0; }
.link-icon { position: absolute; left: 15px; top: 10px; color: #708199; font-size: 20px; }
.input-wrap input { width: 100%; height: 48px; border: 1px solid #ccd4df; background: #fafbfd; border-radius: 7px; padding: 0 14px 0 41px; color: var(--ink); font-size: 15px; }
.input-wrap input::placeholder { color: #7c8899; }
.input-wrap input:focus { border-color: #7394bf; background: #fff; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 16px; border: 1px solid transparent; border-radius: 7px; padding: 10px 17px; font-size: 14px; font-weight: 500; white-space: nowrap; }
.primary { color: white; background: #254e83; min-width: 136px; }
.primary:hover { background: #1c406e; }
.ghost { border-color: var(--line); background: #fff; color: #4d6079; gap: 8px; }
.ghost:hover { background: #f5f8fc; }
.query-options { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 16px; }
.query-options p { font-size: 13px; color: var(--muted); margin: 0; }
.store-search { border-top: 1px solid var(--line); margin-top: 22px; padding-top: 19px; }
.store-search .input-wrap input { padding-left: 14px; }
.store-search p { font-size: 13px; color: var(--muted); margin: 9px 0 0; line-height: 1.8; }
.selects { display: flex; gap: 16px; }
.compact-label { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #5e6e83; }
select { background: white; border: 1px solid #d4dce7; border-radius: 6px; color: #445873; font-size: 13px; padding: 7px 27px 7px 10px; max-width: 100%; }
.loading-panel, .error-panel { display: flex; align-items: center; gap: 16px; padding: 20px 24px; margin-top: 24px; background: #edf3fc; border: 1px solid #d9e4f3; border-radius: 10px; }
.loading-panel strong, .error-panel strong { font-size: 15px; font-weight: 600; }
.loading-panel p, .error-panel p { font-size: 14px; color: #596f8f; margin: 5px 0 0; }
.loading-panel .button, .error-panel .button { margin-left: auto; }
.spinner { flex-shrink: 0; width: 24px; height: 24px; border: 2px solid #c7d6eb; border-top-color: #4c73a4; border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.error-panel { background: #fff7ee; border-color: #eedbc7; }
.error-panel > span { flex-shrink: 0; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #edd6bf; color: #825a31; }
.error-panel p { color: #805c37; }
.results-card { margin-top: 24px; background: white; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.result-heading { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 22px 24px; }
.eyebrow { font-size: 13px; color: #5f7797; margin-bottom: 5px; }
.result-heading h2 { font-size: 22px; overflow-wrap: anywhere; }
.result-heading p { margin: 6px 0 0; font-size: 13px; overflow-wrap: anywhere; }
.results-toolbar { padding: 12px 24px; border-block: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 12px; background: #f9fafc; }
.filters { display: flex; gap: 10px; min-width: 0; }
.filters input { width: 200px; min-width: 0; border: 1px solid #d4dce7; border-radius: 6px; padding: 7px 10px; font-size: 14px; background: white; color: var(--ink); }
.text-button { border: 0; background: none; color: var(--accent); font-size: 13px; padding: 6px; white-space: nowrap; }
.text-button:hover { text-decoration: underline; }
.table-scroll { overflow: auto; }
table { border-collapse: collapse; width: 100%; text-align: left; table-layout: fixed; }
th { font-size: 13px; color: #68768a; font-weight: 500; padding: 13px 12px; border-bottom: 1px solid var(--line); }
th:first-child { width: 53%; padding-left: 24px; }
th:nth-child(2) { width: 10%; }
th:nth-child(3) { width: 13%; }
th:last-child { width: 24%; padding-right: 24px; }
td { padding: 18px 12px; border-bottom: 1px solid #edf0f4; font-size: 14px; vertical-align: middle; }
td:first-child { padding-left: 24px; }
td:last-child { padding-right: 24px; }
.filename { font-family: Consolas, monospace; font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; color: #2d5fa8; text-decoration: underline; text-decoration-color: #aebfd9; text-underline-offset: 3px; }
.filename:hover { color: #163d74; text-decoration-color: currentColor; }
.file-version { font-size: 12px; color: #6d7b8e; margin-top: 5px; }
.badge { display: inline-flex; border: 1px solid #dbe4ef; background: #f1f5fb; border-radius: 5px; padding: 3px 7px; font-size: 12px; color: #4c668c; }
.action-heading { text-align: right; }
.file-actions { display: flex; justify-content: flex-end; align-items: center; gap: 12px; }
.download-link { background: #eaf1fc; border: 1px solid #d9e4f6; color: #345f99; padding: 7px 10px; border-radius: 6px; font-size: 13px; white-space: nowrap; }
.download-link:hover { background: #dce8f9; }
.copy-link { font-size: 13px; background: #fff; border: 1px solid #d4dce7; border-radius: 6px; color: #345f99; padding: 7px 10px; white-space: nowrap; }
.copy-link:hover { color: #234e8a; }
.result-footer { display: flex; justify-content: space-between; gap: 12px; padding: 12px 24px; font-size: 12px; color: #64758b; background: #fafbfd; }
.result-warnings, .http-note { font-size: 13px; line-height: 1.8; padding: 12px 24px; color: #826330; background: #fffbf1; margin: 0; }
.download-help { padding: 18px 24px; background: #f0f5fd; border-bottom: 1px solid #d9e4f6; }
.download-help-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.download-help h3 { margin: 0; font-size: 15px; font-weight: 600; }
.download-help p { margin: 7px 0; font-size: 14px; color: #4c607c; }
.download-help .download-file-name { overflow-wrap: anywhere; color: #243d61; font-size: 13px; font-family: Consolas, monospace; margin-top: 12px; }
.download-help label { display: block; font-size: 13px; color: #536b8c; margin: 10px 0 5px; }
.download-url-row { display: flex; align-items: center; gap: 12px; }
.download-url-row textarea { flex: 1; min-width: 0; width: 100%; resize: vertical; padding: 9px 12px; background: white; color: #345478; border: 1px solid #cbd9eb; border-radius: 6px; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.download-help .download-help-note { font-size: 12px; color: #66788f; margin: 10px 0 0; }
.empty-cell { text-align: center; color: #68768a; padding: 30px !important; }
.help-section { padding: 32px 0; scroll-margin-top: 20px; }
.help-section h2 { font-size: 16px; }
.help-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.help-grid h3 { font-size: 14px; font-weight: 600; margin: 0 0 7px; color: #4c5f78; }
.help-grid p { font-size: 13px; line-height: 1.8; color: #69788a; margin: 0; }
.footer { display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); padding: 22px 0 28px; font-size: 12px; color: #6f7e91; }
.footer-separator { color: #a0adbf; margin: 0 8px; }
#toast { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); background: #263f60; color: white; padding: 12px 22px; border-radius: 8px; box-shadow: 0 5px 20px #0002; font-size: 14px; max-width: 90vw; text-align: center; }
dialog { width: min(550px, 90vw); border: 1px solid var(--line); border-radius: 12px; padding: 26px; color: var(--ink); }
dialog::backdrop { background: #22304966; }
dialog p { font-size: 14px; color: var(--muted); }
dialog textarea { width: 100%; height: 160px; border: 1px solid var(--line); border-radius: 7px; padding: 12px; font-size: 14px; margin-bottom: 15px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.noscript { padding: 20px; text-align: center; color: #9a4520; }
@media (max-width: 900px) {
  .query-options { flex-wrap: wrap; }
  .help-grid { gap: 20px; }
  table { min-width: 740px; }
}
@media (max-width: 640px) {
  .entry-grid { grid-template-columns: 1fr; gap: 14px; padding-bottom: 30px; }
  .entry-card { padding: 22px; }
  .home-main .intro { padding-top: 28px; padding-bottom: 24px; }
  .tool-card { padding: 16px; }
  .tool-file { align-items: flex-start; flex-direction: column; gap: 10px; }
  .tool-actions { align-self: flex-end; }
  .site-shell { padding: 0 18px; }
  .topbar { min-height: 72px; gap: 16px; flex-wrap: wrap; padding: 15px 0; }
  .brand { font-size: 20px; }
  .header-nav { gap: 18px; font-size: 13px; }
  .intro { padding: 26px 0 23px; }
  h1 { font-size: 24px; }
  .intro-copy { font-size: 14px; }
  h2 { font-size: 17px; }
  .section-title { gap: 4px; flex-direction: column; }
  .section-title .quiet { font-size: 13px; }
  .query-card { margin-top: 0; padding: 20px 17px; }
  .input-row { flex-direction: column; gap: 10px; }
  .input-wrap input { font-size: 14px; }
  .input-row .primary { min-height: 44px; }
  .query-options { gap: 14px; }
  .query-options p { font-size: 12px; }
  .selects { width: 100%; justify-content: space-between; gap: 10px; }
  .compact-label { gap: 6px; }
  select { padding-left: 8px; }
  .results-toolbar { align-items: flex-start; flex-direction: column; padding: 12px 17px; }
  .filters { width: 100%; }
  .filters input { flex: 1; width: 140px; }
  .result-heading { padding: 20px 17px; }
  .result-heading h2 { font-size: 20px; }
  .result-heading .button { padding: 8px 10px; font-size: 13px; }
  .result-footer { flex-direction: column; gap: 4px; padding-inline: 17px; }
  .http-note, .result-warnings { padding: 12px 17px; }
  .download-help { padding: 17px; }
  .download-url-row { flex-direction: column; align-items: stretch; }
  .help-grid { grid-template-columns: 1fr; gap: 20px; }
  .help-grid p { font-size: 14px; }
  .footer { flex-direction: column; gap: 8px; }
  .loading-panel, .error-panel { padding: 17px; gap: 12px; }
  .loading-panel .button, .error-panel .button { padding: 8px 10px; }
}
@media (max-width: 390px) {
  .header-nav { gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0s !important; transition: none !important; scroll-behavior: auto !important; }
}
