*{
  box-sizing:border-box;
}

html,
body{
  margin:0;
  padding:0;
}

body{
  background:#f4f5f7;
  color:#1f2933;
  font-family:Arial,Helvetica,sans-serif;
}


/* HEADER */

.topbar{
  height:68px;
  background:#fff;
  border-bottom:1px solid #d9dde2;
}

.topbar-inner{
  max-width:1180px;
  height:100%;
  margin:auto;
  padding:0 28px;

  display:flex;
  align-items:center;
  justify-content:space-between;
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
}

.brand-logo{
  width:36px;
  height:36px;

  background:#20252a;
  color:#fff;

  border-radius:5px;

  display:flex;
  align-items:center;
  justify-content:center;

  font-size:14px;
  font-weight:700;
}

.brand-name{
  font-size:18px;
  font-weight:500;
  color:#20252a;
}

.top-actions{
  display:flex;
  gap:10px;
}


/* BUTTONS */

.btn{
  border:1px solid #c8cdd3;
  border-radius:5px;

  padding:9px 15px;

  font-size:13px;
  cursor:pointer;
}

.btn-secondary{
  background:#fff;
  color:#30363b;
}

.btn-dark{
  background:#252a2f;
  color:#fff;
  border-color:#252a2f;
}

.btn:disabled{
  opacity:.45;
  cursor:not-allowed;
}


/* MAIN */

.container{
  max-width:1180px;
  margin:40px auto;
  padding:0 24px;
}


/* UPLOAD CARD */

.upload-card{
  max-width:900px;

  margin:0 auto;

  background:#fff;

  border:1px solid #d9dee3;

  box-shadow:0 3px 12px rgba(0,0,0,.05);

  padding:46px 50px;
}

.eyebrow{
  font-size:11px;
  font-weight:700;

  letter-spacing:1.3px;

  color:#737b84;

  margin-bottom:11px;
}

h1{
  margin:0 0 12px;

  font-size:34px;
  line-height:1.2;

  color:#161b20;
}

.description{
  margin:0 0 32px;

  color:#69737d;

  font-size:15px;
  line-height:1.6;
}


/* DROP ZONE */

.drop-zone{
  min-height:205px;

  border:2px dashed #b6bdc5;
  border-radius:8px;

  background:#fafbfc;

  padding:35px;

  display:flex;
  align-items:center;
  justify-content:center;

  gap:20px;

  transition:.2s;
}

.drop-zone:hover,
.drop-zone.dragging{
  border-color:#5e666e;
  background:#f5f6f8;
}

.upload-icon{
  width:58px;
  height:58px;

  border:1px solid #d2d7dc;

  background:#fff;

  border-radius:7px;

  display:flex;
  align-items:center;
  justify-content:center;

  flex-shrink:0;
}

.upload-icon svg{
  width:28px;
  height:28px;

  fill:none;
  stroke:#525a62;

  stroke-width:1.7;

  stroke-linecap:round;
  stroke-linejoin:round;
}

.upload-content{
  min-width:260px;
}

.upload-title{
  font-size:16px;
  font-weight:700;

  margin-bottom:7px;
}

.upload-subtitle{
  font-size:12px;
  color:#737c85;
}

.upload-subtitle span{
  margin:0 5px;
}

.choose-btn{
  margin-left:auto;

  padding:11px 20px;

  background:#252a2f;

  color:#fff;

  border:0;
  border-radius:5px;

  font-size:13px;
  font-weight:600;

  cursor:pointer;
}

.choose-btn:hover{
  background:#111519;
}


/* SELECTED FILE */

.selected-file{
  margin-top:15px;

  padding:13px 15px;

  border:1px solid #d9dee3;

  border-radius:6px;

  background:#fff;

  display:flex;
  align-items:center;
}

.file-badge{
  width:44px;
  height:38px;

  border:1px solid #d1d6db;
  border-radius:5px;

  background:#f3f4f6;

  display:flex;
  align-items:center;
  justify-content:center;

  font-size:10px;
  font-weight:700;
}

