:root {
  --navy: #0b2d5c;
  --blue: #1c6fd6;
  --light-blue: #cfe6f4;
  --text-dark: #1a1a1a;
  --text-grey: #444;
  --border-grey: #d9d9d9;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', Arial, Helvetica, sans-serif;
  color: var(--text-dark);
  background: #e9e9e9;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Top thin navy bar */
.topbar {
  background: var(--navy);
  height: 34px;
}
.topbar-inner {
  height: 100%;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
}
.topbar-inner a {
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
}
.topbar-inner a:hover {
  color: #cfe6f4;
}

/* Header with logo */
.header {
  background: #fff;
  border-bottom: 1px solid #eee;
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 24px;
}
.logo-link {
  display: inline-block;
  line-height: 0;
}
.logo {
  height: 56px;
  display: block;
}

/* Page background: real building facade photo */
.page {
  background-color: #2f5f8a;
  background-image:
    linear-gradient(180deg, rgba(8,30,60,0.35), rgba(20,70,120,0.15)),
    url('assets/background.jpg');
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  padding: 22px 0;
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

.banner {
  background: var(--light-blue);
  padding: 20px 24px;
  margin-bottom: 14px;
  box-shadow: 0 10px 30px rgba(5, 20, 45, 0.25);
}
.banner-title {
  font-weight: bold;
  margin: 0 0 6px;
  color: #1a1a1a;
  font-size: 16px;
}
.banner-text {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-grey);
}

.card-top {
  background: #fff;
  box-shadow: 0 18px 45px rgba(5, 20, 45, 0.35);
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 18px;
  padding: 24px 24px 22px;
}
.test-label {
  color: var(--blue);
  font-weight: bold;
  margin: 0 0 6px;
  font-size: 17px;
}
.candidate-name {
  margin: 0 0 10px;
  font-size: 42px;
  color: var(--navy);
  font-weight: 800;
}
.dob {
  margin: 0;
  color: var(--text-grey);
  font-size: 16px;
}

.card-top-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 320px;
}
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 24px;
  padding: 13px 24px;
  font-size: 14px;
  font-weight: bold;
  letter-spacing: 0.3px;
  cursor: pointer;
  border: 2px solid var(--blue);
  white-space: nowrap;
}
.btn-primary {
  background: var(--blue);
  color: #fff;
}
.btn-secondary {
  background: #fff;
  color: var(--blue);
}
.btn-icon {
  font-size: 14px;
}

.card-details {
  margin-bottom: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.details-col {
  background: #fff;
  box-shadow: 0 18px 45px rgba(5, 20, 45, 0.35);
  padding: 14px 24px;
}
.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-grey);
}
.detail-row:last-child {
  border-bottom: none;
}
.detail-label {
  color: var(--navy);
  font-weight: bold;
  font-size: 16px;
}
.detail-value {
  font-size: 16px;
  text-align: right;
  color: #1a1a1a;
}
.detail-value-multiline {
  line-height: 1.4;
}
.score-total {
  font-size: 28px;
  font-weight: 800;
  color: var(--navy);
}
.score-sub {
  font-size: 22px;
  font-weight: 800;
  color: var(--navy);
}
.score-max {
  font-size: 16px;
  font-weight: normal;
  color: var(--text-grey);
}

.card-footer {
  background: var(--light-blue);
  box-shadow: 0 10px 30px rgba(5, 20, 45, 0.25);
  padding: 18px 24px;
  font-size: 15px;
  color: var(--text-grey);
  line-height: 1.5;
}
.card-footer p {
  margin: 0 0 8px;
}
.card-footer p:last-child {
  margin-bottom: 0;
}
.card-footer a {
  color: var(--blue);
  text-decoration: underline;
}

.site-footer {
  background: #e9e9e9;
  text-align: center;
  padding: 12px 24px 16px;
  font-size: 12px;
  color: #444;
  line-height: 1.4;
}
.site-footer .legal-link {
  display: block;
  color: var(--blue);
  text-decoration: none;
  margin-bottom: 6px;
}
.site-footer .legal-link:hover {
  text-decoration: underline;
}
.site-footer p {
  margin: 0;
}

/* Download loading overlay */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 25, 45, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease;
  z-index: 200;
}
.overlay.active {
  opacity: 1;
  visibility: visible;
}
.overlay-content {
  text-align: center;
  color: #fff;
}
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  margin: 0 auto 18px;
  animation: spin 0.9s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.overlay-content p {
  font-weight: bold;
  font-style: italic;
  font-size: 15px;
  margin: 0;
  max-width: 420px;
  padding: 0 20px;
}

/* Score report information side panel */
.side-panel-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 25, 45, 0.35);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease;
  z-index: 210;
}
.side-panel-backdrop.active {
  opacity: 1;
  visibility: visible;
}
.side-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 440px;
  max-width: 90vw;
  background: #f4f5f6;
  box-shadow: -8px 0 30px rgba(0, 0, 0, 0.25);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 220;
  overflow-y: auto;
  font-family: 'Poppins', 'Inter', Arial, sans-serif;
}
.side-panel.active {
  transform: translateX(0);
}
.side-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  padding: 18px 20px;
  border-bottom: 1px solid #e2e2e2;
  position: sticky;
  top: 0;
}
.side-panel-title {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--blue);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.3px;
}
.bcdiploma-mark {
  height: 18px;
  width: auto;
  display: block;
}
.side-panel-close {
  background: none;
  border: none;
  font-size: 26px;
  line-height: 1;
  color: #666;
  cursor: pointer;
  padding: 0 4px;
}
.side-panel-body {
  padding: 24px 20px;
}
.info-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid #e2e2e2;
}
.info-icon {
  color: var(--blue);
  flex-shrink: 0;
  margin-top: 2px;
  display: flex;
}
.info-icon img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}
.info-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.info-label {
  font-size: 13px;
  color: #444;
}
.info-value {
  font-weight: 800;
  color: var(--navy);
  font-size: 15px;
}
.info-disclaimer {
  font-size: 13px;
  color: #555;
  line-height: 1.6;
  margin: 20px 0 24px;
}
.info-disclaimer a {
  color: var(--blue);
}
.about-link {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  color: var(--blue);
  text-decoration: none;
  font-size: 13px;
  margin-bottom: 32px;
}
.about-link:hover {
  text-decoration: underline;
}
.side-panel-brands {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #666;
}
.brand-bc {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 15px;
  color: #333;
  text-decoration: none;
}
.brand-bc .bcdiploma-mark {
  height: 22px;
}
.brand-bc:hover {
  text-decoration: underline;
}
.brand-bc small {
  font-weight: 400;
  color: #888;
}
.brand-authorized {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #666;
  text-decoration: none;
}
.brand-authorized:hover {
  text-decoration: underline;
}
.ets-logo {
  font-family: 'Inter', Arial, sans-serif;
  font-weight: 800;
  font-size: 16px;
  color: #1a1a1a;
  letter-spacing: -0.5px;
}

@media (max-width: 640px) {
  .candidate-name {
    font-size: 28px;
  }
  .card-details {
    grid-template-columns: 1fr;
  }
  .card-top-actions {
    min-width: 0;
    width: 100%;
  }
}
