:root {
  --brand: #c91524;
  --brand-dark: #a80f1c;
  --brand-soft: #fff1f3;
  --navy: #17213a;
  --ink: #17213a;
  --muted: #777;
  --line: #ececec;
  --paper: #fff;
  --canvas: #f7f7f7;
  --shadow: 0 9px 28px rgba(36, 24, 24, 0.08);
  --shell: min(1500px, calc(100% - 40px));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family:
    "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", Arial, sans-serif;
  line-height: 1.65;
}

body.nav-open {
  overflow: hidden;
}

body.auth-dialog-open {
  overflow: hidden;
}

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

button,
input,
select {
  font: inherit;
}

button {
  color: inherit;
}

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

.site-shell {
  width: var(--shell);
  margin-inline: auto;
}

.global-header {
  position: sticky;
  z-index: 50;
  top: 0;
  height: 94px;
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid #efefef;
  box-shadow: 0 4px 18px rgba(31, 31, 31, 0.04);
}

.global-header-row {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 34px;
}

.global-logo {
  display: flex;
  width: 238px;
  flex: 0 0 238px;
  align-items: center;
  gap: 13px;
}

.global-logo img {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
}

.global-logo-copy {
  min-width: 0;
}

.global-logo-copy strong,
.global-logo-copy small {
  display: block;
}

.global-logo-copy strong {
  color: var(--navy);
  font-size: 27px;
  letter-spacing: 0.12em;
  line-height: 1.1;
}

.global-logo-copy small {
  margin-top: 5px;
  color: #798095;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.global-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(18px, 2vw, 38px);
  min-width: 0;
  margin-left: auto;
  white-space: nowrap;
}

.auth-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
}

.nav-mobile-auth {
  display: none;
}

.auth-button {
  min-width: 94px;
  height: 42px;
  border: 1px solid var(--brand);
  border-radius: 5px;
  padding: 0 18px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  transition: 0.18s ease;
}

.auth-button-primary {
  color: #fff;
  background: var(--brand);
}

.auth-button-primary:hover {
  border-color: var(--brand-dark);
  background: var(--brand-dark);
}

.auth-button-outline {
  color: var(--brand);
  background: #fff;
}

.auth-button-outline:hover {
  background: var(--brand-soft);
}

