:root {
    color-scheme: light;
    --ink: #241b12;
    --muted: #766a5a;
    --line: #23486a;
    --blue-soft: #dcf0f5;
    --blue-mid: #c9e6ef;
    --blue-deep: #1f4468;
    --tan: #a8956b;
    --tan-dark: #6f5c39;
    --card-bg: rgba(255, 251, 244, 0.92);
    --shadow-lg: 0 30px 70px rgba(48, 33, 15, 0.2);
    --shadow-sm: 0 10px 24px rgba(48, 33, 15, 0.1);
    --radius-xl: 30px;
    --radius-lg: 22px;
    --radius-md: 16px;
    --font-display: "Baloo 2", ui-rounded, "Segoe UI", sans-serif;
    --font-body:
        "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    background-color: #efe3d0;
    background-image:
        radial-gradient(
            circle at 14% 8%,
            rgba(255, 255, 255, 0.75),
            transparent 34rem
        ),
        radial-gradient(
            circle at 88% 14%,
            rgba(211, 185, 138, 0.35),
            transparent 30rem
        ),
        linear-gradient(
            180deg,
            rgba(250, 242, 226, 0.82),
            rgba(224, 207, 180, 0.82)
        ),
        url("assets/background.png");
    background-attachment: fixed;
    background-size: auto, auto, auto, cover;
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
}

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

button {
    cursor: pointer;
}

.shell {
    width: min(960px, calc(100% - 28px));
    margin: 0 auto;
    padding: clamp(28px, 6vw, 60px) 0;
}

.hero-card {
    position: relative;
    padding: clamp(26px, 5vw, 58px);
    border: 1px solid rgba(255, 255, 255, 0.75);
    border-radius: var(--radius-xl);
    background: linear-gradient(
        150deg,
        rgba(255, 251, 244, 0.95),
        rgba(247, 235, 210, 0.85)
    );
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(16px);
}

.hero-card::before {
    position: absolute;
    inset: 16px;
    z-index: -1;
    border: 1px solid rgba(168, 149, 107, 0.18);
    border-radius: calc(var(--radius-xl) - 10px);
    content: "";
}

.brand {
    display: grid;
    justify-items: center;
    gap: 16px;
    margin-bottom: 34px;
    text-align: center;
}

.brand-logo {
    display: block;
    width: min(620px, 92%);
    height: auto;
    filter: drop-shadow(0 16px 26px rgba(111, 92, 57, 0.24));
}

.lede {
    max-width: 560px;
    margin: 0;
    color: var(--muted);
    font-size: clamp(0.98rem, 1.6vw, 1.08rem);
    line-height: 1.65;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 4px 0 0;
    padding: 0;
    list-style: none;
}

.chips li {
    padding: 6px 16px;
    border: 1px solid rgba(41, 79, 109, 0.18);
    border-radius: 999px;
    color: var(--blue-deep);
    font-size: 0.84rem;
    font-weight: 600;
    background: rgba(220, 240, 245, 0.65);
}

.upload-panel {
    display: grid;
    gap: 18px;
    width: min(700px, 100%);
    margin: 0 auto;
}

.retention-group {
    margin: 0;
    padding: 0;
    border: 0;
    text-align: center;
}

.retention-legend {
    padding: 0;
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 600;
}

.retention-options {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.retention-options input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.retention-options label {
    padding: 9px 18px;
    border: 1.5px solid rgba(35, 72, 106, 0.22);
    border-radius: 999px;
    color: #3c5468;
    background: rgba(255, 255, 255, 0.6);
    font-size: 0.92rem;
    font-weight: 600;
    transition:
        background 150ms ease,
        border-color 150ms ease,
        color 150ms ease,
        box-shadow 150ms ease,
        transform 150ms ease;
}

.retention-options label:hover {
    border-color: var(--blue-deep);
    transform: translateY(-1px);
}

.retention-options input:checked + label {
    border-color: var(--blue-deep);
    color: #fff;
    background: var(--blue-deep);
    box-shadow: 0 10px 20px rgba(31, 68, 104, 0.28);
}

.retention-options input:focus-visible + label {
    outline: 3px solid rgba(31, 68, 104, 0.35);
    outline-offset: 2px;
}

.drop-zone {
    display: grid;
    justify-items: center;
    gap: 8px;
    width: 100%;
    padding: clamp(30px, 5vw, 42px) 20px;
    border: 2px dashed rgba(31, 68, 104, 0.45);
    border-radius: var(--radius-lg);
    color: var(--blue-deep);
    background: linear-gradient(180deg, var(--blue-soft), var(--blue-mid));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.85),
        var(--shadow-sm);
    transition:
        transform 160ms ease,
        background 160ms ease,
        box-shadow 160ms ease,
        border-color 160ms ease;
}

