@font-face {
    font-family: Lack;
    src: url(lack.otf) format("opentype");
    font-weight: 400;
    font-display: swap;
}

:root {
    color-scheme: light;
    --ink: #151524;
    --muted: #535768;
    --line: #e0e2ed;
    --paper: #fff;
    --surface: #f7f8fd;
    --blue: #2a3af0;
    --blue-dark: #1b29c9;
    --blue-wash: #edf0ff;
    --green: #126343;
    --red: #9e2535;
    --font: Lack, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
    margin: 0;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    background: var(--surface);
    color: var(--ink);
    font: 1rem/1.55 var(--font);
    -webkit-font-smoothing: antialiased;
}
h1, h2, p { margin: 0; }
h1, h2, strong, code, .weight-row { overflow-wrap: anywhere; }
a { color: var(--blue-dark); text-underline-offset: .22em; }
button, input, textarea { color: inherit; font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

.top { background: var(--paper); border-bottom: 1px solid var(--line); }
.top-inner, .footer > div, .shell { width: min(1120px, calc(100% - 72px)); margin-inline: auto; }
.top-inner { display: flex; align-items: center; min-height: 72px; gap: 17px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1.13rem; }
.brand-mark {
    display: grid;
    width: 26px;
    aspect-ratio: 1;
    place-items: center;
    background: var(--blue);
    border-radius: 7px;
}
.brand-mark::after {
    content: "";
    width: 15px;
    aspect-ratio: 1;
    background: white;
    clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
}
.top-divider { width: 1px; height: 20px; background: var(--line); }
.top-label, .footer { color: var(--muted); font-size: .88rem; }
.footer { margin-top: auto; }
.footer > div { border-top: 1px solid var(--line); display: flex; gap: 16px; flex-wrap: wrap; justify-content: space-between; padding-block: 22px; }
.footer a { color: inherit; }

.button {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 10px 16px;
    text-decoration: none;
    font-size: .92rem;
    font-weight: 650;
    line-height: 1.35;
    text-align: center;
}
.primary { background: var(--blue); color: #fff; }
.primary:hover { background: var(--blue-dark); }
.secondary { border-color: var(--line); background: var(--paper); color: var(--ink); }
.secondary:hover { border-color: #a6ade6; background: var(--blue-wash); color: var(--blue-dark); }
input:not([type="hidden"]), textarea {
    width: 100%;
    min-width: 0;
    padding: 11px 13px;
    border: 1px solid #cdd1e1;
    border-radius: 8px;
    background: var(--paper);
}
input::placeholder, textarea::placeholder { color: #6a6f82; opacity: 1; }
textarea { resize: vertical; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.notice { border-radius: 8px; padding: 11px 14px; margin-block: 14px; font-size: .94rem; }
.error { color: var(--red); background: #fff0f2; }
.success { color: var(--green); background: #eaf7ef; }
.inactive { color: var(--muted); background: var(--surface); }


@media (max-width: 780px) {
    .top-inner, .footer > div, .shell { width: calc(100% - 36px); }
}
@media (max-width: 620px) {
    .top-inner { min-height: 60px; }
}

.error-shell { padding-block: 60px; }
.error-shell h1 { margin-bottom: 10px; }

.compact { max-width: 450px; padding-block: clamp(45px, 11vh, 100px); }
.compact h1 { font-size: clamp(2rem, 5vw, 3.3rem); line-height: 1.15; letter-spacing: -.045em; }
.compact h1 { margin-bottom: 10px; }
.overline { margin: 0 0 8px; color: var(--blue-dark); font-size: .88rem; }
.panel { min-width: 0; border: 1px solid var(--line); background: var(--paper); border-radius: 15px; padding: clamp(16px, 3.2vw, 28px); }
.login-form { margin-top: 24px; }
.form-stack { display: grid; gap: 15px; }
.panel h2 + .form-stack, .panel p + .form-stack, .section-head + .form-stack { margin-top: 17px; }
.form-stack > label { display: block; font-size: .91rem; font-weight: 600; }
.form-stack > label :is(input, textarea) { display: block; margin-top: 6px; font-weight: 400; font-size: 1rem; }
.form-stack .button { justify-self: start; }
.login-form .button { justify-self: stretch; }
.form-stack > .notice { margin: 0; }
