* {
    box-sizing: border-box;
}

:root {
    --bg: #f8fafc;
    --bg-soft: #eef4ff;
    --card: rgba(255, 255, 255, 0.88);
    --line: rgba(148, 163, 184, 0.22);
    --text: #0f172a;
    --muted: #475569;
    --soft: #64748b;
    --primary: #2563eb;
    --primary-2: #60a5fa;
    --success: #16a34a;
    --shadow: 0 30px 80px rgba(37, 99, 235, 0.10);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
    --container: 1040px;
    --container-wide: 1320px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 20% 20%, rgba(96, 165, 250, 0.20), transparent 30%),
        radial-gradient(circle at 80% 25%, rgba(37, 99, 235, 0.12), transparent 25%),
        radial-gradient(circle at 50% 80%, rgba(191, 219, 254, 0.35), transparent 30%),
        linear-gradient(135deg, #f8fafc, #eef4ff);
}

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

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

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

.bg-grid {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(15, 23, 42, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, 0.04) 1px, transparent 1px);
    background-size: 36px 36px;
    mask-image: radial-gradient(circle at center, black 35%, transparent 85%);
    pointer-events: none;
}

.blob {
    position: fixed;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.35;
    pointer-events: none;
    animation: floatBlob 14s ease-in-out infinite;
}

.blob.one {
    top: -80px;
    left: -40px;
    background: #93c5fd;
}

.blob.two {
    right: -90px;
    bottom: -120px;
    background: #bfdbfe;
    animation-delay: -4s;
}

@keyframes floatBlob {
    0%, 100% {
        transform: translateY(0) translateX(0) scale(1);
    }
    50% {
        transform: translateY(24px) translateX(12px) scale(1.08);
    }
}

.page-wrap {
    position: relative;
    min-height: 100vh;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-card {
    position: relative;
    width: 100%;
    max-width: var(--container);
    padding: 36px;
    border-radius: var(--radius-xl);
    background: var(--card);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.page-card--wide {
    max-width: var(--container-wide);
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.logo-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.35);
    animation: pulse 2s infinite;
    flex-shrink: 0;
}

.logo-dot.is-neutral {
    background: var(--primary);
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.28);
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.35);
    }
    70% {
        box-shadow: 0 0 0 12px rgba(22, 163, 74, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(22, 163, 74, 0);
    }
}

.brand-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.brand-title {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--primary);
    text-transform: uppercase;
}

.brand-subtitle {
    font-size: 13px;
    color: var(--soft);
}

.topbar-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.topbar-link {
    font-size: 14px;
    color: var(--soft);
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.7);
    transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.topbar-link:hover,
.topbar-link.is-active {
    transform: translateY(-1px);
    color: var(--text);
    background: rgba(255, 255, 255, 0.95);
}

.is-disabled {
    pointer-events: none;
    opacity: 0.5;
    cursor: not-allowed;
}

.clock {
    font-size: 14px;
    color: var(--soft);
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.7);
}

.page-title,
h1 {
    margin: 0 0 18px;
    font-size: 54px;
    line-height: 1.05;
    letter-spacing: -0.03em;
}

.page-lead,
.lead {
    margin: 0 0 24px;
    max-width: 720px;
    font-size: 18px;
    line-height: 1.75;
    color: var(--muted);
}

.actions,
.panel-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 10px;
}

.btn {
    appearance: none;
    border: 0;
    cursor: pointer;
    padding: 14px 20px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 700;
    transition: transform 0.18s ease, opacity 0.18s ease, background 0.18s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #3b82f6);
    color: #fff;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.8);
    color: var(--text);
    border: 1px solid var(--line);
}

.content-stack {
    display: grid;
    gap: 18px;
}

.content-section {
    padding: 24px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.72);
}

.section-kicker {
    margin: 0 0 12px;
    font-size: 14px;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
}

.section-text {
    margin: 0;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.75;
}

.meta-chip {
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.76);
    color: var(--soft);
    font-size: 14px;
}

.footer {
    margin-top: 26px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    color: var(--soft);
    font-size: 14px;
}

.footer a:hover {
    color: var(--text);
}

.toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%) translateY(20px);
    opacity: 0;
    pointer-events: none;
    padding: 14px 18px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.96);
    color: var(--text);
    border: 1px solid var(--line);
    box-shadow: 0 15px 30px rgba(15, 23, 42, 0.12);
    transition: all 0.25s ease;
    z-index: 30;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.error-card {
    max-width: 860px;
}

.error-hero {
    padding: 8px 0 4px;
}

.error-code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.78);
    color: var(--primary);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 18px;
}

/* >= 1400 */
@media (min-width: 1400px) {
    .page-card {
        padding: 40px;
    }

    .page-title,
    h1 {
        font-size: 58px;
    }
}

/* <= 1399 */
@media (max-width: 1399.98px) {
    .page-card {
        padding: 32px;
    }
}

/* <= 1199 */
@media (max-width: 1199.98px) {
    .page-title,
    h1 {
        font-size: 46px;
    }
}

/* <= 991 */
@media (max-width: 991.98px) {
    .page-wrap {
        padding: 20px;
    }

    .page-title,
    h1 {
        font-size: 40px;
    }

    .page-lead,
    .lead {
        font-size: 17px;
    }
}

/* <= 767 */
@media (max-width: 767.98px) {
    .page-card {
        padding: 24px;
        border-radius: 22px;
    }

    .topbar {
        align-items: flex-start;
    }

    .page-title,
    h1 {
        font-size: 34px;
    }

    .footer {
        flex-direction: column;
    }
}

/* < 576 */
@media (max-width: 575.98px) {
    .page-wrap {
        padding: 14px;
    }

    .page-card {
        padding: 18px;
        border-radius: 20px;
    }

    .page-title,
    h1 {
        font-size: 30px;
    }

    .page-lead,
    .lead,
    .section-text {
        font-size: 15px;
        line-height: 1.65;
    }

    .panel-actions,
    .actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .topbar-nav {
        width: 100%;
    }

    .clock {
        width: 100%;
        text-align: center;
    }

    .error-code {
        margin-bottom: 14px;
    }
}