:root {
  --blue: #2f6df6;
  --blue-dark: #1757e8;
  --ink: #101319;
  --text: #525b6a;
  --muted: #7c8493;
  --line: #e4e9f1;
  --surface: #ffffff;
  --surface-alt: #f8faff;
  --font-sans: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--surface);
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background: var(--surface);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.site-header {
  position: sticky;
  z-index: 10;
  top: 0;
  height: 76px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.header-shell,
.license-grid,
.contact-inner,
.footer-shell {
  width: min(calc(100% - 64px), 1320px);
  margin: 0 auto;
}

.header-shell {
  display: flex;
  height: 100%;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
  font-weight: 800;
}

.brand img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  filter: none;
}

.back-link {
  color: var(--blue);
  font-size: 15px;
  font-weight: 650;
}

.back-link:hover,
.back-link:focus-visible,
.license-document figcaption a:hover,
.license-document figcaption a:focus-visible,
.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--blue-dark);
}

.back-link:focus-visible,
.license-document figcaption a:focus-visible,
.contact-link:focus-visible,
.site-footer a:focus-visible,
.brand:focus-visible {
  border-radius: 4px;
  outline: 3px solid rgba(47, 109, 246, 0.24);
  outline-offset: 4px;
}

.license-section {
  padding: 80px 0 30px;
}

.license-grid {
  display: grid;
  grid-template-columns: 420px minmax(0, 1fr);
  align-items: start;
  gap: 64px;
}

.license-copy {
  padding-top: 40px;
}

.license-copy h1 {
  margin: 0;
  font-size: 58px;
  font-weight: 820;
  letter-spacing: 0;
  line-height: 1.2;
}

.license-copy h2 {
  margin: 30px 0 0;
  font-size: 24px;
  font-weight: 720;
  letter-spacing: 0;
  line-height: 1.45;
}

.license-description {
  margin: 20px 0 0;
  color: var(--text);
  font-size: 16px;
  line-height: 1.8;
}

.license-details {
  margin: 48px 0 0;
  border-top: 1px solid var(--line);
}

.license-details > div {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}

.license-details dt {
  color: #303744;
  font-weight: 700;
}

.license-details dd {
  margin: 0;
  color: var(--text);
}

.license-document {
  min-width: 0;
  margin: 0;
}

.document-frame {
  border: 1px solid #dce3ee;
  border-radius: 6px;
  padding: 24px;
  background: var(--surface);
}

.document-frame img {
  width: 100%;
  height: auto;
}

.certificate-frame {
  position: relative;
  display: flex;
  min-height: 420px;
  align-items: center;
  justify-content: center;
  background: var(--surface);
}

.certificate-image {
  width: 100%;
  max-width: 620px;
  opacity: 0;
}

.certificate-image.is-landscape {
  max-width: 100%;
}

.certificate-image.is-loaded {
  opacity: 1;
}

.document-status {
  position: absolute;
  top: 50%;
  left: 50%;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  transform: translate(-50%, -50%);
}

.document-status.is-error {
  width: calc(100% - 48px);
  color: #9f2d2d;
  text-align: center;
}

.license-document figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 2px 0;
  color: var(--muted);
  font-size: 14px;
}

.license-document figcaption a {
  flex: 0 0 auto;
  color: var(--blue);
  font-weight: 700;
}

.contact-section {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface-alt);
}

.contact-inner {
  padding: 44px 0;
  text-align: center;
}

.contact-inner h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 730;
  letter-spacing: 0;
}

.contact-inner p {
  margin: 8px 0 18px;
  color: var(--muted);
  font-size: 14px;
}

.contact-link {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0 25px;
  color: #ffffff;
  background: var(--blue);
  font-size: 15px;
  font-weight: 700;
  transition: background 180ms ease, transform 180ms ease;
}

.contact-link:hover {
  background: var(--blue-dark);
  transform: translateY(-1px);
}

.site-footer {
  color: #697587;
  background: var(--surface);
  font-size: 12px;
}

.footer-shell {
  display: flex;
  min-height: 94px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-shell p {
  margin: 0;
}

.footer-shell nav {
  display: flex;
  gap: 24px;
}

.site-footer a {
  transition: color 180ms ease;
}

@media (max-width: 980px) {
  .license-section {
    padding-top: 54px;
  }

  .license-grid {
    grid-template-columns: 1fr;
    gap: 42px;
  }

  .license-copy {
    max-width: 680px;
    padding-top: 0;
  }

  .license-details {
    margin-top: 36px;
  }
}

@media (max-width: 560px) {
  .site-header {
    height: 66px;
  }

  .header-shell,
  .license-grid,
  .contact-inner,
  .footer-shell {
    width: calc(100% - 32px);
  }

  .brand {
    gap: 8px;
    font-size: 19px;
  }

  .brand img {
    width: 34px;
    height: 34px;
  }

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

  .license-section {
    padding: 42px 0 38px;
  }

  .license-grid {
    gap: 34px;
  }

  .license-copy h1 {
    font-size: 42px;
    line-height: 1.25;
  }

  .license-copy h2 {
    margin-top: 22px;
    font-size: 20px;
  }

  .license-description {
    margin-top: 14px;
    font-size: 15px;
  }

  .license-details {
    margin-top: 28px;
  }

  .license-details > div {
    grid-template-columns: 76px 1fr;
    gap: 10px;
    padding: 15px 0;
    font-size: 14px;
  }

  .document-frame {
    border-radius: 4px;
    padding: 8px;
  }

  .certificate-frame {
    min-height: 260px;
  }

  .license-document figcaption {
    align-items: flex-start;
    padding-top: 13px;
    font-size: 13px;
  }

  .contact-inner {
    padding: 42px 0;
  }

  .contact-inner h2 {
    font-size: 20px;
  }

  .contact-link {
    width: 100%;
  }

  .footer-shell {
    min-height: 120px;
    align-items: flex-start;
    justify-content: center;
    flex-direction: column;
    gap: 10px;
    padding: 26px 0;
  }

  .footer-shell nav {
    gap: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
