:root {
    --bg-start: #e8f4ff;
    --bg-end: #f6fbff;
    --ink: #0f2233;
    --muted: #4a647a;
    --primary: #086ec9;
    --primary-dark: #00509a;
    --surface: #ffffff;
    --surface-soft: #f2f8ff;
    --line: #cfe1f3;
    --danger-bg: #ffe8e8;
    --danger-ink: #931515;
    --shadow: 0 20px 45px rgba(8, 110, 201, 0.16);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family: 'Space Grotesk', 'Segoe UI', sans-serif;
    color: var(--ink);
    background: linear-gradient(130deg, var(--bg-start), var(--bg-end));
    position: relative;
    overflow-x: hidden;
}

.bg-grid {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        radial-gradient(circle at 85% 15%, rgba(8, 110, 201, 0.12), transparent 34%),
        linear-gradient(rgba(8, 110, 201, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(8, 110, 201, 0.05) 1px, transparent 1px);
    background-size: 100% 100%, 24px 24px, 24px 24px;
    z-index: -1;
}

.site-header {
    width: min(1120px, 92%);
    margin: 1.2rem auto;
    padding: 0.9rem 1.1rem;
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(255, 255, 255, 0.92);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    backdrop-filter: blur(8px);
    box-shadow: 0 8px 25px rgba(0, 80, 154, 0.1);
}

.brand {
    display: flex;
    gap: 0.65rem;
    align-items: center;
    text-decoration: none;
    color: var(--ink);
}

.brand-badge {
    width: 2rem;
    height: 2rem;
    display: inline-grid;
    place-items: center;
    border-radius: 0.65rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(150deg, #0a80e7, #005cb3);
}

.brand-word {
    font-family: 'Sora', sans-serif;
    font-size: 1.05rem;
    letter-spacing: 0.02em;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.nav-link {
    text-decoration: none;
    color: var(--muted);
    padding: 0.5rem 0.8rem;
    border-radius: 0.6rem;
    font-weight: 500;
}

.nav-link:hover,
.nav-link:focus-visible {
    color: var(--primary-dark);
    background: #e9f3ff;
}

.nav-link.is-active {
    color: #fff;
    background: var(--primary);
}

.page-wrap {
    width: min(1120px, 92%);
    margin: 1.5rem auto 3rem;
}

.hero-shell {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 2rem;
    align-items: start;
}

.hero-copy h1 {
    margin: 0.2rem 0 1rem;
    font-family: 'Sora', sans-serif;
    font-size: clamp(1.8rem, 3vw, 3rem);
    line-height: 1.1;
    max-width: 14ch;
}

.hero-copy p {
    color: var(--muted);
    max-width: 56ch;
}

.eyebrow {
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.72rem;
    color: #00509a;
    font-weight: 700;
}

.hero-points {
    list-style: none;
    padding: 0;
    margin: 1.4rem 0 0;
    display: grid;
    gap: 0.65rem;
}

.hero-points li {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid #d8e8f8;
    border-radius: 0.75rem;
    padding: 0.7rem 0.85rem;
    color: #23445f;
}

.auth-card,
.policy-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 1rem;
    box-shadow: var(--shadow);
}

.auth-card {
    padding: 1.5rem;
}

.auth-card h2 {
    margin-top: 0;
    margin-bottom: 0.35rem;
}

.muted {
    color: var(--muted);
}

.alert-error {
    margin-top: 0.8rem;
    margin-bottom: 1rem;
    padding: 0.75rem 0.8rem;
    border-radius: 0.6rem;
    background: var(--danger-bg);
    color: var(--danger-ink);
    border: 1px solid #ffc7c7;
}

form {
    margin-top: 1rem;
    display: grid;
    gap: 0.6rem;
}

label {
    font-weight: 600;
    color: #21435d;
    margin-top: 0.2rem;
}

input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #bed4ea;
    border-radius: 0.65rem;
    font: inherit;
    color: var(--ink);
    background: #fcfeff;
}

input:focus-visible {
    outline: 2px solid #1f8fff;
    outline-offset: 1px;
}

button {
    margin-top: 0.9rem;
    border: 0;
    border-radius: 0.7rem;
    padding: 0.75rem 1rem;
    font: inherit;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(130deg, #0b7de3, #005bb1);
    cursor: pointer;
}

button:hover,
button:focus-visible {
    filter: brightness(0.96);
}

.mini-note {
    color: #355470;
    font-size: 0.9rem;
}

.mini-note a {
    color: var(--primary-dark);
    font-weight: 600;
}

.policy-shell {
    display: grid;
    gap: 1rem;
}

.policy-head h1 {
    margin: 0.3rem 0;
    font-family: 'Sora', sans-serif;
    font-size: clamp(1.8rem, 3vw, 2.5rem);
}

.policy-card {
    padding: 1.5rem;
}

.policy-card h2 {
    margin-top: 1.3rem;
    margin-bottom: 0.35rem;
    font-family: 'Sora', sans-serif;
    color: #12395a;
    font-size: 1.04rem;
}

.policy-card h2:first-child {
    margin-top: 0;
}

.policy-card p {
    margin-top: 0;
    color: #2d4d68;
    line-height: 1.52;
}

.table-shell {
    overflow-x: auto;
}

.transactions-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.96rem;
}

.transactions-table th,
.transactions-table td {
    padding: 0.85rem 0.75rem;
    border-bottom: 1px solid var(--line);
    text-align: left;
    white-space: nowrap;
}

.transactions-table th {
    font-family: 'Sora', sans-serif;
    color: #12395a;
    background: var(--surface-soft);
}

.site-footer {
    width: min(1120px, 92%);
    margin: 0 auto 1.2rem;
    font-size: 0.92rem;
    color: #2b506d;
}

.fade-in {
    animation: rise-in 0.45s ease-out both;
}

.fade-in-delay {
    animation: rise-in 0.6s ease-out both;
}

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

@media (max-width: 900px) {
    .hero-shell {
        grid-template-columns: 1fr;
    }

    .hero-copy h1 {
        max-width: none;
    }
}

@media (max-width: 560px) {
    .site-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .site-nav {
        width: 100%;
    }

    .nav-link {
        padding-left: 0.65rem;
        padding-right: 0.65rem;
    }
}
