:root{
  color-scheme:dark;
  --bg:#0d1520;
  --panel:#111e2b;
  --raised:#152536;
  --line:#294054;
  --text:#e0eaf2;
  --muted:#9db2c3;
  --source:#8ebcff;
  --target:#c8acf5;
  --result:#8ce2cf;
  font-family:'Segoe UI','Microsoft YaHei',sans-serif;
  font-size:14px}
*{
  box-sizing:border-box}
body{
  margin:0;
  background:var(--bg);
  color:var(--text)}
a{
  color:inherit;
  text-decoration:none}
button,select,textarea{
  font:inherit}
button,a,select,input,summary,textarea{
  outline-offset:4px}
button:focus-visible,a:focus-visible,select:focus-visible,input:focus-visible,summary:focus-visible,textarea:focus-visible{
  outline:2px solid var(--result)}
button{
  cursor:pointer;
  border:1px solid var(--line);
  background:var(--raised);
  color:var(--text);
  border-radius:6px;
  min-height:40px;
  padding:9px 16px}
button:hover{
  background:#203a4d}
button:disabled{
  opacity:.5;
  cursor:default}
select{
  background:var(--panel);
  color:var(--text);
  border:1px solid var(--line);
  border-radius:5px;
  padding:10px 36px 10px 12px;
  min-height:42px}
input{
  accent-color:var(--result)}
.topbar{
  max-width:1600px;
  margin:auto;
  padding:20px 36px;
  border-bottom:1px solid var(--line);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px}
.brand{
  display:flex;
  gap:12px;
  align-items:center;
  font-size:22px;
  font-weight:650}
.brand-symbol{
  font-family:Consolas,monospace;
  color:var(--result);
  font-size:25px;
  font-weight:400}
.brand small{
  display:inline-block;
  margin-left:12px;
  color:var(--muted);
  font-size:13px;
  font-weight:400}
.source-link{
  font-size:13px;
  color:var(--muted)}
.source-link:hover{
  color:var(--text)}
main{
  max-width:1600px;
  margin:auto;
  padding:28px 36px 0}
.intro{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  margin-bottom:27px}
.intro h1{
  font-size:28px;
  font-weight:620;
  letter-spacing:.01em;
  margin:0 0 10px}
.intro p{
  max-width:76ch;
  color:var(--muted);
  line-height:1.8;
  margin:0}
.version{
  white-space:nowrap;
  font-size:12px;
  color:var(--muted);
  padding:7px 10px;
  border:1px solid var(--line);
  border-radius:4px}
.toolbar{
  display:flex;
  align-items:center;
  gap:22px;
  margin-bottom:17px}
.preset-control{
  display:flex;
  align-items:center;
  gap:12px}
.preset-control label,.check{
  color:var(--muted);
  font-size:13px}
.check{
  display:flex;
  gap:7px;
  align-items:center}
.check input{
  width:16px;
  height:16px;
  margin:0}
.primary{
  background:#76d9c2;
  color:#082a28;
  border-color:#76d9c2;
  font-weight:650;
  margin-left:auto;
  min-width:160px}
.primary:hover{
  background:#9cebd8}
kbd{
  font:11px Consolas,monospace;
  opacity:.7;
  padding-left:15px}
.editors{
  display:grid;
  grid-template-columns:1fr 1fr 1fr;
  gap:16px}
.editor-panel,.output-panel,.rules-panel{
  min-width:0;
  border:1px solid var(--line);
  background:var(--panel);
  border-radius:8px;
  overflow:hidden}
.panel-heading{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:13px 16px;
  border-bottom:1px solid var(--line);
  min-height:51px}
.panel-heading h2{
  font-size:14px;
  font-weight:600;
  margin:0;
  display:flex;
  align-items:center;
  gap:9px}
.panel-heading>span{
  font-size:11px;
  color:var(--muted)}
.dot{
  width:7px;
  height:7px;
  border-radius:50%;
  background:var(--source)}
.target-panel .dot{
  background:var(--target)}
.data-panel .dot{
  background:var(--result)}
textarea{
  display:block;
  width:100%;
  border:0;
  resize:vertical;
  min-height:230px;
  height:230px;
  padding:17px;
  color:var(--text);
  background:transparent;
  line-height:1.7;
  font-family:Consolas,'Cascadia Code','Microsoft YaHei',monospace;
  font-size:13px;
  tab-size:2;
  caret-color:var(--result);
  border-radius:0}
textarea:focus-visible{
  outline-offset:-3px}
.panel-foot{
  color:var(--muted);
  font-size:11px;
  margin:0;
  padding:10px 16px;
  border-top:1px solid #213448}
.status{
  display:flex;
  gap:12px;
  align-items:center;
  line-height:1.7;
  min-height:50px;
  padding:12px 3px;
  font-size:12px;
  color:var(--muted);
  overflow-wrap:anywhere}
.status.success{
  color:var(--result)}
.status.error{
  color:#ffb7ad}
.status.pending{
  color:#e2ce92}
.results{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  gap:16px}
.output-panel pre{
  margin:0;
  padding:17px 20px;
  color:var(--result);
  line-height:1.65;
  font-size:13px;
  font-family:Consolas,'Cascadia Code','Microsoft YaHei',monospace;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  min-height:222px;
  max-height:365px;
  overflow:auto}
.quiet{
  min-height:29px;
  padding:4px 10px;
  border:0;
  background:#21364a;
  font-size:11px}
.legend{
  display:flex;
  gap:18px;
  padding:10px 16px;
  color:var(--muted);
  font-size:11px}
.legend span{
  display:flex;
  align-items:center;
  gap:5px}
.legend i{
  display:inline-block;
  width:6px;
  height:6px;
  border-radius:50%;
  background:var(--source)}
.legend .constant-mark{
  background:var(--target)}
.rule-list{
  max-height:260px;
  overflow:auto;
  padding:0 16px 12px}
.rule{
  display:grid;
  grid-template-columns:minmax(0,1fr) 17px minmax(0,1fr);
  gap:8px;
  align-items:start;
  padding:8px 0;
  border-bottom:1px solid #223649;
  font-family:Consolas,'Cascadia Code',monospace;
  font-size:11px;
  line-height:1.5}
.rule:last-child{
  border-bottom:0}
.rule code{
  color:var(--source);
  overflow-wrap:anywhere}
.rule .destination{
  color:var(--muted)}
.rule.constant code:first-child{
  color:var(--target)}
.rule .arrow{
  color:#59778d}
.help{
  margin:24px 0 28px;
  color:var(--muted);
  font-size:12px;
  line-height:1.8}
.help summary{
  cursor:pointer;
  color:var(--text);
  padding:4px 0}
.help>div{
  padding:2px 0;
  max-width:95ch}
.help code{
  color:var(--target);
  font-family:Consolas,monospace}
footer{
  max-width:1600px;
  margin:auto;
  padding:0 36px 24px;
  color:#8ca3b7;
  font-size:11px;
  display:flex;
  justify-content:space-between;
  gap:18px}
footer a{
  color:var(--source)}
.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}
@media(min-width:1550px){
  textarea{
  height:260px}
}
@media(max-width:900px){
  .topbar{
  padding:17px 22px}
main{
  padding:25px 22px 0}
.intro{
  align-items:flex-start}
.version{
  display:none}
.editors{
  grid-template-columns:1fr}
.editor-panel textarea{
  height:180px;
  min-height:150px}
.results{
  grid-template-columns:1fr}
footer{
  padding:0 22px 22px}
.panel-heading>span{
  font-size:12px}
.toolbar{
  gap:14px;
  flex-wrap:wrap}
.primary{
  margin-left:auto}
.intro h1{
  font-size:25px}
}
@media(max-width:500px){
  .topbar{
  padding:17px}
.brand{
  font-size:21px}
.brand small{
  display:none}
main{
  padding:23px 17px 0}
.intro{
  margin-bottom:20px}
.intro p{
  font-size:13px;
  line-height:1.8}
.toolbar{
  gap:14px}
.preset-control{
  width:100%;
  justify-content:space-between}
.preset-control select{
  flex:1;
  max-width:230px}
.primary{
  min-width:153px;
  padding:10px 13px}
.panel-heading{
  padding:12px 14px}
.panel-heading>span{
  font-size:11px}
textarea{
  font-size:13px}
.editors{
  gap:14px}
.results{
  gap:14px}
.rule-list{
  max-height:320px}
footer{
  display:block;
  padding:0 17px 22px;
  line-height:1.8}
footer a{
  display:block;
  margin-top:8px}
}
@media(prefers-reduced-motion:reduce){
  *{
  scroll-behavior:auto}
}
