/* Homepage hero entry for the AFCAT score calculator */
.home-landing .home-hero-score-card{
  position: relative;
  overflow: hidden;
  flex: 0 0 clamp(440px, 38vw, 470px);
  min-width: 440px;
  min-height: 76px;
  padding: 11px 14px;
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(255, 212, 108, 0.72);
  border-radius: 20px;
  background:
    radial-gradient(circle at 8% 0%, rgba(255, 255, 255, 0.28), transparent 38%),
    linear-gradient(135deg, rgba(255, 247, 221, 0.98), rgba(247, 191, 58, 0.97));
  color: #071225;
  text-decoration: none;
  box-shadow:
    0 18px 38px rgba(247, 185, 56, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.64);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.home-landing .home-hero-score-card::before{
  content: "";
  position: absolute;
  inset: -55% auto -55% -26%;
  width: 25%;
  transform: rotate(16deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.46), transparent);
  transition: left 420ms ease;
  pointer-events: none;
}

.home-landing .home-hero-score-card:hover{
  transform: translateY(-2px);
  border-color: rgba(255, 225, 144, 0.95);
  box-shadow:
    0 24px 46px rgba(247, 185, 56, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.home-landing .home-hero-score-card:hover::before{
  left: 112%;
}

.home-landing .home-hero-score-card:focus-visible{
  outline: 3px solid rgba(255, 226, 149, 0.88);
  outline-offset: 4px;
}

.home-landing .home-hero-score-card__icon{
  width: 50px;
  height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(7, 18, 37, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.66);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
  font-size: 24px;
}

.home-landing .home-hero-score-card__copy{
  min-width: 0;
}

.home-landing .home-hero-score-card__copy strong{
  display: block;
  color: #071225;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(24px, 2vw, 28px);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1;
  white-space: nowrap;
}

.home-landing .home-hero-score-card__action{
  display: inline-flex;
  align-items: center;
  margin-left: 10px;
  color: #071225;
}

.home-landing .home-hero-score-card__action i{
  font-size: 20px;
  transition: transform 180ms ease;
}

.home-landing .home-hero-score-card:hover .home-hero-score-card__action i{
  transform: translateX(3px);
}

@media (max-width: 760px){
  .home-landing .home-hero-score-card{
    flex-basis: auto;
    width: min(100%, 370px);
    min-width: 0;
    min-height: 66px;
    padding: 8px 10px;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 8px;
    border-radius: 17px;
  }

  .home-landing .home-hero-score-card__action{
    margin-left: 0;
  }

  .home-landing .home-hero-score-card__icon{
    width: 42px;
    height: 42px;
    border-radius: 13px;
    font-size: 20px;
  }

  .home-landing .home-hero-score-card__copy strong{
    font-size: 20px;
  }

  .home-landing .home-hero-score-card__action i{
    font-size: 18px;
  }
}

@media (max-width: 360px){
  .home-landing .home-hero-score-card{
    min-height: 62px;
    padding: 7px 8px;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px;
  }

  .home-landing .home-hero-score-card__icon{
    display: none;
  }

  .home-landing .home-hero-score-card__copy strong{
    font-size: 18px;
  }

  .home-landing .home-hero-score-card__action i{
    font-size: 17px;
  }
}

@media (prefers-reduced-motion: reduce){
  .home-landing .home-hero-score-card,
  .home-landing .home-hero-score-card::before,
  .home-landing .home-hero-score-card__action i{
    transition: none;
  }
}

/* AFCAT response sheet score calculator page */
.afcat-score-calculator-page{
  --score-ink: #071225;
  --score-blue: #0b5dd7;
  --score-blue-soft: #eaf3ff;
  --score-green: #16834d;
  --score-red: #cf2525;
  --score-amber: #b46a0a;
  background:
    radial-gradient(circle at 12% 6%, rgba(11, 93, 215, 0.09), transparent 30%),
    linear-gradient(180deg, #f7faff 0%, #f8fafc 38%, #ffffff 100%);
}

.afcat-score-page{
  padding: 44px 0 80px;
}

.afcat-score-shell{
  width: min(92%, 1180px);
}

.afcat-score-heading{
  align-items: flex-start;
  margin-bottom: 28px;
}

.afcat-score-heading .cc-page-heading__copy{
  max-width: 780px;
}

.afcat-score-heading h1{
  margin-bottom: 10px;
  color: var(--score-ink);
  font-size: clamp(40px, 5.2vw, 68px);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.afcat-score-heading p{
  max-width: 650px;
  margin: 0;
  color: #536176;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.65;
}

.afcat-score-workspace{
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 22px;
}

.afcat-score-upload-card,
.afcat-score-scheme,
.afcat-score-result-card{
  border: 1px solid rgba(7, 18, 37, 0.09);
  box-shadow:
    0 24px 60px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.afcat-score-calculator-page .card.afcat-score-upload-card{
  padding: clamp(16px, 2vw, 22px);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
}

.afcat-score-card-head{
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.afcat-score-card-head__icon{
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(145deg, #176dde, #084cae);
  color: #ffffff;
  box-shadow: 0 14px 28px rgba(11, 93, 215, 0.23);
  font-size: 25px;
}

.afcat-score-card-head span,
.afcat-score-results__head > div > span,
.afcat-score-scheme__eyebrow{
  display: block;
  color: var(--score-blue);
  font-family: 'Poppins', sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.afcat-score-card-head h2{
  margin: 3px 0 0;
  color: var(--score-ink);
  font-family: 'Poppins', sans-serif;
  font-size: clamp(20px, 2.4vw, 27px);
  line-height: 1.15;
}

.afcat-score-form{
  display: grid;
  gap: 10px;
}

.afcat-score-dropzone{
  position: relative;
  min-height: 160px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 2px dashed rgba(11, 93, 215, 0.3);
  border-radius: 22px;
  background:
    radial-gradient(circle at 50% 10%, rgba(11, 93, 215, 0.08), transparent 40%),
    #f8fbff;
  cursor: pointer;
  transition: border-color 180ms ease, background-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.afcat-score-dropzone:hover,
.afcat-score-dropzone.is-dragging,
.afcat-score-dropzone:focus-within{
  border-color: var(--score-blue);
  background-color: #f0f7ff;
  box-shadow: 0 0 0 5px rgba(11, 93, 215, 0.08);
  transform: translateY(-1px);
}

.afcat-score-dropzone.has-file{
  min-height: 145px;
  border-style: solid;
  border-color: rgba(22, 131, 77, 0.38);
  background:
    radial-gradient(circle at 50% 10%, rgba(22, 131, 77, 0.09), transparent 40%),
    #f8fffb;
}

.afcat-score-dropzone.is-processing{
  pointer-events: none;
  opacity: 0.66;
}

.afcat-score-file-input{
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.afcat-score-dropzone__icon{
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  margin-bottom: 6px;
  border-radius: 22px;
  background: #ffffff;
  color: var(--score-blue);
  box-shadow: 0 16px 34px rgba(11, 93, 215, 0.13);
  font-size: 26px;
}

.afcat-score-dropzone__title{
  color: var(--score-ink);
  font-family: 'Poppins', sans-serif;
  font-size: 17px;
  font-weight: 800;
}

.afcat-score-dropzone__copy{
  margin-top: 3px;
  color: #6b778a;
  font-size: 13px;
  font-weight: 600;
}

.afcat-score-dropzone__action{
  margin-top: 9px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--score-blue-soft);
  color: var(--score-blue);
  font-size: 13px;
  font-weight: 800;
}

.afcat-score-file{
  padding: 13px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(22, 131, 77, 0.2);
  border-radius: 15px;
  background: #f6fdf9;
}

.afcat-score-file__icon{
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(22, 131, 77, 0.11);
  color: var(--score-green);
  font-size: 20px;
}

.afcat-score-file__copy{
  min-width: 0;
  flex: 1;
  display: grid;
}

.afcat-score-file__copy strong{
  overflow: hidden;
  color: #142033;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.afcat-score-file__copy small{
  color: #718096;
  font-size: 11px;
  font-weight: 700;
}

.afcat-score-file__ready{
  color: var(--score-green);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.afcat-score-privacy{
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 8px 12px;
  border-radius: 14px;
  background: #f4f7fb;
  color: #566579;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.4;
}

.afcat-score-privacy i{
  flex: 0 0 auto;
  color: var(--score-blue);
  font-size: 16px;
}

.afcat-score-submit{
  width: 100%;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 15px;
  font-size: 15px;
}

.afcat-score-submit:disabled{
  cursor: not-allowed;
  filter: grayscale(0.25);
  opacity: 0.5;
  transform: none;
}

.afcat-score-submit__loading{
  display: none;
}

.afcat-score-submit.is-loading .afcat-score-submit__label,
.afcat-score-submit.is-loading > i{
  display: none;
}

.afcat-score-submit.is-loading .afcat-score-submit__loading{
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.afcat-score-submit.is-loading .afcat-score-submit__loading::after{
  content: '';
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: afcat-score-spin 800ms linear infinite;
}

@keyframes afcat-score-spin{
  to{ transform: rotate(360deg); }
}

.afcat-score-progress{
  margin-top: 18px;
  padding: 15px;
  border: 1px solid rgba(11, 93, 215, 0.12);
  border-radius: 15px;
  background: #f6faff;
}

.afcat-score-progress__copy{
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
  color: #536176;
  font-size: 11px;
  font-weight: 700;
}

.afcat-score-progress__copy strong{
  color: var(--score-ink);
  font-size: 12px;
}

.afcat-score-progress__track{
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #dce8f8;
}

.afcat-score-progress__track span{
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0b5dd7, #3b92ff);
  transition: width 140ms ease;
}

.afcat-score-error{
  margin-top: 16px;
  padding: 13px 15px;
  border: 1px solid rgba(207, 37, 37, 0.18);
  border-radius: 14px;
  background: #fff5f5;
  color: #a91e1e;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

.afcat-score-calculator-page .card.afcat-score-scheme{
  position: sticky;
  top: 24px;
  padding: 26px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 100% 0%, rgba(11, 93, 215, 0.14), transparent 38%),
    linear-gradient(155deg, #071225, #0b1d37);
  color: #ffffff;
}

.afcat-score-scheme__eyebrow{
  color: #8dc2ff;
}

.afcat-score-scheme h2{
  margin: 8px 0 24px;
  font-family: 'Poppins', sans-serif;
  font-size: 26px;
  line-height: 1.18;
}

.afcat-score-scheme__rows{
  display: grid;
  gap: 12px;
}

.afcat-score-scheme__rows > div{
  padding: 13px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.06);
}

.afcat-score-scheme__rows > div > span{
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  font-size: 18px;
}

.afcat-score-scheme__rows .is-correct{
  background: rgba(64, 198, 75, 0.16);
  color: #67e174;
}

.afcat-score-scheme__rows .is-incorrect{
  background: rgba(255, 81, 81, 0.15);
  color: #ff7777;
}

.afcat-score-scheme__rows .is-unattempted{
  background: rgba(255, 184, 77, 0.15);
  color: #ffc56e;
}

.afcat-score-scheme__rows p{
  margin: 0;
  display: grid;
}

.afcat-score-scheme__rows strong{
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
}

.afcat-score-scheme__rows small{
  color: rgba(255, 255, 255, 0.64);
  font-size: 11px;
  font-weight: 600;
}

.afcat-score-results{
  margin-top: 28px;
  padding-top: 8px;
  scroll-margin-top: 96px;
}

.afcat-score-results__head{
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.afcat-score-results__head h2{
  margin: 3px 0 0;
  color: var(--score-ink);
  font-family: 'Poppins', sans-serif;
  font-size: clamp(25px, 3vw, 36px);
}

.afcat-score-reset{
  padding: 9px 13px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(7, 18, 37, 0.12);
  border-radius: 12px;
  background: #ffffff;
  color: #25344a;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  transition: border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.afcat-score-reset:hover{
  border-color: rgba(11, 93, 215, 0.32);
  color: var(--score-blue);
  transform: translateY(-1px);
}

.afcat-score-result-grid{
  display: grid;
  grid-template-columns: minmax(240px, 1.45fr) repeat(4, minmax(140px, 1fr));
  gap: 10px;
}

.afcat-score-calculator-page .card.afcat-score-result-card{
  min-height: 118px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 16px;
  background: #ffffff;
}

.afcat-score-result-card > span{
  color: #637086;
  font-size: 12px;
  font-weight: 800;
}

.afcat-score-result-card output{
  color: var(--score-ink);
  font-family: 'Poppins', sans-serif;
  font-size: 34px;
  font-weight: 800;
  line-height: 1;
}

.afcat-score-calculator-page .card.afcat-score-result-card--score{
  min-height: 142px;
  background:
    radial-gradient(circle at 88% 12%, rgba(255, 255, 255, 0.16), transparent 32%),
    linear-gradient(145deg, #0b5dd7, #073e91);
  color: #ffffff;
  box-shadow: 0 24px 54px rgba(11, 93, 215, 0.24);
}

.afcat-score-result-card--score > span{
  color: rgba(255, 255, 255, 0.76);
}

.afcat-score-result-card--score p{
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.afcat-score-result-card--score output{
  color: #ffffff;
  font-size: clamp(52px, 6vw, 64px);
}

.afcat-score-result-card--score small{
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
  font-weight: 800;
}

.afcat-score-result-card--correct{
  border-top: 4px solid var(--score-green);
}

.afcat-score-result-card--incorrect{
  border-top: 4px solid var(--score-red);
}

.afcat-score-result-card--unattempted{
  border-top: 4px solid var(--score-amber);
}

.afcat-score-result-card--attempted{
  border-top: 4px solid var(--score-blue);
}

.afcat-score-result-card--correct output{ color: var(--score-green); }
.afcat-score-result-card--incorrect output{ color: var(--score-red); }
.afcat-score-result-card--unattempted output{ color: var(--score-amber); }
.afcat-score-result-card--attempted output{ color: var(--score-blue); }

@media (max-width: 980px){
  .afcat-score-workspace{
    grid-template-columns: minmax(0, 1fr);
  }

  .afcat-score-result-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .afcat-score-result-card--score{
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px){
  .afcat-score-page{
    padding: 28px 0 58px;
  }

  .afcat-score-heading{
    gap: 18px;
  }

  body.afcat-score-calculator-page .afcat-score-heading .cc-page-heading__copy{
    flex-direction: column;
    gap: 12px;
  }

  .afcat-score-heading h1{
    font-size: clamp(38px, 12vw, 54px);
  }

  .afcat-score-workspace{
    grid-template-columns: 1fr;
  }

  .afcat-score-scheme{
    position: static;
  }
}

@media (max-width: 540px){
  .afcat-score-shell{
    width: min(92%, 680px);
  }

  .afcat-score-upload-card,
  .afcat-score-scheme{
    padding: 15px;
    border-radius: 20px;
  }

  .afcat-score-dropzone{
    min-height: 160px;
    padding: 16px 10px;
  }

  .afcat-score-progress__copy,
  .afcat-score-results__head{
    align-items: flex-start;
    flex-direction: column;
  }

  .afcat-score-result-grid{
    grid-template-columns: 1fr 1fr;
  }

  .afcat-score-result-card{
    min-height: 108px;
    padding: 14px;
  }

  .afcat-score-result-card > span{
    max-width: 13ch;
  }

  .afcat-score-result-card output{
    font-size: 32px;
  }

  .afcat-score-result-card--score{
    min-height: 132px;
  }

  .afcat-score-result-card--score output{
    font-size: 52px;
  }
}

@media (prefers-reduced-motion: reduce){
  .afcat-score-dropzone,
  .afcat-score-progress__track span,
  .afcat-score-reset{
    transition: none;
  }

  .afcat-score-submit.is-loading .afcat-score-submit__loading::after{
    animation-duration: 1.8s;
  }
}