.file-details{
  margin-left:13px;

  display:flex;
  flex-direction:column;

  gap:3px;

  min-width:0;
}

.file-name{
  font-size:13px;
  font-weight:700;

  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.file-size{
  font-size:11px;
  color:#777f87;
}

.remove-file{
  margin-left:auto;

  border:0;
  background:none;

  font-size:25px;

  color:#737b84;

  cursor:pointer;
}


/* CHECK AREA */

.check-area{
  margin-top:18px;

  display:flex;
  align-items:center;
  justify-content:space-between;
}

.status{
  font-size:12px;
  color:#69737c;
}

.status.success{
  color:#3d674b;
}

.status.error{
  color:#a13e3e;
}

.check-btn{
  padding:12px 25px;

  background:#252a2f;
  color:#fff;

  border:0;
  border-radius:5px;

  font-size:13px;
  font-weight:600;

  cursor:pointer;
}

.check-btn:disabled{
  opacity:.45;
  cursor:not-allowed;
}


/* REPORT */

.report{
  max-width:1180px;

  margin:0 auto;

  background:#fff;

  border:1px solid #d9dee3;

  box-shadow:0 3px 12px rgba(0,0,0,.05);
}

.report-header{
  padding:35px 40px;

  border-bottom:1px solid #d9dee3;

  display:flex;
  justify-content:space-between;
}

h2{
  margin:0 0 7px;

  font-size:28px;

  color:#171c21;
}

.date-line{
  font-size:11px;
  color:#7b838b;
}

.report-id{
  text-align:right;

  font-size:9px;

  letter-spacing:1.2px;

  color:#858d95;
}

.report-id strong{
  display:block;

  margin-top:7px;

  color:#333a40;

  font-size:12px;

  letter-spacing:.2px;
}


/* SCORES */

.scores{
  display:grid;

  grid-template-columns:repeat(3,1fr);

  border-bottom:1px solid #d9dee3;
}

.score-box{
  padding:29px 31px;

  border-right:1px solid #d9dee3;
}

.score-box:last-child{
  border-right:0;
}

.score-title{
  font-size:13px;
  font-weight:700;
  color:#444b52;
}

.score-number{
  margin:10px 0 12px;

  font-size:50px;
  font-weight:400;

  color:#22282d;
}

.score-number small{
  font-size:20px;
  margin-left:2px;
}

.progress{
  height:5px;

  background:#e7eaed;
}

.progress span{
  display:block;

  height:100%;

  background:#4d555d;

  width:0;
}

.score-box p{
  margin:10px 0 0;

  font-size:10.5px;

  line-height:1.5;

  color:#77808a;
}


/* REPORT SECTIONS */

.report-section{
  padding:28px 40px;

  border-bottom:1px solid #d9dee3;
}

.section-heading{
  display:flex;
  align-items:center;
  justify-content:space-between;

  margin-bottom:17px;
}

.section-heading h3{
  margin:0;

  font-size:15px;
}

.section-heading span{
  font-size:10.5px;
  color:#7b838b;
}


/* GROUPS */

.groups{
  display:grid;

  grid-template-columns:repeat(4,1fr);

  border:1px solid #d9dee3;
}

.group{
  padding:19px 16px;

  border-right:1px solid #d9dee3;
}

.group:last-child{
  border-right:0;
}

.group b{
  display:block;

  font-size:24px;
  font-weight:400;

  margin-bottom:6px;
}

.group span{
  font-size:11px;
  font-weight:700;
}

.group p{
  margin:7px 0 0;

  font-size:10px;

  line-height:1.5;

  color:#7b838b;
}


/* SOURCES */

.sources{
  border:1px solid #d9dee3;
}

.source{
  display:grid;

  grid-template-columns:32px 1fr 70px;

  gap:12px;

  align-items:center;

  padding:14px;

  border-bottom:1px solid #d9dee3;
}

.source:last-child{
  border-bottom:0;
}

.num{
  font-size:11px;
  color:#777f87;
}

.source-main a{
  color:#30363b;

  font-size:12px;

  text-decoration:none;
}

.source-main a:hover{
  text-decoration:underline;
}

.source-type{
  margin-top:4px;

  font-size:9.5px;

  color:#89919a;
}

.pct{
  text-align:right;

  font-size:12px;

  font-weight:700;
}


/* EMPTY */

.empty{
  padding:17px;

  border:1px dashed #cdd2d7;

  color:#7b838b;

  font-size:11px;
}


/* MATCHES */

.matches{
  display:flex;
  flex-direction:column;

  gap:9px;
}

.match{
  padding:15px;

  background:#fafbfc;

  border-left:4px solid #777e85;

  font-size:12px;

  line-height:1.55;
}

.match-meta{
  margin-top:7px;

  font-size:10px;

  color:#7c858e;
}

.match-meta a{
  color:#505860;
}


/* AI */

.ai-note{
  padding:15px;

  border:1px solid #d9dee3;

  background:#fafbfc;

  font-size:12px;

  line-height:1.6;
}

.ai-segments{
  margin-top:10px;
}

.ai-seg{
  padding:13px 15px;

  border-left:4px solid #777e85;

  background:#f8f9fa;

  margin-bottom:7px;

  font-size:11.5px;

  line-height:1.55;
}


/* SUBMITTED */

.document-name{
  margin:-4px 0 10px;

  font-size:11px;

  font-weight:700;

  color:#555d65;
}

.submitted-text{
  white-space:pre-wrap;

  font-size:11.5px;

  line-height:1.75;

  border:1px solid #d9dee3;

  padding:18px;

  max-height:550px;

  overflow:auto;
}


/* DISCLAIMER */

.disclaimer{
  padding:21px 40px;

  background:#fafbfc;
}

.disclaimer strong{
  font-size:10px;
}

.disclaimer p{
  margin:7px 0 0;

  font-size:9.5px;

  line-height:1.6;

  color:#6e7780;
}


/* HIDDEN */

.hidden{
  display:none !important;
}


/* MOBILE */

@media(max-width:760px){

  .topbar-inner{
    padding:0 13px;
  }

  .brand-name{
    font-size:15px;
  }

  .top-actions .btn-secondary{
    display:none;
  }

  .container{
    margin:20px auto;
    padding:0 10px;
  }

  .upload-card{
    padding:28px 20px;
  }

  h1{
    font-size:28px;
  }

  .drop-zone{
    flex-wrap:wrap;
    justify-content:flex-start;
  }

  .upload-content{
    min-width:0;
    flex:1;
  }

  .choose-btn{
    margin-left:0;
    width:100%;
  }

  .check-area{
    gap:12px;
  }

  .scores{
    grid-template-columns:1fr;
  }

  .score-box{
    border-right:0;
    border-bottom:1px solid #d9dee3;
  }

  .score-box:last-child{
    border-bottom:0;
  }

  .groups{
    grid-template-columns:1fr;
  }

  .group{
    border-right:0;
    border-bottom:1px solid #d9dee3;
  }

  .group:last-child{
    border-bottom:0;
  }

  .report-header,
  .report-section{
    padding:22px 19px;
  }

  .report-id{
    display:none;
  }

  .disclaimer{
    padding:20px;
  }

}


/* PRINT / PDF */

@media print{

  @page{
    size:A4;
    margin:15mm;
  }

  body{
    background:#fff;
  }

  .topbar,
  #inputView{
    display:none !important;
  }

  .container{
    max-width:none;
    margin:0;
    padding:0;
  }

  .report{
    border:0;
    box-shadow:none;
  }

  .report-section,
  .score-box,
  .group,
  .source,
  .match{
    break-inside:avoid;
  }

  .submitted-text{
    max-height:none;
    overflow:visible;
  }

}