:root {
    --bg: #f6f3ef;
    --ink: #171717;
    --muted: #68625c;
    --line: #ded8cf;
    --panel: #fffaf4;
    --accent: #126b62;
    --accent-2: #e85234;
    --danger: #b3212c;
    --shadow: 0 20px 70px rgba(20, 18, 15, 0.12);
    --page-pad: clamp(16px, 3.6vw, 56px);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--bg);
    color: var(--ink);
    font-family: "Helvetica Neue", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-weight: 300;
}

body {
    min-height: 100%;
    margin: 0;
    font-weight: 300;
    letter-spacing: 0;
}

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

main {
    width: 100%;
    margin: 0;
    padding: 34px var(--page-pad) 56px;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px var(--page-pad);
    background: rgba(246, 243, 239, 0.92);
    border-bottom: 1px solid rgba(222, 216, 207, 0.9);
    backdrop-filter: blur(18px);
}

.brand,
.nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand {
    font-weight: 500;
    letter-spacing: 0;
}

.brand-logo {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    box-shadow: 0 8px 18px rgba(20, 18, 15, 0.14);
}

.nav {
    flex-wrap: wrap;
    justify-content: flex-end;
    color: var(--muted);
    font-size: 14px;
}

.button,
button {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 8px;
    padding: 0 18px;
    color: #fff;
    background: var(--ink);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

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

.button.small {
    min-height: 34px;
    padding: 0 12px;
}

.button.full {
    width: 100%;
}

.button.secondary {
    color: var(--ink);
    background: #e7e0d7;
}

.button.danger {
    background: var(--danger);
}

.home-grid,
.dashboard-grid,
.download-layout,
.admin-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 24px;
    align-items: start;
}

.home .topbar {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0));
    border-bottom-color: transparent;
    backdrop-filter: none;
}

.home .topbar,
.home .brand,
.home .nav,
.home.header-light .topbar,
.home.header-light .brand,
.home.header-light .nav {
    color: #fffaf4;
    text-shadow: 0 1px 18px rgba(0, 0, 0, 0.42);
}

.home.header-light .button.small {
    color: #111;
    background: rgba(255, 250, 244, 0.92);
}

.home.header-dark .topbar,
.home.header-dark .brand,
.home.header-dark .nav {
    color: #171717;
    text-shadow: 0 1px 18px rgba(255, 250, 244, 0.42);
}

.home.header-dark .topbar {
    background: linear-gradient(180deg, rgba(255, 250, 244, 0.46), rgba(255, 250, 244, 0));
}

.home.header-dark .button.small {
    color: #fff;
    background: #171717;
}

.home main {
    position: relative;
    z-index: 2;
    min-height: calc(100vh - 88px);
    padding-top: clamp(18px, 5vh, 70px);
    pointer-events: none;
}

.home-bg-ad {
    position: fixed;
    inset: 0;
    z-index: 0;
    display: block;
    overflow: hidden;
    background: var(--bg);
    cursor: default;
    pointer-events: none;
}

.home-bg-ad.is-clickable {
    cursor: pointer;
    pointer-events: auto;
}

.home-bg-ad::after {
    position: absolute;
    inset: 0;
    content: "";
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.24) 44%, rgba(0, 0, 0, 0.54)),
        linear-gradient(180deg, rgba(0, 0, 0, 0.36), rgba(0, 0, 0, 0.05) 52%, rgba(0, 0, 0, 0.46));
    pointer-events: none;
}

