/*
 * Public UI adapted from the 小天DNS分发 project.
 * Copyright (c) 2025 juhedev — MIT License.
 * Full notice: /static/THIRD_PARTY_NOTICES.txt
 */

:root {
    --ink: #0f1b2d;
    --ink-soft: #3d4f66;
    --muted: #8293a8;
    --sky: #4aa3ff;
    --sky-deep: #2b7de9;
    --teal: #2ec4b6;
    --coral: #ff5a6a;
    --mist: #f4f8fc;
    --line: #e6eef7;
    --white: #fff;
    --font: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --display: "Avenir Next", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
    color-scheme: light;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    color: var(--ink);
    font-family: var(--font);
    -webkit-font-smoothing: antialiased;
}

button,
input,
textarea,
select {
    font: inherit;
}

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

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

.skip-link {
    position: fixed;
    top: .5rem;
    left: .5rem;
    z-index: 999;
    padding: .65rem .9rem;
    border-radius: 8px;
    color: #fff;
    background: #0f172a;
    transform: translateY(-160%);
    transition: transform .2s ease;
}

.skip-link:focus {
    transform: translateY(0);
}

.wrap {
    width: min(1180px, calc(100% - 2.5rem));
    margin-inline: auto;
}

/* Landing page */
.landing-page {
    min-height: 100vh;
    background:
        radial-gradient(1200px 500px at 10% -10%, #dcebff 0%, transparent 55%),
        radial-gradient(900px 420px at 95% 8%, #d7f7f2 0%, transparent 50%),
        #fff;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    border-bottom: 1px solid rgba(230, 238, 247, .82);
    background: rgba(255, 255, 255, .84);
    backdrop-filter: blur(14px);
}

.nav {
    display: flex;
    min-height: 72px;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: .75rem;
}

.brand img {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    border-radius: 11px;
    object-fit: contain;
}

.brand-text {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.08;
}

.brand-name {
    max-width: 280px;
    overflow: hidden;
    color: var(--ink);
    font-family: var(--display);
    font-size: 1.04rem;
    font-weight: 800;
    letter-spacing: .01em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.brand-host {
    display: block;
    max-width: 280px;
    margin-top: .16rem;
    overflow: hidden;
    color: #7b8da3;
    font-size: .62rem;
    letter-spacing: .04em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.35rem;
    color: var(--ink-soft);
    font-size: .92rem;
    font-weight: 550;
}

.nav-links a,
.footer-col a,
.footer-bottom a {
    transition: color .2s ease;
}

.nav-links a:hover,
.nav-links a:focus-visible,
.footer-col a:hover,
.footer-col a:focus-visible,
.footer-bottom a:hover,
.footer-bottom a:focus-visible {
    color: var(--sky-deep);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: .6rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .48rem;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 650;
    transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

.btn:hover,
.btn:focus-visible {
    transform: translateY(-1px);
    filter: saturate(1.06);
}

.btn-coral {
    padding: .68rem 1.15rem;
    color: #fff;
    background: linear-gradient(135deg, #ff6b7a, #ff4d5e);
    box-shadow: 0 8px 20px rgba(255, 90, 106, .26);
    font-size: .9rem;
}

.btn-coral i {
    font-size: .73rem;
}

.btn-sky,
.btn-teal {
    min-height: 48px;
    padding: .84rem 1.35rem;
}

.btn-sky {
    color: #fff;
    background: linear-gradient(135deg, #6bb6ff, #3b93f5);
    box-shadow: 0 10px 24px rgba(59, 147, 245, .27);
}

.btn-teal {
    color: #fff;
    background: linear-gradient(135deg, #3fd4c6, #1fb5a7);
    box-shadow: 0 10px 24px rgba(46, 196, 182, .27);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--ink);
    background: #fff;
    cursor: pointer;
}

.notice-bar {
    display: flex;
    width: min(1180px, calc(100% - 2.5rem));
    margin: .9rem auto 0;
    align-items: flex-start;
    gap: .7rem;
    padding: .85rem 1.1rem;
    border: 1px solid #ffe2a8;
    border-radius: 14px;
    color: #8a5a00;
    background: #fff8e8;
    font-size: .9rem;
    line-height: 1.55;
}

.notice-bar > i {
    margin-top: .2rem;
}

.notice-bar strong {
    margin-right: .5rem;
}

.hero {
    display: grid;
    padding-block: 3.25rem 2.5rem;
    grid-template-columns: 1.05fr .95fr;
    align-items: center;
    gap: 2.5rem;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .38rem .82rem;
    border-radius: 999px;
    color: #168f85;
    background: #e8f8f5;
    font-size: .82rem;
    font-weight: 650;
    animation: rise .7s ease both;
}

.hero h1 {
    margin: 1rem 0 .85rem;
    color: var(--ink);
    font-family: var(--display);
    font-size: clamp(2.1rem, 4.2vw, 3.4rem);
    font-weight: 850;
    letter-spacing: -.025em;
    line-height: 1.15;
    animation: rise .75s .05s ease both;
}

.hero-lead {
    max-width: 38rem;
    margin: 0 0 1.55rem;
    color: var(--ink-soft);
    font-size: 1.02rem;
    line-height: 1.78;
    animation: rise .75s .1s ease both;
}

.cta-row {
    display: flex;
    margin-bottom: 1.05rem;
    flex-wrap: wrap;
    gap: .8rem;
    animation: rise .75s .15s ease both;
}

.hero-note {
    display: flex;
    margin: 0;
    align-items: center;
    gap: .4rem;
    color: #7b8da3;
    font-size: .88rem;
    animation: rise .75s .18s ease both;
}

.hero-note i {
    color: var(--teal);
}

.hero-visual {
    position: relative;
    min-height: 420px;
    animation: float-in .9s .12s ease both;
}

.hero-visual-bg {
    position: absolute;
    inset: 8% 4% 4% 8%;
    border: 1px solid var(--line);
    border-radius: 36px;
    background:
        linear-gradient(145deg, rgba(74, 163, 255, .12), rgba(46, 196, 182, .1)),
        #f7fbff;
}

.hero-art {
    position: relative;
    z-index: 1;
    width: 100%;
    min-height: 420px;
}

.float-card {
    position: absolute;
    z-index: 2;
    padding: .72rem .88rem;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 14px 40px rgba(15, 27, 45, .09);
    animation: bob 4.5s ease-in-out infinite;
}

.float-card > span {
    display: block;
    margin-bottom: .24rem;
    color: #7b8da3;
    font-size: .72rem;
}

.float-card > strong {
    color: var(--ink);
    font-size: .92rem;
}

.float-card > strong i {
    color: var(--teal);
}

.card-latency {
    top: 12%;
    right: 8%;
}

.card-chart {
    top: 39%;
    left: 4%;
    display: flex;
    height: 58px;
    align-items: flex-end;
    gap: 6px;
    animation-delay: .6s;
}

.card-chart span {
    width: 8px;
    margin: 0;
    border-radius: 3px;
    background: #9ad0ff;
}

.card-chart span:nth-child(1) { height: 36%; }
.card-chart span:nth-child(2) { height: 68%; background: #4aa3ff; }
.card-chart span:nth-child(3) { height: 52%; background: #2ec4b6; }
.card-chart span:nth-child(4) { height: 84%; background: #2b7de9; }
.card-chart span:nth-child(5) { height: 72%; background: #69b8ff; }

.card-security {
    right: 14%;
    bottom: 16%;
    animation-delay: 1.1s;
}

.desk-scene {
    position: absolute;
    bottom: 6%;
    left: 50%;
    width: min(340px, 78%);
    transform: translateX(-50%);
}

.why-section,
.scenarios {
    padding-block: 4.5rem 4rem;
}

.why-section {
    border-top: 1px solid var(--line);
    background: #fff;
}

.scenarios {
    border-top: 1px solid var(--line);
    background: #f7f9fc;
}

.section-head {
    margin-bottom: 2.6rem;
    text-align: center;
}

.section-head h2 {
    margin: 0 0 .65rem;
    color: var(--ink);
    font-family: var(--display);
    font-size: clamp(1.55rem, 3vw, 2rem);
    font-weight: 820;
}

.section-head p {
    margin: 0;
    color: #8a9bb0;
    font-size: .98rem;
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem 1.25rem;
}

.why-card {
    padding: .55rem .75rem;
    text-align: center;
}

.why-icon {
    display: flex;
    width: 72px;
    height: 72px;
    margin: 0 auto 1.1rem;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.55rem;
    transition: transform .25s ease;
}

.why-card:hover .why-icon {
    transform: translateY(-4px);
}

.blue { color: #3b8dff; background: #e8f2ff; }
.green { color: #2db87a; background: #e8faf0; }
.purple { color: #8b5cf6; background: #f0eaff; }
.red { color: #ef4d5e; background: #ffe8eb; }
.orange { color: #e08a3c; background: #fff1e6; }

.why-card h3,
.feature h3 {
    margin: 0 0 .55rem;
    color: var(--ink);
    font-size: 1.06rem;
    font-weight: 720;
}

.why-card p,
.feature p {
    margin: 0;
    color: #8193a9;
    font-size: .89rem;
    line-height: 1.72;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.feature {
    padding: 1.5rem 1.35rem 1.6rem;
    border: 1px solid #e8eef6;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 27, 45, .04);
    transition: transform .2s ease, box-shadow .2s ease;
}

.feature:hover {
    box-shadow: 0 14px 32px rgba(15, 27, 45, .08);
    transform: translateY(-3px);
}

.feature-icon {
    display: inline-flex;
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    font-size: 1.15rem;
}

.site-footer {
    padding: 3.5rem 0 0;
    border-top: 1px solid var(--line);
    color: #8092a8;
    background: #f7f9fc;
    font-size: .9rem;
}

.footer-main {
    display: grid;
    padding-bottom: 2.75rem;
    grid-template-columns: 1.6fr 1fr 1fr;
    gap: 2.5rem 3rem;
}

.footer-brand {
    display: flex;
    align-items: flex-start;
    gap: .85rem;
}

.footer-brand img {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border-radius: 11px;
    object-fit: contain;
}

.footer-brand-name {
    margin: 0 0 .55rem;
    color: var(--ink);
    font-family: var(--display);
    font-size: 1.05rem;
    font-weight: 800;
}

.footer-brand-desc {
    max-width: 23rem;
    margin: 0;
    color: #8a9bb0;
    font-size: .88rem;
    line-height: 1.75;
}

.footer-col h2 {
    margin: 0 0 1rem;
    color: var(--ink);
    font-size: .98rem;
    font-weight: 720;
}

.footer-col ul {
    display: grid;
    margin: 0;
    padding: 0;
    list-style: none;
    gap: .7rem;
}

.footer-bottom {
    display: flex;
    padding-block: 1.15rem 1.5rem;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    border-top: 1px solid var(--line);
    color: #98a7ba;
    font-size: .84rem;
    gap: .75rem 1.5rem;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Authentication */
.auth-page {
    display: flex;
    min-height: 100svh;
    padding: 1.25rem;
    align-items: center;
    justify-content: center;
    color: #1e293b;
    background:
        radial-gradient(900px 500px at 0 0, rgba(59, 130, 246, .08), transparent 65%),
        #eef2f7;
}

.toast {
    position: fixed;
    top: max(1rem, env(safe-area-inset-top));
    right: max(1rem, env(safe-area-inset-right));
    z-index: 60;
    display: flex;
    max-width: min(380px, calc(100vw - 2rem));
    padding: .85rem 1.1rem;
    align-items: flex-start;
    gap: .55rem;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .12);
    opacity: 0;
    pointer-events: none;
    transform: translateX(calc(100% + 2rem));
    transition: transform .3s ease, opacity .3s ease;
    font-size: .9rem;
    line-height: 1.5;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast.ok {
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
    background: #eff6ff;
}

.toast.err {
    border: 1px solid #fecaca;
    color: #b91c1c;
    background: #fef2f2;
}

.auth-shell {
    display: grid;
    width: min(940px, 100%);
    min-height: 550px;
    overflow: hidden;
    grid-template-columns: 1fr 1fr;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 25px 60px rgba(15, 23, 42, .12);
}

.auth-visual {
    position: relative;
    display: flex;
    overflow: hidden;
    padding: 2.4rem 2rem 1.5rem;
    flex-direction: column;
    color: #fff;
    background: linear-gradient(160deg, #4f8ff7 0%, #3b82f6 45%, #2563eb 100%);
}

.auth-visual::before,
.auth-visual::after {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    content: "";
    pointer-events: none;
}

.auth-visual::before {
    top: -60px;
    left: -50px;
    width: 220px;
    height: 220px;
}

.auth-visual::after {
    right: -50px;
    bottom: 40px;
    width: 180px;
    height: 180px;
    background: rgba(255, 255, 255, .08);
}

.auth-brand {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: .78rem;
    font-size: clamp(1.35rem, 2.4vw, 1.8rem);
    font-weight: 820;
}

.auth-brand img {
    width: 46px;
    height: 46px;
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 12px;
    background: rgba(255, 255, 255, .9);
    object-fit: contain;
}

.auth-sub {
    position: relative;
    z-index: 1;
    margin: .75rem 0 0;
    font-size: .95rem;
    line-height: 1.65;
    opacity: .92;
}

.panel-art {
    position: relative;
    z-index: 1;
    display: flex;
    min-height: 280px;
    margin-top: auto;
    align-items: flex-end;
    justify-content: center;
}

.panel-art svg {
    width: min(100%, 350px);
    height: auto;
}

.back-home {
    position: relative;
    z-index: 1;
    display: inline-flex;
    width: fit-content;
    margin-top: .5rem;
    align-items: center;
    gap: .4rem;
    color: rgba(255, 255, 255, .9);
    font-size: .86rem;
}

.back-home:hover,
.back-home:focus-visible {
    color: #fff;
}

.auth-form-panel {
    display: flex;
    max-height: calc(100svh - 2.5rem);
    overflow-y: auto;
    padding: 2.2rem 2.5rem;
    flex-direction: column;
    justify-content: center;
    scrollbar-width: thin;
}

.auth-heading h1 {
    margin: 0 0 .42rem;
    color: #1e293b;
    font-size: 1.65rem;
    font-weight: 820;
}

.auth-heading p {
    margin: 0 0 1.45rem;
    color: #8796aa;
    font-size: .9rem;
    line-height: 1.6;
}

.field {
    margin-bottom: .9rem;
}

.field > label {
    display: inline-block;
    margin: 0 0 .38rem .1rem;
    color: #52657b;
    font-size: .82rem;
    font-weight: 600;
}

.field-box {
    display: flex;
    min-height: 48px;
    padding-inline: .95rem;
    align-items: center;
    gap: .72rem;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.field-box:focus-within {
    border-color: #3b82f6;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, .14);
}

.field-icon {
    width: 1rem;
    color: #94a3b8;
    text-align: center;
}

.field-box input {
    width: 100%;
    min-width: 0;
    padding: .82rem 0;
    border: 0;
    outline: 0;
    color: #1e293b;
    background: transparent;
    font-size: .94rem;
}

.field-box input::placeholder {
    color: #a5b2c2;
}

.eye {
    display: grid;
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 7px;
    color: #94a3b8;
    background: none;
    cursor: pointer;
}

.eye:hover,
.eye:focus-visible {
    color: #3b82f6;
    background: #eef5ff;
}

.field-error {
    display: none;
    margin: .34rem 0 0 .15rem;
    color: #dc2626;
    font-size: .79rem;
}

.field.has-error .field-box {
    border-color: #fca5a5;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, .08);
}

.field.has-error .field-error {
    display: block;
}

.captcha-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 132px;
    gap: .58rem;
}

.captcha-question {
    display: flex;
    min-height: 48px;
    padding: .5rem .72rem;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    color: #1d4ed8;
    background:
        repeating-linear-gradient(-15deg, rgba(59, 130, 246, .04) 0 7px, rgba(34, 197, 94, .06) 7px 14px),
        #eff6ff;
    cursor: pointer;
    font-weight: 720;
    letter-spacing: .02em;
}

.captcha-question:hover,
.captcha-question:focus-visible {
    border-color: #60a5fa;
    background-color: #dbeafe;
}

.captcha-question[disabled] {
    cursor: wait;
    opacity: .68;
}

.captcha-help {
    margin: .34rem 0 0 .15rem;
    color: #94a3b8;
    font-size: .75rem;
}

.row-between {
    display: flex;
    margin: .12rem 0 1.12rem;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    font-size: .86rem;
}

.row-between a,
.auth-switch a,
.agreement-check a {
    color: #2563eb;
}

.row-between a:hover,
.auth-switch a:hover,
.agreement-check a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.remember,
.agreement-check {
    display: flex;
    align-items: flex-start;
    gap: .48rem;
    color: #64748b;
    cursor: pointer;
    user-select: none;
}

.remember {
    align-items: center;
}

.remember input,
.agreement-check input {
    width: 1rem;
    height: 1rem;
    flex: 0 0 auto;
    accent-color: #2563eb;
}

.agreement-check {
    margin: .1rem 0 1.1rem;
    font-size: .83rem;
    line-height: 1.5;
}

.agreement-check input {
    margin-top: .17rem;
    accent-color: #16a34a;
}

.auth-submit {
    display: flex;
    width: 100%;
    min-height: 50px;
    padding: .9rem 1rem;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    border: 0;
    border-radius: 12px;
    color: #fff;
    cursor: pointer;
    font-size: .98rem;
    font-weight: 720;
    transition: filter .2s ease, transform .15s ease, box-shadow .2s ease;
}

.auth-submit.primary {
    background: linear-gradient(135deg, #4b8df8, #2563eb);
    box-shadow: 0 10px 24px rgba(37, 99, 235, .2);
}

.auth-submit.success {
    background: linear-gradient(135deg, #35c76f, #16a34a);
    box-shadow: 0 10px 24px rgba(22, 163, 74, .18);
}

.auth-submit:hover:not(:disabled),
.auth-submit:focus-visible:not(:disabled) {
    filter: brightness(.96) saturate(1.08);
    transform: translateY(-1px);
}

.auth-submit:active:not(:disabled) {
    transform: translateY(0) scale(.995);
}

.auth-submit:disabled {
    cursor: not-allowed;
    opacity: .68;
    box-shadow: none;
}

.auth-submit.is-loading i {
    animation: spin .75s linear infinite;
}

.auth-switch {
    margin: 1.15rem 0 0;
    color: #64748b;
    font-size: .88rem;
    text-align: center;
}

.auth-info-card {
    display: flex;
    margin: .35rem 0 1.25rem;
    padding: 1rem;
    align-items: flex-start;
    gap: .85rem;
    border: 1px solid #bfdbfe;
    border-radius: 14px;
    color: #334155;
    background: #eff6ff;
}

.auth-info-icon {
    display: grid;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    place-items: center;
    border-radius: 11px;
    color: #2563eb;
    background: #dbeafe;
}

.auth-info-card strong {
    display: block;
    margin-bottom: .32rem;
    color: #1e3a8a;
    font-size: .92rem;
}

.auth-info-card p {
    margin: 0;
    color: #52657b;
    font-size: .84rem;
    line-height: 1.65;
}

.auth-return {
    text-decoration: none;
}

/* Legal documents */
.legal-page {
    min-height: 100vh;
    color: var(--ink);
    background:
        radial-gradient(900px 400px at 20% -10%, #dcebff, transparent 60%),
        #f5f8fc;
}

.legal-header {
    border-bottom: 1px solid rgba(230, 238, 247, .9);
    background: rgba(255, 255, 255, .9);
    backdrop-filter: blur(12px);
}

.legal-nav {
    display: flex;
    min-height: 70px;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.legal-back {
    display: inline-flex;
    align-items: center;
    gap: .42rem;
    color: #52657b;
    font-size: .88rem;
}

.legal-back:hover {
    color: #2563eb;
}

.legal-main {
    padding-block: 3rem;
}

.legal-card {
    width: min(850px, 100%);
    margin-inline: auto;
    padding: clamp(1.5rem, 4vw, 3rem);
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 18px 48px rgba(15, 27, 45, .07);
}

.legal-card > header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--line);
}

.legal-kicker {
    display: block;
    margin-bottom: .45rem;
    color: #3b82f6;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .16em;
}

.legal-card h1 {
    margin: 0 0 .55rem;
    font-family: var(--display);
    font-size: clamp(1.8rem, 4vw, 2.5rem);
}

.legal-card header p {
    margin: 0;
    color: #94a3b8;
    font-size: .84rem;
}

.legal-content {
    color: #3d4f66;
    font-size: .95rem;
    line-height: 2;
    overflow-wrap: anywhere;
}

.legal-footer {
    padding-block: 1.3rem 2rem;
    color: #8a9bb0;
    font-size: .82rem;
}

.legal-footer .wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: .75rem 1.25rem;
}

.legal-footer a:hover {
    color: #2563eb;
}

@keyframes rise {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes float-in {
    from { opacity: 0; transform: translateX(24px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes spin {
    to { transform: rotate(1turn); }
}

@media (max-width: 960px) {
    .nav-links {
        position: absolute;
        top: 72px;
        right: 0;
        left: 0;
        display: none;
        padding: 1rem 1.25rem 1.25rem;
        flex-direction: column;
        align-items: flex-start;
        gap: .9rem;
        border-bottom: 1px solid var(--line);
        background: #fff;
        box-shadow: 0 12px 20px rgba(15, 27, 45, .06);
    }

    .nav-links.open {
        display: flex;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .hero {
        padding-top: 2rem;
        grid-template-columns: 1fr;
    }

    .hero-visual {
        min-height: 340px;
        order: -1;
    }

    .hero-art {
        min-height: 340px;
    }

    .why-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.75rem 1rem;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .footer-main {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 820px) {
    .auth-page {
        align-items: flex-start;
        padding: 0;
        background: #fff;
    }

    .auth-shell {
        min-height: 100svh;
        grid-template-columns: 1fr;
        border-radius: 0;
        box-shadow: none;
    }

    .auth-visual {
        min-height: 210px;
        padding: 1.6rem 1.35rem .35rem;
    }

    .auth-brand {
        font-size: 1.35rem;
    }

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

    .auth-sub {
        font-size: .87rem;
    }

    .panel-art {
        position: absolute;
        right: 1rem;
        bottom: .25rem;
        width: min(46vw, 220px);
        min-height: 130px;
        opacity: .85;
    }

    .back-home {
        margin-top: 1.1rem;
    }

    .auth-form-panel {
        max-height: none;
        padding: 1.8rem 1.35rem max(2rem, env(safe-area-inset-bottom));
        justify-content: flex-start;
    }
}

@media (max-width: 560px) {
    .wrap,
    .notice-bar {
        width: min(100% - 1.5rem, 1180px);
    }

    .nav {
        min-height: 66px;
    }

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

    .brand-name {
        max-width: 150px;
        font-size: .93rem;
    }

    .brand-host {
        max-width: 150px;
    }

    .nav-links {
        top: 66px;
    }

    .btn-coral {
        padding: .65rem .9rem;
        font-size: .82rem;
    }

    .hero {
        padding-block: 1.35rem 2rem;
        gap: 1rem;
    }

    .hero-visual,
    .hero-art {
        min-height: 270px;
    }

    .desk-scene {
        width: min(300px, 80%);
    }

    .float-card {
        padding: .56rem .65rem;
        border-radius: 12px;
    }

    .card-latency { right: 2%; }
    .card-chart { left: 0; }
    .card-security { right: 5%; bottom: 12%; }

    .why-section,
    .scenarios {
        padding-block: 3.3rem;
    }

    .why-grid {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        align-items: flex-start;
        flex-direction: column;
    }

    .captcha-row {
        grid-template-columns: minmax(0, 1fr) 116px;
    }

    .captcha-question {
        padding-inline: .45rem;
        font-size: .82rem;
    }

    .legal-nav .brand-name {
        max-width: 140px;
    }

    .legal-back {
        font-size: .8rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
