:root {
  --red: #c8102e;
  --red-dark: #bd001e;
  --green: #239d05;
  --text: #090909;
  --muted: #777;
  --page-width: 760px;
  font-family: 'Poppins', sans-serif;
  color: var(--text);
  background: #fff;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: #fff; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: 'Poppins', sans-serif;
  background: #fff;
}
a { color: inherit; }

.site-header {
  width: 100%;
  min-height: 42px;
  padding: 4px clamp(9px, 2.5vw, 20px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--red);
  color: #fff;
}
.brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: clamp(7px, 1.5vw, 12px);
  text-decoration: none;
}
.brand-logo {
  display: block;
  width: clamp(30px, 8.5vw, 58px);
  height: clamp(30px, 8.5vw, 58px);
  flex: 0 0 auto;
  object-fit: contain;
}
.brand-divider {
  width: 1px;
  height: 22px;
  background: rgba(255,255,255,.9);
  flex: 0 0 auto;
}
.brand-title {
  font-size: clamp(12px, 3.7vw, 22px);
  line-height: 1.18;
  font-weight: 400;
  white-space: nowrap;
  letter-spacing: -.35px;
}
.main-page-button {
  min-height: 28px;
  padding: 4px clamp(10px, 2.5vw, 18px);
  border: 1.5px solid #fff;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: #fff;
  text-decoration: none;
  font-size: clamp(10px, 2.7vw, 16px);
  font-weight: 600;
  letter-spacing: .2px;
}
.main-page-button:active, .document-button:active { transform: translateY(1px); }