.drop-zone:hover,
.drop-zone:focus-visible,
.drop-zone.is-dragging {
    border-color: var(--blue-deep);
    background: linear-gradient(180deg, #e5f6fa, #bfe3ee);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        0 22px 40px rgba(31, 68, 104, 0.2);
    transform: translateY(-2px);
}

.drop-icon {
    width: 36px;
    height: 36px;
    margin-bottom: 2px;
    color: #276a92;
}

.drop-title {
    font-family: var(--font-display);
    font-size: clamp(1.2rem, 2.8vw, 1.5rem);
    font-weight: 600;
}

.drop-subtitle {
    color: #4c6a80;
    font-size: 0.92rem;
}

.drop-zone:focus-visible,
.link-button:focus-visible,
.go-button:focus-visible,
.copy-button:focus-visible,
.text-button:focus-visible,
.url-panel input:focus-visible {
    outline: 3px solid rgba(31, 68, 104, 0.35);
    outline-offset: 3px;
}

.link-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: max-content;
    margin: 0 auto;
    padding: 4px 10px;
    border: 0;
    color: #446f98;
    background: transparent;
    font-weight: 600;
}

.link-icon {
    width: 16px;
    height: 16px;
}

.link-button:hover {
    color: #173f63;
    text-decoration: underline;
}

.url-panel {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    animation: slide-in 160ms ease;
}

.url-panel[hidden] {
    display: none;
}

.url-panel input {
    height: 46px;
    padding: 0 16px;
    border: 2px solid rgba(23, 42, 53, 0.85);
    border-radius: 12px;
    color: #172a35;
    text-align: center;
    background: #d9edf4;
}

.url-panel input::placeholder {
    color: rgba(23, 42, 53, 0.5);
}

.go-button {
    width: min(260px, 100%);
    min-height: 46px;
    justify-self: center;
    border: 2px solid rgba(23, 42, 53, 0.85);
    border-radius: 12px;
    color: #17324a;
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
    background: linear-gradient(180deg, #e5f6fa, var(--blue-mid));
    transition:
        background 160ms ease,
        transform 160ms ease,
        box-shadow 160ms ease;
}

.go-button:hover {
    background: linear-gradient(180deg, #eefbfe, #b8e0eb);
    box-shadow: 0 14px 26px rgba(31, 68, 104, 0.2);
    transform: translateY(-1px);
}

.status {
    min-height: 1.4em;
    margin: 0;
    color: var(--tan-dark);
    text-align: center;
    font-weight: 500;
}

.status.is-error {
    color: #9a3327;
}

.status.is-success {
    color: #386b38;
}

.results-card {
    width: min(700px, 100%);
    margin: 30px auto 0;
    padding: 20px;
    border: 1px solid rgba(168, 149, 107, 0.24);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.5);
}

.results-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.results-heading h2 {
    margin: 0;
    color: #37281a;
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
}

.text-button {
    padding: 4px 0;
    border: 0;
    background: transparent;
    color: #446f98;
    font-size: 0.94rem;
    font-weight: 600;
}

.text-button:hover {
    text-decoration: underline;
}

.results-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.result-item {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid rgba(31, 68, 104, 0.14);
    border-radius: var(--radius-md);
    background: rgba(255, 250, 241, 0.85);
    animation: result-in 200ms ease;
}

.result-preview {
    width: 54px;
    height: 54px;
    border: 1px solid rgba(31, 68, 104, 0.14);
    border-radius: 13px;
    background-color: #f1e5d1;
    background-position: center;
    background-size: cover;
}

.result-details {
    min-width: 0;
}

.result-name {
    margin: 0 0 4px;
    overflow: hidden;
    color: #2d241b;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.result-url {
    display: block;
    overflow: hidden;
    color: #235d8e;
    font-size: 0.9rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.result-expiry {
    padding: 4px 10px;
    border-radius: 999px;
    color: var(--tan-dark);
    font-size: 0.78rem;
    font-weight: 700;
    background: rgba(168, 149, 107, 0.2);
    white-space: nowrap;
}

.copy-button {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 90px;
    padding: 9px 14px;
    border: 1px solid rgba(31, 68, 104, 0.28);
    border-radius: 12px;
    color: #1f415f;
    background: rgba(216, 238, 245, 0.75);
    font-weight: 600;
}

.copy-button svg {
    width: 15px;
    height: 15px;
}

.copy-button:hover {
    background: var(--blue-soft);
}

.empty-state {
    margin: 0;
    color: var(--muted);
    text-align: center;
}

.fine-print {
    max-width: 560px;
    margin: 30px auto 0;
    color: rgba(118, 106, 90, 0.85);
    font-size: 0.82rem;
    line-height: 1.5;
    text-align: center;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@keyframes slide-in {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes result-in {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 640px) {
    .shell {
        width: min(100% - 20px, 960px);
        padding: 18px 0;
    }

    .hero-card {
        padding: 22px 14px;
        border-radius: 24px;
    }

    .result-item {
        grid-template-columns: 44px minmax(0, 1fr);
    }

    .result-preview {
        width: 44px;
        height: 44px;
    }

    .result-expiry {
        justify-self: start;
    }

    .copy-button {
        grid-column: 1 / -1;
        width: 100%;
        justify-content: center;
    }
}
