/* eml-lab.css — EML compiler playground, matched to the Tranquility post/light theme. */
.eml-lab{
  --accent:#8B0000; --accent-2:#A0252A; --gold:#D4AF37;
  font-family:'Space Grotesk','Noto Sans TC','PingFang TC',-apple-system,sans-serif;
  background:rgba(255,255,255,0.92);
  -webkit-backdrop-filter:blur(20px); backdrop-filter:blur(20px);
  border:1px solid rgba(139,0,0,0.12); border-radius:16px;
  box-shadow:0 4px 24px rgba(0,0,0,0.06), 0 0 0 1px rgba(0,0,0,0.04);
  padding:28px 30px; margin:2.4em 0; color:#333;
}
.eml-lab__head{display:flex; align-items:baseline; gap:12px; flex-wrap:wrap; margin-bottom:18px;}
.eml-lab__title{
  font-family:'Playfair Display','Noto Serif TC',serif; font-weight:700;
  font-size:1.35em; color:var(--accent); margin:0; letter-spacing:.01em;
}
.eml-lab__sub{font-family:'Inconsolata','Source Code Pro',monospace; font-size:.85em; color:#999;}
.eml-lab__io{display:flex; align-items:center; gap:10px; flex-wrap:wrap;}
.eml-lab__prompt{font-family:'Inconsolata',monospace; color:var(--accent); font-weight:600; font-size:1.05em;}
.eml-lab__input{
  flex:1; min-width:220px; font-family:'Inconsolata','Source Code Pro',monospace; font-size:1.05em;
  color:#1a1a1a; background:#fff; border:1px solid rgba(0,0,0,0.14);
  border-radius:10px; padding:11px 14px; outline:none; transition:border-color .2s ease-out, box-shadow .2s ease-out;
}
.eml-lab__input:focus{border-color:var(--accent); box-shadow:0 0 0 3px rgba(139,0,0,0.08);}
.eml-lab.is-error .eml-lab__input{border-color:var(--accent-2); box-shadow:0 0 0 3px rgba(160,37,42,0.1);}
.eml-lab__chips{display:flex; flex-wrap:wrap; gap:8px; margin:14px 0 4px;}
.eml-chip{
  font-family:'Inconsolata',monospace; font-size:.82em; color:var(--accent);
  background:rgba(139,0,0,0.04); border:1px solid rgba(139,0,0,0.2);
  border-radius:999px; padding:5px 12px; cursor:pointer;
  transition:transform .15s ease-out, background .2s ease-out, color .2s ease-out;
}
.eml-chip:hover{transform:translateY(-1px); background:rgba(139,0,0,0.09);}
.eml-chip.is-active{background:var(--accent); color:#fff; border-color:var(--accent);}
.eml-lab__msg{color:var(--accent-2); font-size:.86em; min-height:1.2em; margin:8px 0 0;}
.eml-lab__stats{display:flex; gap:14px; flex-wrap:wrap; margin:20px 0 4px;}
.eml-stat{
  flex:1; min-width:100px; text-align:center; padding:14px 10px;
  background:rgba(139,0,0,0.025); border:1px solid rgba(139,0,0,0.1); border-radius:12px;
}
.eml-stat__num{
  font-family:'Playfair Display',serif; font-weight:700; font-size:1.9em; line-height:1;
  color:var(--accent); font-variant-numeric:tabular-nums;
}
.eml-stat__label{display:block; margin-top:6px; font-size:.72em; letter-spacing:.06em; color:#7f8c8d; text-transform:uppercase;}
.eml-term{
  margin-top:18px; background:#1e1e1e; border-radius:12px; overflow:hidden;
  box-shadow:0 8px 32px rgba(0,0,0,0.12), 0 0 0 1px rgba(255,255,255,0.06);
}
.eml-term__bar{background:#2a2a2a; padding:11px 14px; display:flex; align-items:center; gap:8px;}
.eml-term__dot{width:12px; height:12px; border-radius:50%; background:#ff5f56;}
.eml-term__dot:nth-child(2){background:#ffbd2e;} .eml-term__dot:nth-child(3){background:#27ca3f;}
.eml-term__name{margin-left:8px; font-family:'Inconsolata',monospace; font-size:.8em; color:#6e7681;}
.eml-term__body{padding:16px 18px; display:flex; flex-direction:column; gap:14px;}
.eml-term__section{display:flex; flex-direction:column; gap:5px;}
.eml-term__label{font-family:'Inconsolata',monospace; font-size:.72em; letter-spacing:.08em; text-transform:uppercase; color:var(--gold);}
.eml-term__pre{
  margin:0; font-family:'Inconsolata','Source Code Pro',monospace; font-size:.82em; line-height:1.55;
  color:#e6edf3; white-space:pre; overflow-x:auto; max-height:260px; overflow-y:auto;
}
.eml-term__pre[data-out="nested"],.eml-term__pre[data-out="rpn"]{white-space:pre-wrap; word-break:break-all;}
.eml-eval{
  margin-top:16px; padding:14px 18px; border-radius:12px;
  background:linear-gradient(135deg, rgba(139,0,0,0.05), rgba(212,175,55,0.06));
  border:1px solid rgba(139,0,0,0.12); display:flex; align-items:baseline; gap:10px; flex-wrap:wrap;
}
.eml-eval__k{font-family:'Inconsolata',monospace; font-size:.82em; color:#7f8c8d;}
.eml-eval__expr{font-family:'Inconsolata',monospace; font-size:.82em; color:#555;}
.eml-eval__arrow{color:var(--gold); font-weight:700;}
.eml-eval__val{font-family:'Playfair Display',serif; font-weight:700; font-size:1.25em; color:var(--accent);}
.eml-lab__foot{margin:14px 0 0; font-size:.8em; color:#999; line-height:1.6;}
.eml-lab__foot code{background:rgba(0,0,0,0.05); color:var(--accent); padding:1px 5px; border-radius:4px; font-family:'Inconsolata',monospace;}
@media (max-width:560px){
  .eml-lab{padding:22px 18px;}
  .eml-stat__num{font-size:1.5em;}
}
