html.aq-auth-theme {
  --aq-paper: #f7f7f4;
  --aq-card: #ffffff;
  --aq-ink: #11110f;
  --aq-muted: #77766f;
  --aq-line: rgba(17, 17, 15, 0.16);
  --aq-inverse: #11110f;
  --aq-inverse-text: #ffffff;
  background: var(--aq-paper);
}

html.dark.aq-auth-theme,
html[data-theme='dark'].aq-auth-theme {
  --aq-paper: #11120f;
  --aq-card: #191a17;
  --aq-ink: #f2f2ed;
  --aq-muted: #aaa9a2;
  --aq-line: rgba(255, 255, 255, 0.16);
  --aq-inverse: #f2f2ed;
  --aq-inverse-text: #11120f;
}

html.aq-auth-theme body {
  background: var(--aq-paper) !important;
  color: var(--aq-ink);
  letter-spacing: 0;
}

html.aq-auth-theme .aq-auth-shell {
  min-height: 100svh !important;
  height: auto !important;
  display: grid !important;
  grid-template-columns: minmax(440px, 1fr) minmax(520px, 0.86fr) !important;
  background: var(--aq-paper);
}

html.aq-auth-theme .aq-auth-shell > a[href='/'] {
  position: fixed !important;
  top: 26px !important;
  left: 34px !important;
  z-index: 30 !important;
  gap: 9px !important;
  color: var(--aq-ink) !important;
}

html.aq-auth-theme .aq-auth-shell > a[href='/'] img {
  width: 27px !important;
  height: 27px !important;
  border-radius: 0 !important;
}

html.aq-auth-theme .aq-auth-shell > a[href='/'] h1 {
  display: none !important;
}

.aq-auth-top-brand {
  font-family: "Noto Serif SC", "Songti SC", SimSun, serif !important;
  font-size: 19px !important;
  font-weight: 800 !important;
}

.aq-auth-aside {
  grid-column: 1;
  grid-row: 1;
  min-height: 100svh;
  padding: 150px clamp(40px, 6vw, 94px) 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.aq-auth-aside::before {
  content: '';
  width: 44%;
  height: 1px;
  margin-bottom: 96px;
  background: var(--aq-line);
}

.aq-auth-kicker {
  margin: 0 0 26px;
  color: var(--aq-muted);
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 11px;
}

.aq-auth-aside h2 {
  margin: 0;
  display: grid;
  font-family: "Noto Serif SC", "Songti SC", SimSun, serif;
  font-size: clamp(50px, 5.2vw, 78px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: 0;
}

.aq-auth-aside h2 span:last-child {
  color: var(--aq-muted);
  font-weight: 500;
}

.aq-auth-points {
  margin: 34px 0 0;
  padding: 25px 0;
  display: grid;
  gap: 15px;
  border-block: 1px solid var(--aq-line);
  list-style: none;
}

.aq-auth-points li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}

.aq-auth-points svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.aq-auth-support {
  margin-top: 42px;
  color: var(--aq-muted);
}

.aq-auth-support small {
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 10px;
  letter-spacing: 0;
}

.aq-auth-support p {
  max-width: 500px;
  margin: 13px 0 16px;
  font-size: 13px;
}

.aq-auth-support a {
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid var(--aq-line);
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--aq-ink);
  font-size: 13px;
  text-decoration: none;
}

.aq-auth-support a:hover { background: color-mix(in srgb, var(--aq-ink) 6%, transparent); }

html.aq-auth-theme .aq-auth-shell > .container {
  grid-column: 2;
  grid-row: 1;
  width: 100% !important;
  max-width: none !important;
  min-height: 100svh;
  padding: 82px clamp(28px, 4vw, 62px) 26px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

html.aq-auth-theme .aq-auth-shell > .container > div {
  width: min(520px, 100%) !important;
  margin: 0 !important;
  padding: 38px 42px 27px !important;
  border: 1px solid var(--aq-line);
  border-radius: 8px;
  background: var(--aq-card);
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.05);
}

