.math-main-layout{
  display:grid;
  grid-template-columns:minmax(0,1.35fr) 380px;
  gap:24px;
  align-items:start;
}
.math-left-column{
  display:grid;
  gap:24px;
  min-width:0;
}
.math-three-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:24px;
  align-items:start;
}
.math-app-card,
.math-side-card,
.math-result-card,
.math-history-card,
.math-popular-card,
.math-related-card,
.math-generator-card,
.math-dashboard-card{
  padding:24px;
}
.math-side-card{
  position:sticky;
  top:96px;
}
.math-form{
  display:grid;
  gap:14px;
}
.math-actions{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}
.math-result-box{
  display:grid;
  gap:14px;
  margin-top:12px;
}
.math-result-row{
  padding:14px 16px;
  border-radius:14px;
  background:rgba(255,255,255,.03);
  border:1px solid rgba(255,255,255,.07);
  color:#dfe9ff;
  line-height:1.8;
}
.math-result-answer{
  align-items:start;
}
#math-answer{
  margin-top:8px;
  white-space:pre-wrap;
  word-break:break-word;
  line-height:1.8;
}
.math-history-list{
  display:grid;
  gap:14px;
  margin-top:18px;
}
.math-history-item,
.math-generated-item{
  padding:16px 18px;
  border-radius:16px;
  background:rgba(255,255,255,.03);
  border:1px solid rgba(255,255,255,.07);
}
.math-history-top,
.math-generated-head{
  display:flex;
  justify-content:space-between;
  gap:12px;
  margin-bottom:8px;
  color:#dfe9ff;
}
.math-history-question,
.math-generated-question{
  line-height:1.85;
  color:#f4f8ff;
}
.math-history-date,
.math-generated-answer,
.math-generated-solution{
  margin-top:10px;
  font-size:14px;
  color:#c2d4f0;
  line-height:1.8;
}
.math-feedback-bar{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
}
.math-feedback-message{
  color:#b9cff2;
  font-size:14px;
}
.math-generator-form{
  display:grid;
  grid-template-columns:1fr 1fr auto;
  gap:16px;
  align-items:end;
}
.math-generated-box{
  margin-top:18px;
}
.math-select{
  background:#102544 !important;
  color:#f4f8ff !important;
  border-color:rgba(255,255,255,.10) !important;
}
.math-select option{
  background:#102544;
  color:#f4f8ff;
}
.math-select:focus{
  background:#102544 !important;
  color:#f4f8ff !important;
}
.math-skill-accordion{
  margin-top:18px;
  display:grid;
  gap:12px;
}
.math-skill-accordion details{
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.03);
  border-radius:16px;
  overflow:hidden;
}
.math-skill-accordion summary{
  list-style:none;
  cursor:pointer;
  padding:16px 18px;
  font-weight:700;
  color:#f4f8ff;
  position:relative;
}
.math-skill-accordion summary::-webkit-details-marker{
  display:none;
}
.math-skill-accordion summary::after{
  content:"+";
  position:absolute;
  right:18px;
  top:50%;
  transform:translateY(-50%);
  color:#a9c0e8;
  font-size:20px;
}
.math-skill-accordion details[open] summary::after{
  content:"–";
}
.math-skill-content{
  padding:0 18px 18px;
}
.math-skill-content .feature-list{
  margin:0;
}
.math-option-list{
  display:grid;
  gap:8px;
  margin-top:12px;
}
.math-option-item{
  padding:10px 12px;
  border-radius:10px;
  background:rgba(255,255,255,.03);
  border:1px solid rgba(255,255,255,.07);
  color:#d8e7ff;
}
.math-visual-box{
  margin-top:14px;
  padding:14px;
  border-radius:14px;
  background:rgba(255,255,255,.03);
  border:1px solid rgba(255,255,255,.07);
}
.tp-svg-visual{
  width:100%;
  max-width:360px;
  height:auto;
  display:block;
}
.math-answer-key-box{
  display:none;
  margin-top:18px;
  padding:18px;
  border-radius:16px;
  background:rgba(255,255,255,.03);
  border:1px solid rgba(255,255,255,.07);
}
.math-answer-key-grid{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:10px;
  margin-top:12px;
}
.math-answer-key-item{
  padding:12px;
  border-radius:12px;
  background:rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.08);
  text-align:center;
  color:#fff;
}
.math-dashboard-box{
  display:grid;
  gap:12px;
  margin-top:16px;
}
@media (max-width:1180px){
  .math-three-grid{
    grid-template-columns:1fr;
  }
}
@media (max-width:1100px){
  .math-main-layout{
    grid-template-columns:minmax(0,1fr) 340px;
  }
}
@media (max-width:980px){
  .math-main-layout{
    grid-template-columns:1fr;
  }
  .math-side-card{
    position:static;
    order:-1;
  }
  .math-generator-form{
    grid-template-columns:1fr;
  }
}
@media (max-width:760px){
  .math-answer-key-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}