:root{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;color:#1e293b;background:#fff;font-synthesis:none;--muted:#64748b;--border:#e2e8f0;--accent:#245bc2}
*{box-sizing:border-box}body{margin:0}button,textarea{font:inherit}button,summary{cursor:pointer}button:disabled,textarea:disabled{cursor:wait}button:disabled{opacity:.55}[hidden]{display:none!important}
main{max-width:1184px;margin:0 auto;padding:48px 32px 28px}.intro{margin-bottom:28px}h1{font-size:26px;line-height:1.4;font-weight:600;letter-spacing:.02em;margin:0 0 12px}.lead{font-size:14px;line-height:1.9;color:#526071;max-width:850px;margin:0}.workspace{display:grid;grid-template-columns:1fr 1fr;gap:20px;align-items:stretch}.input-card,.result-card{border:1px solid var(--border);border-radius:8px;padding:24px;min-width:0}.result-card{background:#f8fafc;overflow-wrap:anywhere}.section-top{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:14px;font-weight:600}.section-top span{font-size:12px;font-weight:400;color:var(--muted);font-variant-numeric:tabular-nums}textarea{display:block;width:100%;resize:vertical;min-height:210px;padding:14px 0;border:0;background:transparent;line-height:1.8;font-size:15px;color:#1e293b;border-radius:3px}textarea::placeholder{color:#7b8796}textarea:focus{outline:none}textarea:focus-visible{box-shadow:0 0 0 2px #cbdaf6}.examples{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:4px 0 20px;font-size:12px;color:var(--muted)}.examples button{border:1px solid var(--border);background:#fff;color:#526071;border-radius:4px;padding:5px 8px;font-size:12px}.examples button:hover{border-color:#9eb7e4;color:var(--accent);background:#f5f8ff}details{border-top:1px solid var(--border);padding-top:14px;font-size:14px;line-height:1.8}summary{color:#475569}summary span{color:var(--muted);font-size:12px;margin-left:6px}#context{min-height:110px;font-size:14px;margin-top:8px}.actions{display:flex;justify-content:flex-end;align-items:center;gap:12px;margin-top:24px}.privacy{font-size:12px;color:var(--muted)}#submit{border:0;border-radius:5px;padding:10px 20px;background:var(--accent);color:#fff;font-size:14px;font-weight:500;white-space:nowrap}#submit:hover{background:#1d4da8}.disclosure{font-size:12px;color:var(--muted);line-height:1.7;margin:12px 0 0}#error{font-size:13px;color:#a23535;line-height:1.7;margin:16px 0 0}h2{font-size:18px;font-weight:600;line-height:1.6;margin:0 0 12px}#empty p,#loading p{font-size:14px;line-height:1.9;color:var(--muted);margin:0;max-width:370px}#empty{min-height:300px}#loading{padding-top:6px}.spinner{display:block;width:20px;height:20px;border:2px solid #dbe4f1;border-top-color:var(--accent);border-radius:50%;animation:spin 1s linear infinite;margin-bottom:16px}#elapsed{margin-top:12px!important;font-size:12px!important}#result{font-size:14px;line-height:1.85;scroll-margin-top:20px}#result p{margin:0 0 16px}#result .kicker{font-size:12px;color:var(--muted);margin-bottom:8px}#result .hint{font-size:12px;color:var(--muted);margin-bottom:20px}blockquote{margin:18px 0 12px;border-left:3px solid #a5bbdf;padding:8px 12px;background:#eef3fa;color:#334155}h3{font-size:14px;font-weight:600;margin:18px 0 6px}ul{margin:0;padding-left:20px}li{margin:5px 0}.block{margin-bottom:18px}#result details{margin-top:20px;font-size:13px}#result details p{margin:10px 0}.rule{color:var(--muted)}footer{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-top:18px;font-size:11px;line-height:1.8;color:var(--muted)}footer b{font-weight:400;margin:0 4px}:focus-visible{outline:2px solid var(--accent);outline-offset:4px}.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}@keyframes spin{to{transform:rotate(360deg)}}
@media(max-width:760px){main{padding:28px 20px 24px}.intro{margin-bottom:22px}h1{font-size:24px}.lead{font-size:13px;line-height:1.85}.workspace{grid-template-columns:1fr;gap:16px}.input-card,.result-card{padding:20px}textarea{min-height:180px}.examples{gap:6px;margin-bottom:16px}.examples button{padding:5px 7px}.actions{margin-top:20px}#submit{padding:10px 16px}#empty{min-height:110px}footer{gap:4px;margin-top:14px}footer span{display:block;width:100%}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}.spinner{animation:none}}

.analysis-boundary{font-size:13px;line-height:1.8;color:#526071;margin:18px 0 24px}
.dictionary{border:1px solid var(--border);border-radius:8px;padding:18px 22px;background:#fff}
.dictionary>summary{font-weight:600;color:#334155}.dictionary>summary span{font-weight:400}
.dictionary-note{font-size:12px;line-height:1.9;color:var(--muted);margin:16px 0 0}
.dictionary-note a{color:var(--accent);text-underline-offset:3px}
.dictionary-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 24px;margin-top:14px;align-items:start}
.dictionary-entry{padding:13px 0;font-size:13px;min-width:0}.dictionary-entry summary{font-size:14px}
.dictionary-entry p{margin:10px 0 0;line-height:1.85;overflow-wrap:anywhere}.dictionary-entry strong{font-weight:500}.dictionary-entry .reasonable{color:#526071}
@media(max-width:760px){.dictionary{padding:16px 20px}.dictionary-grid{grid-template-columns:1fr}.dictionary>summary span{display:block;margin-left:17px}.analysis-boundary{font-size:12px;margin:16px 0 20px}}

.scope-note{font-size:12px;line-height:1.85;color:var(--muted);max-width:850px;margin:8px 0 0}
.dictionary{margin-top:24px}
.rule-link{color:var(--accent);text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:4px}
.rule-link:hover{color:#163f90}.dictionary-entry{scroll-margin-top:24px}
.dictionary-entry:focus-within{background:#f5f8ff;border-radius:4px}

.rule-link{font:inherit;font-weight:inherit;border:0;background:none;padding:0;text-align:left;line-height:inherit}
.rule-link[aria-expanded="true"]{color:#163f90;text-decoration-thickness:2px}
#result h3 .rule-link{font-size:13px}#result h3+blockquote{margin-top:8px}
.rule-popup{position:fixed;inset:auto;margin:0;width:min(400px,calc(100vw - 32px));max-height:calc(100dvh - 32px);overflow:auto;border:1px solid #ccd8e7;border-radius:10px;padding:20px;background:#fff;color:#1e293b;box-shadow:0 12px 40px #1e293b26;font-size:14px;line-height:1.85;overflow-wrap:anywhere}
.popup-header{display:flex;align-items:flex-start;gap:16px;justify-content:space-between}.popup-header h2{font-size:17px;margin:0}.popup-header button{flex-shrink:0;width:32px;height:32px;border:0;border-radius:4px;background:#f1f5f9;color:#475569;font-size:24px;line-height:1}
#rule-popup-content p{margin:12px 0 0}#rule-popup-content strong{font-weight:500}#rule-popup-content .reasonable{color:#526071}
.dictionary-tools{display:flex;align-items:center;gap:16px;margin-top:18px}.dictionary-tools input{font:inherit;min-width:0;flex:1;border:1px solid var(--border);border-radius:5px;padding:9px 12px;background:#fff;color:#1e293b}.dictionary-tools span{font-size:12px;color:var(--muted);white-space:nowrap}#dictionary-empty{font-size:13px;color:var(--muted)}
.example-source{font-size:12px;line-height:1.7;color:var(--muted);margin:-10px 0 18px}.example-source a{color:var(--accent);text-underline-offset:3px;margin-left:4px}
@media(max-width:760px){.rule-popup{padding:18px}.popup-header button{width:40px;height:40px}.dictionary-tools{gap:10px}.dictionary-tools input{font-size:14px}.examples button{min-height:32px}}
