/* === Global layout & typography === */
body{
  font-family:"Nunito",-apple-system,BlinkMacSystemFont,"Segoe UI",
              Roboto,Helvetica,Arial,sans-serif;
  background:#f5f7fa;
  margin:0;
  padding:2rem;
  display:flex;
  justify-content:center;
}

.container{
  max-width:820px;
  width:100%;
  background:#fff;
  border:1px solid #eceff3;
  border-radius:8px;
  box-shadow:0 4px 16px rgba(0,0,0,.07);
  padding:2rem;
}

/* === Headings === */
h1{margin:0 0 1rem;font-size:1.9rem;font-weight:700;}
h2{margin:2rem 0 .75rem;font-size:1.25rem;font-weight:600;}

/* === Buttons & labels === */
.btn{
  display:inline-block;
  background:#0056ff;
  color:#fff;
  border:none;
  padding:.6rem 1.4rem;
  border-radius:4px;
  font-weight:600;
  cursor:pointer;
  transition:background .2s ease;
  text-align:center;
  text-decoration:none;
}
.btn:hover{background:#0042c4;}
.btn:disabled{opacity:.6;cursor:not-allowed;}

.file-name{
  margin-left:.75rem;
  font-size:.9rem;
  color:#555;
}

/* === Extraction progress === */
#extractProgress{margin:1rem 0;line-height:1.4;}
.spinner{
  display:inline-block;
  width:18px;height:18px;margin-right:.6rem;
  border:3px solid #d0d5ff;
  border-top-color:#0056ff;
  border-radius:50%;
  animation:spin .8s linear infinite;
  vertical-align:middle;
}
@keyframes spin{to{transform:rotate(360deg)}}

/* === AI report Markdown box === */
.report-box{
  background:#fafafa;
  border:1px solid #e1e4e8;
  border-radius:4px;
  padding:1rem 1.25rem;
  max-height:600px;
  overflow:auto;
  line-height:1.55;
}
.report-box h3{
  margin:1.25rem 0 .5rem;
  font-size:1.05rem;
  font-weight:700;
}
.report-box h4{
  margin:1rem 0 .4rem;
  font-size:.95rem;
  font-weight:600;
}
.report-box ul{padding-left:1.2rem;margin:.4rem 0;}
.report-box li{margin:.2rem 0;}
.report-box code{
  font-family:ui-monospace,SFMono-Regular,Menlo,monospace;
  background:#eef1f5;
  padding:2px 4px;
  border-radius:3px;
}

/* === Responsive tweak === */
@media(max-width:480px){
  .btn{width:100%;margin-top:.5rem;}
  .file-name{display:block;margin:.5rem 0 0;}
}

/* === Utility === */
.hidden{display:none;}
