.apk-comparison {
  border-top: 4px solid #e44c65;
}

.apk-comparison .research-body p,
.apk-comparison label,
.apk-comparison input,
.apk-comparison button {
  letter-spacing: 0.15px;
}

.apk-comparison fieldset {
  min-width: 0;
  border: 0;
  padding: 0;
  margin: 0;
}

.apk-comparison legend,
.apk-upload-panel > label {
  display: block;
  width: 100%;
  margin: 0 0 10px;
  border: 0;
  color: #304352;
  font-size: 18px;
  line-height: 1.5;
  font-weight: 700;
}

.apk-comparison .apk-small {
  font-size: 14px;
  line-height: 1.7;
  color: #526270;
}

.apk-service-notice {
  margin: 24px 0;
  padding: 16px 20px;
  border-radius: 8px;
  background: #edf2f5;
}

.apk-service-notice p {
  margin-bottom: 0;
}

.apk-mode-choice label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 22px 12px 0;
  font-size: 16px;
  font-weight: 400;
}

.apk-comparison input[type="radio"],
.apk-comparison input[type="checkbox"] {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin: 3px 0;
  accent-color: #a72d48;
}

.apk-upload-panel {
  margin: 20px 0;
  padding: 20px;
  border: 1px solid #dce3e8;
  border-radius: 8px;
  background: #f9fbfc;
}

.apk-comparison input[type="file"],
.apk-comparison input[type="url"] {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 10px;
  color: #304352;
  border: 1px solid #bac6cf;
  border-radius: 5px;
  background: #fff;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.5;
}

.apk-comparison input::file-selector-button {
  margin-right: 12px;
  padding: 8px 12px;
  border: 0;
  border-radius: 4px;
  background: #e8eef2;
  color: #304352;
  font-family: inherit;
}

.apk-comparison .apk-check-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 18px 0;
  color: #455663;
  font-size: 15px;
  line-height: 1.7;
  font-weight: 400;
}

.apk-button {
  display: inline-block;
  margin: 10px 0;
  padding: 12px 20px;
  border: 1px solid #a72d48;
  border-radius: 5px;
  background: #a72d48;
  color: #fff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
  cursor: pointer;
}

.apk-button:hover,
.apk-button:focus {
  background: #812139;
  color: #fff;
}

.apk-button-secondary {
  background: #fff;
  color: #a72d48;
}

.apk-button-secondary:hover,
.apk-button-secondary:focus {
  background: #fff0f3;
  color: #812139;
}

.apk-comparison fieldset:disabled,
.apk-comparison button:disabled,
.apk-mode-choice input:disabled + span {
  opacity: 0.65;
}

.apk-comparison button:disabled {
  cursor: not-allowed;
}

.apk-comparison input:focus-visible,
.apk-comparison button:focus-visible,
.apk-comparison summary:focus-visible {
  outline: 3px solid #a72d48;
  outline-offset: 3px;
}

.apk-error {
  margin: 18px 0;
  padding: 16px;
  border: 1px solid #b53650;
  border-radius: 6px;
  background: #fff2f4;
  color: #8b2038;
  font-size: 16px;
  line-height: 1.7;
}

.apk-comparison .apk-progress {
  margin-top: 16px;
  color: #304352;
  font-weight: 700;
}

.apk-report {
  margin-top: 30px;
  padding-top: 24px;
  border-top: 2px solid #dce3e8;
}

.apk-report h3 {
  scroll-margin-top: 100px;
}

.apk-report h2 {
  scroll-margin-top: 20px;
}

.apk-report .apk-report-package {
  color: #304352;
  font-weight: 700;
}

.apk-report-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 20px 0;
}

.apk-report-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid #dce3e8;
  border-radius: 8px;
  background: #f9fbfc;
}

.apk-report-card h4,
.apk-report h4 {
  margin: 0 0 14px;
  color: #304352;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.5;
}

.apk-report dl {
  margin: 0;
}

.apk-report dt {
  margin-top: 12px;
  color: #526270;
  font-size: 13px;
  line-height: 1.5;
}

.apk-report dd {
  color: #304352;
  font-size: 15px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.apk-monospace {
  font-family: Consolas, Monaco, monospace;
  font-size: 13px !important;
  overflow-wrap: anywhere;
}

.apk-report ul {
  margin-bottom: 16px;
  padding-left: 24px;
}

.apk-report details {
  margin: 14px 0;
  padding: 14px 16px;
  border: 1px solid #dce3e8;
  border-radius: 6px;
}

.apk-report summary {
  color: #304352;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.apk-report details ul {
  margin-top: 14px;
}

.apk-finding {
  margin: 16px 0;
  padding: 14px 18px;
  border-left: 3px solid #8da2b1;
  background: #f3f6f8;
}

.apk-finding-review {
  border-left-color: #b0761a;
  background: #fff8ec;
}

.apk-finding p:last-child {
  margin-bottom: 0;
}

.apk-report-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.apk-sr-only {
  position: absolute;
  width: 1px !important;
  height: 1px;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.apk-comparison [hidden] {
  display: none !important;
}

.apk-report-viewer {
  margin: 0;
  background: #f3f6f8;
  color: #304352;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.7;
}

.apk-report-shell {
  box-sizing: border-box;
  max-width: 1000px;
  margin: 36px auto;
  padding: 32px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(48, 67, 82, 0.08);
  overflow-wrap: anywhere;
}

.apk-report-shell *,
.apk-report-shell *::before,
.apk-report-shell *::after {
  box-sizing: border-box;
}

.apk-report-shell a {
  color: #a72d48;
}

.apk-report-shell a.apk-button:hover,
.apk-report-shell a.apk-button:focus {
  color: #812139;
}

.apk-report-shell h1 {
  font-size: 30px;
  line-height: 1.3;
  margin: 12px 0 20px;
}

.apk-report-shell h2 {
  margin: 0 0 20px;
  font-size: 24px;
  line-height: 1.4;
}

.apk-report-shell p {
  margin: 0 0 16px;
}

.apk-report-shell .apk-eyebrow {
  margin: 28px 0 10px;
  color: #526270;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.apk-back-link {
  font-size: 14px;
}

@media (max-width: 600px) {
  .apk-report-shell {
    margin: 12px;
    padding: 20px 14px;
  }

  .apk-report-shell h1 {
    font-size: 25px;
  }

  .apk-upload-panel,
  .apk-report-card,
  .apk-service-notice {
    padding: 14px;
  }

  .apk-report-grid {
    grid-template-columns: 1fr;
  }

  .apk-mode-choice label {
    display: flex;
  }

  .apk-report-actions {
    display: block;
  }

  .apk-report-actions .apk-button {
    width: 100%;
  }
}

@media print {
  #apk-compare-form,
  .apk-service-notice,
  #apk-progress,
  #apk-error,
  .apk-report-actions,
  #apk-report-link,
  label[for="apk-report-link"] {
    display: none !important;
  }

  .apk-report-grid {
    grid-template-columns: 1fr;
  }
}
