@font-face {
    font-family: 'NotoSansHK';
    src: url('/fonts/NotoSansHK-VF.ttf') format('truetype-variations'),
         url('/fonts/NotoSansHK-VF.ttf') format('truetype');
    font-weight: 100 900;
    font-display: swap;
}

:root {
    --paper: #FFFFFF; --ink: #14150F; --ink-2: #3B3C34;
    --muted: #6D6E64; --faint: #96978C;
    --rule: #E2E0D6; --rule-2: #EFEDE5;
    --brand: #4456CE; --brand-2: #5E6FE0;
    --brand-ink: #13142E; --line: #C7CBD2; --line-2: #E5E7EB;
    --grad: linear-gradient(90deg, #4456CE, #7A4BE0);
    --mono: ui-monospace, 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
    --font-h: "Figtree", "Avenir Next", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body {
    height: 100%;
    width: 100%;
    overflow: hidden;
    margin: 0;
    padding: 0;
    background-color: var(--paper);
}

body {
    color: var(--ink);
    font-family: 'NotoSansHK', -apple-system, 'Segoe UI', 'Microsoft JhengHei', sans-serif;
    font-size: 13px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    font-variant-numeric: tabular-nums;
    display: flex;
    flex-direction: column;
}

/* ===== landing header ===== */
.nav {
    flex: none;
    z-index: 50;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line-2);
}
.nav-in {
    max-width: 1240px; margin: 0 auto; padding: 12px 24px;
    display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.nav-logo .mark {
    width: 36px; height: 36px; border-radius: 10px; background: var(--grad);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 6px 18px rgba(68, 86, 206, .35);
}
.nav-logo .txt { font-family: var(--font-h); font-weight: 800; font-size: 20px; letter-spacing: -.3px; }
.nav-logo .txt span { color: var(--brand); }
.nav-links { display: flex; align-items: center; gap: 26px; font-size: 14px; font-weight: 500; }
.nav-links a { color: #56607A; white-space: nowrap; text-decoration: none; }
.nav-links a:hover { color: var(--ink); }
.nav-cta { display: flex; align-items: center; gap: 10px; }
.btn-pill {
    display: inline-flex; align-items: center; gap: 8px; border-radius: 999px;
    font-family: inherit; font-weight: 600; font-size: 14px;
    cursor: pointer; transition: .18s; white-space: nowrap; text-decoration: none;
}
.btn-primary { background: var(--brand); color: #fff; padding: 9px 18px; border: 0; }
.btn-primary:hover { background: var(--brand-2); transform: translateY(-1px); }
.btn-ghost { background: #fff; color: var(--ink); padding: 9px 18px; border: 1px solid var(--line); }
.btn-ghost:hover { border-color: #9AA0B0; }

/* ===== login form ===== */
.lk-page {
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow-y: auto;
}

.lk {
    width: 412px;
    padding: 28px 26px 22px;
    background: #F5F7FD;
    border: 1px solid #E3E8F6;
    border-radius: 3px;
}

.lk-brand {
    font-family: var(--mono);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: .22em;
    color: var(--ink);
}

.lk-sub {
    margin-top: 6px;
    font-size: 12px;
    color: var(--faint);
    letter-spacing: .02em;
}

.lk-tick {
    height: 1px;
    background: var(--ink);
    margin: 26px 0 6px;
}

.form-grid { margin-top: 4px; }

.form-grid .fg-item { padding: 14px 0 12px; }

.form-grid .fg-item > label {
    display: block;
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: .09em;
    color: var(--faint);
    margin-bottom: 4px;
}

.form-grid .layui-input {
    height: 32px;
    width: 100%;
    border: 0;
    border-bottom: 1px solid var(--rule);
    border-radius: 0;
    background-color: #FFFFFF;
    padding: 0 2px;
    font-family: inherit;
    font-size: 14px;
    color: var(--ink);
    box-shadow: none !important;
    -webkit-appearance: none;
    transition: border-color .15s;
}

.form-grid .layui-input:focus { border-color: var(--ink); }

/* kill Chrome autofill pale blue background */
.form-grid .layui-input:-webkit-autofill,
.form-grid .layui-input:-webkit-autofill:hover,
.form-grid .layui-input:-webkit-autofill:focus,
.form-grid .layui-input:-internal-autofill-selected {
    -webkit-text-fill-color: var(--ink);
    -webkit-box-shadow: 0 0 0 1000px #FFFFFF inset !important;
    box-shadow: 0 0 0 1000px #FFFFFF inset !important;
    transition: background-color 9999s ease-out 0s;
}

.form-grid .fg-verify { display: flex; align-items: center; gap: 12px; }

.form-grid .fg-verify img {
    cursor: pointer;
    height: 34px;
    width: 92px;
    object-fit: cover;
    flex: none;
}

.btn-ink {
    width: 100%;
    height: 38px;
    margin-top: 22px;
    border: 0;
    border-radius: 3px;
    background: var(--ink);
    color: #FFFFFF;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: .06em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .15s;
}

.btn-ink:hover { background: #2C2D25; }

.btn-ink[disabled] { background: #B9B8AC; cursor: not-allowed; }

.lk-foot { margin-top: 18px; text-align: right; }

.lk-foot a { color: var(--muted); font-size: 12px; text-decoration: underline; }

.lk-foot a:hover { color: var(--ink); }

@media screen and (max-width: 900px) {
    .nav-links { display: none; }
}

@media screen and (max-width: 480px) {
    .nav-in { padding: 10px 16px; gap: 12px; }
    .nav-cta .btn-ghost { display: none; }
    .lk { width: 100%; max-width: 412px; padding: 24px 20px 20px; }
}