.auth-user {
  max-width: 150px;
  overflow: hidden;
  color: var(--navy);
  font-size: 14px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.global-nav > a,
.nav-paper-root {
  position: relative;
  border: 0;
  padding: 34px 0 31px;
  background: transparent;
  cursor: pointer;
  font-size: 16px;
}

.global-nav > a::after,
.nav-paper-root::after {
  position: absolute;
  right: 0;
  bottom: 24px;
  left: 0;
  height: 2px;
  background: var(--brand);
  content: "";
  opacity: 0;
  transform: scaleX(0.4);
  transition: 0.2s ease;
}

.global-nav > a:hover,
.global-nav > a.active,
.nav-paper-root:hover,
.nav-paper-root.active {
  color: var(--brand);
}

.global-nav > a:hover::after,
.global-nav > a.active::after,
.nav-paper-root:hover::after,
.nav-paper-root.active::after {
  opacity: 1;
  transform: scaleX(1);
}

.nav-paper {
  position: relative;
}

.nav-paper-root {
  display: flex;
  align-items: center;
  gap: 5px;
}

.nav-paper-root svg {
  width: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.nav-paper-menu {
  position: absolute;
  top: calc(100% - 18px);
  left: 50%;
  width: 154px;
  padding: 8px;
  border: 1px solid #eee;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(36, 24, 24, 0.13);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: 0.18s ease;
}

.nav-paper:hover .nav-paper-menu,
.nav-paper:focus-within .nav-paper-menu,
.nav-paper.open .nav-paper-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.nav-paper-menu a {
  display: block;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 14px;
}

.nav-paper-menu a:hover {
  color: var(--brand);
  background: var(--brand-soft);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  margin-left: auto;
  border: 1px solid #e7e7e7;
  border-radius: 8px;
  background: #fff;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: #333;
}

.page-kicker {
  margin: 0 0 6px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.page-title {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.25;
}

.page-lead {
  max-width: 720px;
  margin: 14px 0 0;
  color: #666;
  font-size: 16px;
}

.section-title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.section-title-row h2 {
  margin: 0;
  color: var(--brand);
  font-size: 27px;
  font-weight: 500;
}

.section-title-row p {
  margin: 0;
  color: #888;
}

.global-footer {
  margin-top: 68px;
  color: #f4f4f4;
  background: var(--navy);
}

.global-footer-main {
  display: grid;
  grid-template-columns: 0.8fr 0.9fr 1.15fr 1.35fr;
  gap: 48px;
  padding: 62px 0 48px;
}

.global-footer-brand {
  display: flex;
  align-items: center;
  gap: 15px;
}

.global-footer-brand img {
  width: 72px;
  height: 72px;
}

.global-footer-brand strong,
.global-footer-brand small {
  display: block;
}

.global-footer-brand strong {
  color: #fff;
  font-size: 31px;
  letter-spacing: 0.12em;
  line-height: 1;
}

.global-footer-brand small {
  margin-top: 8px;
  color: #aeb7cf;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.footer-brand-block > p {
  margin: 17px 0 0;
  color: #bfc5d5;
  font-size: 13px;
}

.footer-column {
  min-width: 0;
  padding-left: 34px;
  border-left: 1px solid rgba(255, 255, 255, 0.17);
}

.footer-column h3 {
  margin: 0 0 16px;
  font-size: 18px;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 18px;
}

.footer-links a {
  color: #eee;
  font-size: 14px;
}

.footer-links a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-contact p {
  margin: 8px 0;
  color: #eee;
  font-size: 14px;
}

.footer-qr {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.footer-qr figure {
  width: 100px;
  margin: 0;
  text-align: center;
}

.footer-qr img {
  width: 100px;
  aspect-ratio: 1;
  border: 6px solid #fff;
  object-fit: cover;
}

.footer-qr figcaption {
  margin-top: 5px;
  color: #fff;
  font-size: 13px;
}

.floating-wechat {
  position: fixed;
  z-index: 31;
  top: 50%;
  right: 22px;
  display: grid;
  width: 188px;
  padding: 13px;
  border: 2px solid var(--brand);
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(23, 33, 58, 0.18);
  transform: translateY(-50%);
}

.floating-wechat-close {
  position: absolute;
  top: -34px;
  right: -2px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #333;
  background: #fff;
  box-shadow: 0 4px 14px rgba(23, 33, 58, 0.14);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.floating-wechat-close:hover,
.floating-wechat-close:focus-visible {
  color: #fff;
  background: var(--brand);
}

.floating-wechat img {
  width: 160px;
  height: auto;
}

.floating-wechat-link {
  margin-top: 10px;
  padding: 7px 10px;
  border-radius: 6px;
  color: #fff;
  background: var(--brand);
  text-align: center;
  font-weight: 700;
}

.floating-wechat-link:hover,
.floating-wechat-link:focus-visible {
  background: var(--brand-dark);
}

.global-footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #aaa;
  font-size: 12px;
}

.global-footer-bottom a {
  color: inherit;
}

.global-footer-bottom a:hover,
.global-footer-bottom a:focus-visible {
  color: #fff;
}

.back-top {
  position: fixed;
  z-index: 32;
  right: 28px;
  bottom: 28px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid #f0d6d4;
  border-radius: 7px;
  color: var(--brand);
  background: #fff4f3;
  box-shadow: 0 7px 18px rgba(80, 31, 31, 0.1);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s ease;
}

.back-top.show {
  opacity: 1;
  pointer-events: auto;
}

.back-top svg {
  width: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.auth-modal {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
}

.auth-modal[hidden],
.auth-form[hidden] {
  display: none;
}

.auth-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: rgba(10, 16, 31, 0.64);
  cursor: default;
  backdrop-filter: blur(5px);
}

.auth-dialog,
.approval-dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 460px);
  max-height: calc(100vh - 44px);
  overflow: auto;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(7, 12, 25, 0.28);
}

.auth-dialog {
  padding: 34px 38px 38px;
}

.auth-dialog-close {
  position: absolute;
  z-index: 2;
  top: 15px;
  right: 16px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #777;
  background: #f5f5f5;
  cursor: pointer;
  font-size: 23px;
  line-height: 1;
}

.auth-dialog-close:hover {
  color: var(--brand);
  background: var(--brand-soft);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 25px;
}

.auth-brand img {
  width: 44px;
  height: 44px;
}

.auth-brand strong,
.auth-brand span {
  display: block;
}

.auth-brand strong {
  color: var(--navy);
  font-size: 20px;
  letter-spacing: 0.12em;
  line-height: 1;
}

.auth-brand span {
  margin-top: 6px;
  color: #9197a6;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.auth-dialog h2,
.approval-dialog h2 {
  margin: 0;
  color: var(--navy);
  font-size: 27px;
}

.auth-subtitle {
  margin: 7px 0 22px;
  color: #7b7f89;
  font-size: 14px;
}

.auth-tabs {
  display: grid;
  margin-bottom: 22px;
  padding: 4px;
  border-radius: 9px;
  background: #f4f5f7;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.auth-tabs button {
  height: 39px;
  border: 0;
  border-radius: 7px;
  color: #747985;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
}

.auth-tabs button.active {
  color: var(--brand);
  background: #fff;
  box-shadow: 0 3px 12px rgba(25, 31, 46, 0.08);
}

.auth-form label {
  display: block;
  margin-top: 15px;
}

.auth-form label > span {
  display: block;
  margin-bottom: 7px;
  color: #4c5260;
  font-size: 13px;
  font-weight: 700;
}

.auth-form input {
  width: 100%;
  height: 47px;
  border: 1px solid #dfe1e6;
  border-radius: 7px;
  padding: 0 13px;
  outline: 0;
  color: var(--navy);
  background: #fff;
}

.auth-form input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(201, 21, 36, 0.08);
}

.auth-form-hint {
  margin: 13px 0 0;
  color: #8a8f99;
  font-size: 12px;
}

.auth-form-message {
  min-height: 21px;
  margin: 12px 0 0;
  color: #2f8b57;
  font-size: 12px;
}

.auth-form-message.is-error {
  color: var(--brand);
}

.auth-submit {
  width: 100%;
  height: 48px;
  margin-top: 9px;
  border: 0;
  border-radius: 7px;
  color: #fff;
  background: var(--brand);
  cursor: pointer;
  font-weight: 700;
}

.auth-submit:hover {
  background: var(--brand-dark);
}

.auth-submit:disabled {
  cursor: wait;
  opacity: 0.68;
}

.approval-dialog {
  width: min(100%, 430px);
  padding: 36px 36px 32px;
  text-align: center;
}

.approval-success {
  display: grid;
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #31a569;
  font-size: 25px;
  font-weight: 700;
}

.approval-dialog > p {
  margin: 11px auto 17px;
  color: #666c77;
  font-size: 14px;
  line-height: 1.75;
}

.approval-qr {
  width: 210px;
  max-height: 275px;
  margin: 0 auto;
  border: 1px solid #e5e5e5;
  object-fit: contain;
}

.approval-caption {
  display: block;
  margin-top: 10px;
  color: var(--navy);
  font-size: 13px;
}

.approval-close-button {
  width: 100%;
  height: 44px;
  margin-top: 20px;
  border: 0;
  border-radius: 7px;
  color: #fff;
  background: var(--brand);
  cursor: pointer;
  font-weight: 700;
}

@media (max-width: 1220px) {
  .global-header-row {
    gap: 18px;
  }

  .global-logo {
    width: 212px;
    flex-basis: 212px;
  }

  .global-nav {
    gap: 18px;
  }

  .global-nav > a,
  .nav-paper-root {
    font-size: 14px;
  }

  .auth-actions {
    gap: 7px;
  }

  .auth-button {
    min-width: 78px;
    padding-inline: 12px;
    font-size: 13px;
  }
}

@media (max-width: 960px) {
  :root {
    --shell: min(100% - 28px, 760px);
  }

  .global-header {
    height: 74px;
  }

  .global-logo {
    width: 172px;
    flex-basis: 172px;
  }

  .global-logo img {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
  }

  .global-logo-copy strong {
    font-size: 23px;
  }

  .global-logo-copy small {
    font-size: 7px;
  }

  .floating-wechat {
    right: 12px;
    width: 150px;
    padding: 10px;
  }

  .floating-wechat img {
    width: 126px;
  }

  .nav-toggle {
    display: block;
  }

  .auth-actions {
    display: none;
  }

  .global-nav {
    position: fixed;
    z-index: 45;
    inset: 74px 0 0;
    display: block;
    padding: 16px 22px 40px;
    overflow: auto;
    background: rgba(255, 255, 255, 0.995);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: 0.2s ease;
  }

  body.nav-open .global-nav {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .global-nav > a,
  .nav-paper-root {
    display: flex;
    width: 100%;
    padding: 15px 4px;
    border-bottom: 1px solid #eee;
    font-size: 16px;
    text-align: left;
  }

  .global-nav > a::after,
  .nav-paper-root::after {
    display: none;
  }

  .nav-paper-menu {
    position: static;
    width: auto;
    padding: 3px 0 8px 12px;
    border: 0;
    box-shadow: none;
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }

  .nav-paper-menu a {
    padding: 9px 12px;
    color: #666;
  }

  .nav-mobile-auth {
    display: grid;
    gap: 10px;
    padding: 20px 4px 4px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nav-mobile-auth .auth-button {
    width: 100%;
    height: 45px;
  }

  .nav-mobile-auth .auth-user {
    align-self: center;
  }

  .global-footer-main {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand-block {
    display: none;
  }

  .footer-column:nth-child(2) {
    padding-left: 0;
    border-left: 0;
  }
}

@media (max-width: 620px) {
  .section-title-row {
    display: block;
  }

  .section-title-row p {
    margin-top: 5px;
  }

  .global-footer-main {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 45px 0 30px;
  }

  .footer-column {
    padding-left: 0;
    border-left: 0;
  }

  .global-footer-bottom {
    display: block;
  }

  .global-footer-bottom span {
    display: block;
    margin: 3px 0;
  }

  .back-top {
    right: 16px;
    bottom: 16px;
  }

  .floating-wechat {
    top: auto;
    right: 12px;
    bottom: 76px;
    width: 132px;
    padding: 8px;
    transform: none;
  }

  .floating-wechat img {
    width: 112px;
  }

  .floating-wechat-link {
    margin-top: 7px;
    padding: 5px 8px;
    font-size: 13px;
  }

  .auth-modal {
    padding: 12px;
  }

  .auth-dialog,
  .approval-dialog {
    max-height: calc(100vh - 24px);
    border-radius: 15px;
  }

  .auth-dialog {
    padding: 27px 22px 25px;
  }

  .approval-dialog {
    padding: 30px 22px 24px;
  }

  .approval-qr {
    width: 180px;
    max-height: 235px;
  }
}
