.multi-layout{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(340px,1fr));
  gap:24px;
  margin-bottom:28px;
}

.controls-card h3,
.results-card h3{
  font-family:'Fredoka',sans-serif;
  color:var(--gold);
  margin-bottom:16px;
}

.split{
  display:flex;
  gap:10px;
}

.split input{
  flex:1 1 60%;
}

.split select{
  flex:1 1 40%;
}

.toggle-pill-group{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.toggle-pill{
  flex:1 1 110px;
  border:1px solid var(--light-gray);
  border-radius:999px;
  background:var(--medium-gray);
  padding:10px 12px;
  color:var(--cream);
  font-family:'Fredoka',sans-serif;
  cursor:pointer;
  transition:all .2s ease;
}

.toggle-pill.active{
  background:var(--gold);
  color:var(--black);
  border-color:var(--gold);
}

.summary-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(160px,1fr));
  gap:16px;
  margin-bottom:18px;
}

.summary-item{
  background:#1c1c1c;
  border:1px solid var(--light-gray);
  border-radius:14px;
  padding:16px;
  text-align:center;
}

.summary-item .label{
  font-size:.85em;
  letter-spacing:.08em;
  text-transform:uppercase;
  opacity:.7;
}

.summary-item strong{
  font-size:1.6em;
  margin-top:6px;
  display:block;
  font-family:'JetBrains Mono',monospace;
  color:var(--mint);
}

.detail-panel{
  border:1px dashed var(--light-gray);
  border-radius:14px;
  padding:18px;
  min-height:140px;
  background:#101010;
  line-height:1.5;
}

.detail-panel p{
  margin-bottom:10px;
}

.detail-panel ul{
  margin:0;
  padding-left:20px;
}

.history{
  margin-top:28px;
  background:var(--dark-gray);
  border:1px solid var(--light-gray);
  border-radius:16px;
  padding:24px;
}

.history-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
}

.history-list{
  margin-top:18px;
  border:1px dashed var(--light-gray);
  border-radius:14px;
  padding:16px;
  max-height:320px;
  overflow:auto;
}

.history-entry{
  border:1px solid rgba(251,139,36,.4);
  border-radius:12px;
  padding:12px;
  margin-bottom:12px;
  background:#151515;
}

.history-entry:last-child{margin-bottom:0}

.history-entry h4{
  font-family:'Fredoka',sans-serif;
  color:var(--gold);
  margin-bottom:6px;
}

.history-entry ul{
  list-style:none;
  padding-left:0;
  display:flex;
  flex-wrap:wrap;
  gap:14px;
  font-size:.95em;
}

@media(max-width:640px){
  .split{flex-direction:column}
  .toggle-pill{flex:1 1 auto}
}