.aq-auth-card-brand {
  margin-bottom: 25px;
  display: grid;
  justify-items: center;
  text-align: center;
}

.aq-auth-card-brand strong {
  font-family: "Noto Serif SC", "Songti SC", SimSun, serif;
  font-size: 27px;
}

.aq-auth-card-brand span {
  margin-top: 7px;
  color: var(--aq-muted);
  font-family: "Noto Serif SC", "Songti SC", SimSun, serif;
  font-size: 13px;
  font-style: italic;
}

html.aq-auth-theme .aq-auth-shell form {
  gap: 15px !important;
}

html.aq-auth-theme .aq-auth-shell input {
  min-height: 46px !important;
  padding-inline: 14px !important;
  border-radius: 7px !important;
  font-size: 14px !important;
}

html.aq-auth-theme .aq-auth-shell form button[type='submit'] {
  min-height: 48px !important;
  margin-top: 8px !important;
  border-radius: 24px !important;
  background: var(--aq-inverse) !important;
  color: var(--aq-inverse-text) !important;
}

html.aq-auth-theme .aq-auth-shell h2 {
  font-family: "Noto Serif SC", "Songti SC", SimSun, serif;
  letter-spacing: 0 !important;
}

html.aq-auth-theme .aq-auth-shell > .container h2 {
  text-align: center !important;
  font-size: 28px !important;
}

html.aq-auth-theme .aq-auth-shell > .container h2 + p {
  text-align: center !important;
}

.aq-auth-copyright {
  margin: 20px 0 0;
  color: var(--aq-muted);
  text-align: center;
  font-size: 11px;
}

.aq-auth-tools {
  position: fixed;
  top: 24px;
  right: 34px;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 8px;
}

.aq-auth-tool-button,
.aq-auth-home-link {
  min-height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  color: var(--aq-muted);
  font-size: 12px;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.aq-auth-tools svg {
  width: 15px;
  height: 15px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.aq-auth-tool-button:hover,
.aq-auth-home-link:hover { background: color-mix(in srgb, var(--aq-ink) 6%, transparent); color: var(--aq-ink); }

.aq-auth-language { position: relative; }

.aq-auth-language-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 176px;
  padding: 6px;
  border: 1px solid var(--aq-line);
  border-radius: 7px;
  display: grid;
  background: var(--aq-card);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.12);
}

.aq-auth-language-menu[hidden] { display: none; }

.aq-auth-language-menu button {
  min-height: 35px;
  padding: 0 9px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--aq-muted);
  text-align: left;
  cursor: pointer;
}

.aq-auth-language-menu button:hover,
.aq-auth-language-menu button[aria-checked='true'] { background: color-mix(in srgb, var(--aq-ink) 7%, transparent); color: var(--aq-ink); }

@media (max-width: 980px) {
  html.aq-auth-theme .aq-auth-shell {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .aq-auth-aside { display: none; }

  html.aq-auth-theme .aq-auth-shell > .container {
    grid-column: 1;
    padding: 90px 20px 28px !important;
  }

  html.aq-auth-theme .aq-auth-shell > a[href='/'] {
    top: 18px !important;
    left: 18px !important;
  }

  .aq-auth-tools { top: 15px; right: 14px; }
  .aq-auth-home-link span { display: none; }
}

@media (max-width: 560px) {
  html.aq-auth-theme .aq-auth-shell > a[href='/'] h1 { display: none; }
  html.aq-auth-theme .aq-auth-shell > .container { padding-inline: 12px !important; }
  html.aq-auth-theme .aq-auth-shell > .container > div {
    padding: 38px 22px 26px !important;
    border-radius: 7px;
  }
  .aq-auth-card-brand { margin-bottom: 28px; }
  .aq-auth-card-brand strong { font-size: 24px; }
}