.home-bg-media {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-bg-ad picture {
    display: block;
    width: 100%;
    height: 100%;
}

.bg-ad-credit {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 4;
    border: 1px solid rgba(23, 23, 23, 0.12);
    border-radius: 8px;
    padding: 8px 10px;
    background: rgba(255, 250, 244, 0.82);
    color: var(--muted);
    font-size: 12px;
    backdrop-filter: blur(16px);
}

.home .topbar,
.home .site-footer,
.home .footer-ad {
    position: relative;
    z-index: 3;
    pointer-events: auto;
}

.home.is-dragging .dropzone {
    border-color: var(--accent-2);
    background: #fff2ea;
}

.admin-shell {
    grid-template-columns: 220px minmax(0, 1fr);
}

.home-grid {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
    gap: clamp(20px, 5vw, 78px);
    position: relative;
    z-index: 2;
    min-height: calc(100vh - 190px);
    align-items: center;
    pointer-events: none;
}

.transfer-card,
.panel,
.price-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.transfer-card,
.panel {
    padding: clamp(20px, 3vw, 32px);
}

.transfer-card {
    grid-column: 2;
    justify-self: end;
    width: min(420px, 100%);
    max-width: 420px;
    padding: 12px;
    pointer-events: auto;
    transition:
        background 260ms ease,
        box-shadow 360ms ease,
        transform 700ms cubic-bezier(.14, 1.55, .28, 1);
}

.transfer-card:hover,
.transfer-card:focus-within,
.transfer-card.has-files {
    background: rgba(255, 250, 244, 0.96);
    box-shadow: 0 24px 80px rgba(12, 10, 8, 0.22);
    transform: translateY(-2px);
}

.card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.transfer-card h1 {
    margin-bottom: 10px;
    font-size: clamp(26px, 2.5rem, 40px);
    line-height: 1;
}

.upload-details {
    display: grid;
    grid-template-rows: 0fr;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px) scale(.985);
    transform-origin: top;
    transition:
        grid-template-rows 620ms cubic-bezier(.16, 1.12, .3, 1),
        opacity 260ms ease,
        transform 560ms cubic-bezier(.18, 1.34, .34, 1),
        margin-top 360ms ease;
}

.upload-details-inner {
    min-height: 0;
    overflow: hidden;
}

.transfer-card:hover .upload-details,
.transfer-card:focus-within .upload-details,
.transfer-card.has-files .upload-details {
    grid-template-rows: 1fr;
    margin-top: 12px;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.transfer-card:hover .upload-details-inner,
.transfer-card:focus-within .upload-details-inner,
.transfer-card.has-files .upload-details-inner {
    animation: upload-elastic 620ms cubic-bezier(.18, 1.34, .34, 1);
}

@keyframes upload-elastic {
    0% {
        transform: translateY(-8px) scale(.98);
    }
    72% {
        transform: translateY(2px) scale(1.012);
    }
    100% {
        transform: translateY(0) scale(1);
    }
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 18px;
    font-size: clamp(34px, 4rem, 64px);
    line-height: 0.95;
    letter-spacing: 0;
    font-weight: 300;
}

.panel h1,
.price-card h2 {
    font-size: clamp(26px, 2.375rem, 38px);
    line-height: 1;
}

h2 {
    font-size: 24px;
    line-height: 1.1;
    font-weight: 350;
}

.pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    border-radius: 999px;
    padding: 0 10px;
    color: #fff;
    background: var(--accent);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.pill.success {
    background: var(--accent-2);
}

.dropzone {
    position: relative;
    display: grid;
    min-height: 82px;
    margin: 0;
    place-items: center;
    gap: 4px;
    border: 2px dashed #bbb2a5;
    border-radius: 8px;
    background: rgba(251, 247, 241, 0.94);
    text-align: center;
    cursor: pointer;
}

.dropzone input {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    opacity: 0;
    pointer-events: none;
}

.drop-icon {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: var(--accent-2);
    font-size: 20px;
    line-height: 1;
}

label {
    display: grid;
    gap: 8px;
    margin-bottom: 14px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 500;
}

input,
select,
textarea {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 12px;
    color: var(--ink);
    background: #fff;
    font: inherit;
}

textarea {
    resize: vertical;
}

.field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.field-grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
}

.checkbox input {
    width: 18px;
    min-height: 18px;
}

.checkbox.inline {
    align-self: center;
    margin-top: 24px;
}

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

.warning,
.flash.error {
    color: #7c1018;
    background: #ffe7e5;
    border: 1px solid #ffc7c1;
}

.flash.success {
    color: #0d4e45;
    background: #dff6ef;
    border: 1px solid #b5eadb;
}

.flash {
    width: 100%;
    margin: 0 0 18px;
    border-radius: 8px;
    padding: 12px 14px;
}

.ad-box {
    display: grid;
    gap: 10px;
    overflow: hidden;
    border: 1px solid #d8d0c5;
    border-radius: 8px;
    padding: 12px;
    background: #fff;
}

.home-ad-rail {
    grid-column: 1;
    grid-row: 1;
    min-height: min(64vh, 560px);
    align-self: stretch;
    display: grid;
    align-items: center;
    pointer-events: auto;
}

.home-ad-rail:empty {
    pointer-events: none;
}

