.sp-note{margin-bottom:16px}
.top-actions{margin-bottom:22px}
.field-stack{display:grid;gap:14px}
.sp-rows{display:grid;gap:12px;margin:6px 0 12px}
.sp-row{grid-template-columns:minmax(0,1fr) minmax(0,2fr);align-items:start}
.sp-row legend{font-size:.95rem}
.sp-row .sp-notes{grid-row:span 2}
.sp-row .sp-remove{justify-self:start}
#sources .sp-row{grid-template-columns:minmax(0,2fr) minmax(0,1.3fr) minmax(0,1fr)}
#sources .sp-remove{grid-column:1/-1}
.ai-panel>p{margin-bottom:10px}
.ai-panel .note{margin-bottom:12px}
.ai-actions{margin:6px 0 12px}
.sp-prompts{list-style:none;display:grid;gap:14px}
.sp-prompt{border:1px solid var(--line);border-radius:10px;padding:12px 14px;background:#fbfbfd}
.sp-prompt-head{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:8px}
.sp-prompt-head h3{margin:0}
.sp-prompt-text{white-space:pre-wrap;word-break:break-word;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:.86rem;line-height:1.5;color:var(--ink)}
.sheet-panel .check{margin:4px 0 8px}
.out-buttons{margin:10px 0 18px}
.sheet{background:#fff;border:1px solid var(--line);border-radius:8px;padding:24px;font-size:.95rem}
.sh-title{font-family:Merriweather,Georgia,serif;font-size:1.25rem;margin-bottom:10px}
.sh-sec{margin-top:16px}
.sh-sec h4{color:var(--navy);font-size:1.02rem;border-bottom:1px solid var(--line);padding-bottom:3px;margin-bottom:6px}
.sh-label{font-weight:700;color:var(--navy);font-size:.9rem;margin-top:8px}
.sheet .pre{white-space:pre-wrap;word-break:break-word;margin:2px 0}
.sheet ul{margin:4px 0 4px 22px;display:grid;gap:2px}
.sh-words dt{font-weight:700;margin-top:8px}
.sh-words dd{margin:2px 0 0 18px}
.blank-lines span{display:block;height:1.9em;border-bottom:1px solid #9aa3ae}
.sh-foot{margin-top:22px;font-size:.82rem;color:var(--muted);border-top:1px solid var(--line);padding-top:10px}
.sh-empty{margin-top:6px}
@media(max-width:860px){
  .sp-row,#sources .sp-row{grid-template-columns:1fr}
  .sp-row .sp-notes{grid-row:auto}
}
@media print{
  .sheet{border:0;padding:0;font-size:11pt}
  .sh-sec h4{break-after:avoid;border-bottom-color:#000}
  .sheet li,.sh-words dt{break-inside:avoid}
  .blank-lines span{border-bottom-color:#555}
  .sh-foot{color:#333}
}