.app-main {
  width: 100%;
  max-width: var(--page-width);
  margin: 0 auto;
  flex: 1 0 auto;
}
.loading-state, .not-found, .home-panel {
  margin: 18px 12px;
  padding: 34px 18px;
  border-radius: 30px;
  text-align: center;
}
.loading-state { color: #555; }
.loading-mark {
  display: inline-block;
  width: 35px;
  height: 35px;
  border: 4px solid #eee;
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.verified-card {
  margin: 3px 0 6px;
  padding: 8px 4px 4px;
  border: 4px solid var(--green);
  border-radius: 30px;
  text-align: center;
  overflow: hidden;
}
.check-circle {
  width: 34px;
  height: 34px;
  margin: 0 auto 3px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--green);
  color: #fff;
}
.check-circle svg { width: 24px; height: 24px; }
.verified-title {
  margin: 0;
  color: var(--green);
  font-size: clamp(17px, 4.7vw, 30px);
  line-height: 1.18;
  font-weight: 800;
  letter-spacing: -.9px;
}
.verified-subtitle {
  max-width: 540px;
  margin: 3px auto 8px;
  font-size: clamp(11px, 3.1vw, 18px);
  font-weight: 500;
  line-height: 1.35;
}
.certificate-preview {
  min-height: 112px;
  margin: 0 -4px;
  padding: 8px 7px;
  border-radius: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #c9c9c9, #bdbdbd);
}
.certificate-image {
  display: block;
  max-width: min(40%, 300px);
  max-height: 100px;
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 2px 8px rgba(0,0,0,.07);
  background: #fff;
}

.details-section {
  position: relative;
  padding: 8px clamp(13px, 3.5vw, 24px) 8px;
  border-top: 3px solid var(--red);
  overflow: hidden;
  isolation: isolate;
}
.details-title {
  margin: 0 0 7px;
  color: var(--red);
  text-align: center;
  font-size: clamp(18px, 5vw, 30px);
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -.7px;
}
.details-list {
  display: grid;
  gap: 2px;
  margin: 0;
}
.detail-row {
  display: grid;
  grid-template-columns: minmax(105px, 40fr) minmax(0, 60fr);
  align-items: start;
  gap: 7px;
  min-width: 0;
}
.detail-row dt {
  margin: 0;
  color: var(--red);
  font-size: clamp(12px, 3.5vw, 18px);
  line-height: 1.35;
  font-weight: 500;
  overflow-wrap: anywhere;
}
.detail-row dd {
  margin: 0;
  color: #080808;
  text-align: right;
  font-size: clamp(12px, 3.5vw, 18px);
  line-height: 1.35;
  font-weight: 500;
  overflow-wrap: anywhere;
  word-break: normal;
}

.documents-section {
  position: relative;
  padding: 7px clamp(12px, 3.5vw, 34px) 10px;
  overflow: hidden;
  isolation: isolate;
}
.documents-section::before {
  content: 'BILSTIXX';
  position: absolute;
  z-index: -1;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  color: rgba(200,16,46,.075);
  font-size: clamp(60px, 20vw, 136px);
  line-height: .9;
  font-weight: 800;
  letter-spacing: -7px;
  white-space: nowrap;
  pointer-events: none;
}
.document-button {
  width: min(70%, 430px);
  min-height: 32px;
  margin: 0 auto 6px;
  padding: 5px 10px;
  border: 2px solid var(--red);
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.94);
  color: var(--red);
  text-align: center;
  text-decoration: none;
  font-size: clamp(14px, 4vw, 22px);
  font-weight: 600;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.document-button:last-child { margin-bottom: 0; }

.site-footer {
  width: 100%;
  margin-top: auto;
  padding: 10px 8px 8px;
  background: var(--red);
  color: rgba(255,255,255,.9);
  text-align: center;
  font-size: clamp(9px, 2.5vw, 13px);
  line-height: 1.45;
  font-weight: 300;
}
.site-footer p { margin: 0; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

.home-panel {
  margin: 20px 12px;
  padding: 34px 20px 30px;
  border: 3px solid var(--red);
  background: #fff;
}
.home-kicker {
  margin: 0 0 8px;
  color: var(--red);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.home-title {
  margin: 0;
  font-size: clamp(27px, 7vw, 42px);
  line-height: 1.15;
  font-weight: 800;
  color: var(--red);
}
.home-description {
  max-width: 500px;
  margin: 13px auto 23px;
  font-size: 14px;
  line-height: 1.6;
}
.lookup-form { display: grid; gap: 10px; max-width: 420px; margin: 0 auto; }
.lookup-input {
  width: 100%;
  min-height: 54px;
  padding: 10px 16px;
  border: 1.5px solid #bbb;
  border-radius: 999px;
  outline: none;
  font: 500 16px 'Poppins', sans-serif;
  text-align: center;
}
.lookup-input:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(200,16,46,.1); }
.lookup-submit {
  min-height: 54px;
  border: 0;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font: 600 16px 'Poppins', sans-serif;
}
.lookup-error { min-height: 22px; color: var(--red); font-size: 13px; }
.not-found {
  border: 3px solid var(--red);
  border-radius: 34px;
}
.not-found-mark {
  width: 66px;
  height: 66px;
  margin: 0 auto 12px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--red);
  color: white;
  font-size: 40px;
  font-weight: 500;
}
.not-found h1 { margin: 0; color: var(--red); font-size: 25px; font-weight: 800; }
.not-found p { margin: 8px auto 0; max-width: 400px; font-size: 14px; line-height: 1.5; }

@media (min-width: 600px) {
  .site-header { min-height: 68px; }
  .brand-logo { width: 54px; height: 54px; }
  .verified-card { margin-top: 8px; padding-top: 16px; }
  .check-circle { width: 58px; height: 58px; }
  .check-circle svg { width: 36px; height: 36px; }
  .certificate-preview { min-height: 220px; }
  .certificate-image { max-height: 190px; }
  .details-section { padding-top: 16px; }
  .document-button { min-height: 46px; }
  .site-footer { padding-top: 16px; padding-bottom: 14px; }
}

@media (max-width: 370px) {
  .site-header { gap: 6px; padding-inline: 9px; }
  .brand { gap: 7px; }
  .brand-title { font-size: 12px; }
  .main-page-button { min-height: 26px; padding-inline: 8px; font-size: 9px; }
  .detail-row { grid-template-columns: minmax(100px, 40fr) minmax(0, 60fr); }
  .verified-card { border-width: 4px; border-radius: 28px; }
}