.home-ad-rail .ad-box {
    min-height: min(56vh, 520px);
    border-color: rgba(255, 250, 244, 0.3);
    background: rgba(255, 250, 244, 0.18);
    color: #fffaf4;
    backdrop-filter: blur(10px);
}

.home-ad-rail .ad-box img,
.home-ad-rail .ad-box video {
    min-height: 300px;
}

.ad-box img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 6px;
}

.ad-box video {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 6px;
}

.footer-ad {
    width: 100%;
    margin: 0 0 22px;
    padding: 0 var(--page-pad);
}

.success-panel,
.pricing-head {
    width: min(780px, 100%);
    margin: 0 auto 28px;
    text-align: center;
}

.auth-layout {
    display: grid;
    grid-template-columns: minmax(280px, 0.9fr) minmax(420px, 1.1fr);
    gap: clamp(20px, 4vw, 56px);
    align-items: start;
}

.auth-benefits {
    padding: clamp(24px, 4vw, 44px) 0;
}

.auth-benefits p {
    max-width: 620px;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.55;
}

.auth-forms {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.feature-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 22px;
}

.feature-list span {
    display: grid;
    gap: 6px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
    background: rgba(255, 250, 244, 0.78);
}

.feature-list strong {
    font-weight: 500;
}

.feature-list small {
    line-height: 1.35;
}

.security-band {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1.05fr);
    gap: 24px;
    align-items: start;
    margin: 0 0 28px;
    padding: clamp(22px, 3vw, 34px);
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #171717;
    color: #fffaf4;
}

.security-band p,
.security-band small {
    color: rgba(255, 250, 244, 0.72);
}

.security-band .feature-list {
    margin-top: 0;
}

.security-band .feature-list span {
    border-color: rgba(255, 250, 244, 0.16);
    background: rgba(255, 250, 244, 0.08);
}

.compact-list {
    grid-template-columns: 1fr;
}

.copy-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    margin: 22px 0;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.price-card {
    display: grid;
    gap: 16px;
    padding: 22px;
}

.price {
    font-size: 32px;
    font-weight: 400;
}

.price small {
    margin-left: 4px;
    font-size: 14px;
    font-weight: 500;
}

.price-card ul {
    display: grid;
    gap: 10px;
    margin: 0;
    padding-left: 18px;
}

.stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 18px 0;
}

.stats span {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
    background: #fff;
}

.stats strong {
    display: block;
    font-size: 24px;
    font-weight: 400;
}

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

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

th,
td {
    border-bottom: 1px solid var(--line);
    padding: 12px;
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
}

.file-list,
.stack {
    display: grid;
    gap: 14px;
}

.file-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
    background: #fff;
}

.admin-nav {
    position: sticky;
    top: 84px;
    display: grid;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    background: var(--panel);
}

.admin-nav a {
    border-radius: 8px;
    padding: 10px 12px;
    color: var(--muted);
}

.admin-nav a:hover {
    color: var(--ink);
    background: #fff;
}

.compact {
    padding: 20px;
}

.site-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    margin: 0;
    padding: 28px var(--page-pad) 36px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 14px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.site-footer a {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.payment-reference {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 20px 0;
}

.payment-reference span {
    display: grid;
    gap: 6px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
    background: #fff;
    color: var(--muted);
}

.payment-reference strong {
    color: var(--ink);
    font-size: 22px;
    font-weight: 400;
}

.inline-form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.legal-page {
    max-width: 780px;
    margin: 0 auto;
}

@media (max-width: 980px) {
    .home-grid,
    .dashboard-grid,
    .download-layout,
    .admin-shell,
    .pricing-grid,
    .auth-layout,
    .auth-forms,
    .security-band {
        grid-template-columns: 1fr;
    }

    .transfer-card {
        grid-column: auto;
        max-width: 420px;
        justify-self: end;
    }

    .admin-nav {
        position: static;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .stats,
    .field-grid.three,
    .feature-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    main {
        padding-top: 18px;
    }

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

    .nav {
        justify-content: flex-start;
    }

    .field-grid,
    .field-grid.three,
    .stats,
    .feature-list,
    .copy-row,
    .payment-reference,
    .admin-nav {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 38px;
    }

    .card-head {
        flex-direction: column-reverse;
    }

    .home-grid {
        min-height: auto;
    }

    .transfer-card {
        width: 100%;
        max-width: none;
        justify-self: stretch;
    }

    .home-ad-rail {
        min-height: 220px;
    }
}
