:root {
  --public-bg-left: #697ae4;
  --public-bg-right: #7d58b7;
  --public-surface: #f7f8fe;
  --public-surface-strong: #ffffff;
  --public-red-top: #bb0606;
  --public-red-bottom: #d80e0e;
  --public-red-border: #ee0606;
  --public-red-button-top: #d80e0e;
  --public-red-button-bottom: #d80e0e;
  --public-green-top: #1abc86;
  --public-green-bottom: #13aa74;
  --public-green-pill: #12b886;
  --public-text: #2b2f38;
  --public-text-soft: #384152;
  --public-field-border: #dbe1ee;
  --public-shadow: 0 24px 60px rgba(44, 23, 80, 0.18);
  --public-box-shadow: 0 10px 22px rgba(28, 41, 75, 0.06);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
}

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

.public-body {
  background: linear-gradient(
    90deg,
    var(--public-bg-left) 0%,
    var(--public-bg-right) 100%
  );
  color: var(--public-text);
}

.public-shell {
  padding: 0;
}

.page.public-page {
  min-height: 100vh;
  padding: 2rem 1.25rem;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.visa-card {
  width: min(100%, 62.5rem);
  overflow: hidden;
  border-radius: 1rem;
  background: var(--public-surface);
  box-shadow: var(--public-shadow);
}

.hero,
.info-header {
  background: linear-gradient(
    180deg,
    var(--public-red-top) 0%,
    var(--public-red-bottom) 100%
  );
  color: #fff;
  text-align: center;
}

.hero {
  padding: 1.25rem 1.5rem 1.35rem;
}

.crest {
  width: 3.75rem;
  height: 2.5rem;
  margin: 0 auto 1rem;
  display: grid;
  place-items: center;
  border-radius: 0.35rem;
  background: rgba(255, 255, 255, 0.09);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.hero h1,
.search-panel h2,
.info-header h2 {
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.8rem;
  font-weight: 400;
  line-height: 1.2;
}

.hero h1 {
  font-size: clamp(1.8rem, 2.2vw, 2.35rem);
}

.hero p {
  margin: 0.55rem 0 0;
  font-size: 0.98rem;
}

.hero-icon,
.section-icon,
.button-icon,
.status-icon {
  display: inline-flex;
  flex: none;
}

.hero-icon svg,
.section-icon svg {
  width: 2rem;
  height: 2rem;
}

.search-panel {
  padding: 2.5rem 2.25rem 3.2rem;
  text-align: center;
}

.search-panel h2 {
  margin-bottom: 1.8rem;
  font-size: clamp(2rem, 2.5vw, 2.35rem);
}

.verify-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.verify-form input {
  width: min(100%, 31.75rem);
  height: 3.55rem;
  padding: 0 1.4rem;
  border: 2px solid var(--public-field-border);
  border-radius: 999px;
  background: var(--public-surface-strong);
  color: #444;
  font-size: 1.05rem;
  text-align: center;
  outline: none;
}

.verify-form button,
.download-button,
.not-found-button {
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.verify-form button {
  min-width: 13rem;
  min-height: 3.3rem;
  padding: 0.8rem 1.5rem;
  border-radius: 1.45rem;
  background: linear-gradient(
    180deg,
    var(--public-red-button-top) 0%,
    var(--public-red-button-bottom) 100%
  );
  cursor: pointer;
}

.verify-form button .button-icon svg {
  width: 1.1rem;
  height: 1.1rem;
}

.info-card {
  margin: 0 1.25rem 1.25rem;
  overflow: hidden;
  border: 2px solid var(--public-red-border);
  border-radius: 1.15rem;
  background: var(--public-surface-strong);
}

.info-header {
  padding: 1.35rem 1.2rem 1.25rem;
}

.info-header h2 {
  font-size: clamp(1.9rem, 2.5vw, 2.35rem);
}

.status-pill {
  margin: 1rem auto 0;
  min-width: 6.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: var(--public-green-pill);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.status-icon svg {
  width: 1rem;
  height: 1rem;
}

.details-grid {
  margin: 0;
  padding: 1.9rem 1.9rem 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.45rem;
}

.detail-box {
  min-height: 5.9rem;
  margin: 0;
  padding: 1rem 1.1rem;
  border-left: 3px solid var(--public-red-border);
  border-radius: 0.7rem;
  background: linear-gradient(180deg, #fbfcfe 0%, #f5f8fd 100%);
  box-shadow: var(--public-box-shadow);
}

.detail-box dt,
.mrz-section h3 {
  margin: 0 0 0.6rem;
  color: var(--public-text-soft);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.detail-box dd {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.45;
}

.detail-box-wide {
  grid-column: 1 / 2;
}

.mrz-section {
  padding: 1.75rem 1.9rem 0;
}

.mrz-section h3 {
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0;
}

.mrz-box {
  max-width: 100%;
  width: fit-content;
  overflow-x: auto;
  padding: 0.9rem 0.95rem;
  border-left: 3px solid var(--public-red-border);
  border-radius: 0.7rem;
  background: linear-gradient(180deg, #fbfcfe 0%, #f5f8fd 100%);
  box-shadow: var(--public-box-shadow);
}

.mrz-text {
  margin: 0;
  color: var(--public-text-soft);
  font-family: "Consolas", "Courier New", monospace;
  font-size: 0.78rem;
  line-height: 1.18;
  letter-spacing: -0.01em;
  white-space: pre;
}

.download-wrap {
  padding: 1.15rem 1.9rem 1.4rem;
  display: flex;
  justify-content: center;
}

.download-button,
.not-found-button {
  min-height: 2.95rem;
  padding: 0.8rem 1.35rem;
  border-radius: 0.75rem;
  background: linear-gradient(
    180deg,
    var(--public-green-top) 0%,
    var(--public-green-bottom) 100%
  );
  font-size: 0.9rem;
}

.download-button .button-icon svg {
  width: 1rem;
  height: 1rem;
}

.not-found-panel {
  padding-bottom: 3rem;
}

.not-found-copy {
  margin: 0.65rem 0 1.5rem;
  color: var(--public-text-soft);
  line-height: 1.6;
}

@media (max-width: 960px) {
  .page.public-page {
    padding: 1.5rem 1rem;
  }

  .visa-card {
    width: min(100%, 56rem);
  }

  .search-panel {
    padding: 2.2rem 1.6rem 2.8rem;
  }

  .search-panel h2,
  .info-header h2 {
    font-size: clamp(1.55rem, 3vw, 2rem);
  }

  .details-grid,
  .mrz-section,
  .download-wrap {
    padding-left: 1.35rem;
    padding-right: 1.35rem;
  }
}

@media (max-width: 700px) {
  .page.public-page {
    padding: 0.95rem 0.7rem;
  }

  .visa-card {
    width: 100%;
    border-radius: 1.3rem;
  }

  .hero {
    padding: 1.85rem 1rem 1.6rem;
  }

  .hero h1 {
    flex-wrap: wrap;
    gap: 0.7rem;
    font-size: 1.35rem;
    line-height: 1.15;
  }

  .hero p {
    font-size: 0.72rem;
  }

  .hero-icon svg {
    width: 1.75rem;
    height: 1.75rem;
  }

  .search-panel {
    padding: 2rem 1rem 2.4rem;
  }

  .search-panel h2 {
    gap: 0.6rem;
    margin-bottom: 1.35rem;
    font-size: 1.15rem;
  }

  .section-icon svg {
    width: 1.55rem;
    height: 1.55rem;
  }

  .verify-form input {
    height: 3.65rem;
    font-size: 0.95rem;
  }

  .verify-form button {
    min-width: 12rem;
    min-height: 3rem;
    font-size: 0.95rem;
  }

  .info-card {
    margin: 0 0.85rem 0.85rem;
  }

  .info-header {
    padding: 1.15rem 0.9rem;
  }

  .info-header h2 {
    flex-wrap: wrap;
    gap: 0.55rem;
    font-size: 1.05rem;
  }

  .status-pill {
    margin-top: 0.9rem;
    padding: 0.45rem 0.9rem;
    font-size: 0.78rem;
  }

  .details-grid {
    padding: 1rem 1rem 0;
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .detail-box,
  .detail-box-wide {
    min-height: auto;
    grid-column: auto;
  }

  .detail-box dt {
    font-size: 0.72rem;
  }

  .detail-box dd {
    font-size: 0.92rem;
  }

  .mrz-section {
    padding: 1.2rem 1rem 0;
  }

  .mrz-section h3 {
    max-width: 11rem;
    font-size: 0.95rem;
    line-height: 1.25;
  }

  .mrz-text {
    font-size: 0.76rem;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }

  .download-wrap {
    padding: 1.1rem 1rem 1rem;
  }

  .download-button,
  .not-found-button {
    width: 100%;
    max-width: 14.5rem;
    min-height: 2.9rem;
    font-size: 0.92rem;
  }
}
