:root {
    color-scheme: light;
    --ink: #172033;
    --muted: #5b667a;
    --line: #dce3ef;
    --blue: #0f5eea;
    --navy: #08233f;
    --teal: #008699;
    --orange: #ff6b1a;
    --surface: #f3f6fb;
    --card: #ffffff;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Instrument Sans", ui-sans-serif, system-ui, sans-serif;
    color: var(--ink);
    background: var(--surface);
}

a { color: inherit; text-decoration: none; }
input, textarea, select, button { font: inherit; }

.site-shell {
    min-height: 100vh;
    background: linear-gradient(180deg, var(--navy) 0 46%, var(--surface) 46% 100%);
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1160px;
    margin: 0 auto;
    padding: 22px 24px;
    color: #fff;
}

.brand {
    display: inline-flex;
    gap: 10px;
    align-items: center;
    font-weight: 800;
    font-size: 28px;
}

.brand span {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    color: #fff;
    background: var(--orange);
    border-radius: 8px;
}

.topbar nav {
    display: flex;
    align-items: center;
    gap: 22px;
    font-weight: 700;
}

.hero {
    max-width: 1160px;
    margin: 0 auto;
    padding: 42px 24px 72px;
}

.hero-copy {
    color: #fff;
    text-align: center;
    max-width: 880px;
    margin: 0 auto 44px;
}

.eyebrow {
    color: var(--teal);
    font-weight: 800;
    margin: 0 0 12px;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: 12px;
}

.hero-copy .eyebrow { color: #68d7e7; }

.hero-copy h1 {
    margin: 0;
    font-size: clamp(40px, 6vw, 68px);
    line-height: 1;
    letter-spacing: 0;
}

.hero-copy p:not(.eyebrow) {
    margin: 22px auto 0;
    max-width: 780px;
    color: #d9e6f5;
    font-size: 20px;
    line-height: 1.6;
}

.shortener-panel {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 24px 70px rgb(8 35 63 / 18%);
    padding: 32px;
}

.shortener-form {
    display: grid;
    gap: 20px;
}

label {
    display: grid;
    gap: 8px;
    font-weight: 800;
}

input, textarea, select {
    width: 100%;
    border: 1px solid #b9c3d1;
    border-radius: 7px;
    padding: 14px 16px;
    color: var(--ink);
    background: #fff;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

input::placeholder,
textarea::placeholder {
    color: #6b7280;
    font-weight: 700;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgb(15 94 234 / 12%);
}

select {
    appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, #5b667a 50%),
        linear-gradient(135deg, #5b667a 50%, transparent 50%);
    background-position:
        calc(100% - 20px) calc(50% - 3px),
        calc(100% - 14px) calc(50% - 3px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding-right: 44px;
}

textarea {
    min-height: 120px;
    resize: vertical;
}
small { color: #b42318; font-weight: 600; }

.form-grid {
    display: grid;
    grid-template-columns: 1fr 180px;
    gap: 18px;
}

.form-grid.single {
    grid-template-columns: 1fr;
}

.toggles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}

.toggles label {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 7px;
    padding: 12px;
    font-weight: 700;
}

.toggles input { width: auto; }

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 7px;
    padding: 13px 20px;
    cursor: pointer;
    font-weight: 800;
}

.button.primary {
    width: fit-content;
    color: #fff;
    background: var(--blue);
}

.button.ghost {
    color: var(--ink);
    background: #fff;
}

.button.subtle {
    color: var(--ink);
    background: #eef3fb;
}

.created-link {
    display: grid;
    gap: 8px;
    padding: 16px;
    margin-bottom: 22px;
    border: 1px solid #b6edf4;
    border-radius: 8px;
    background: #eafcff;
}

.created-link span { color: var(--teal); font-weight: 800; }
.created-link strong { font-size: 20px; }
.created-link img { grid-row: span 2; width: 92px; height: 92px; }

.public-disabled {
    display: grid;
    gap: 8px;
    padding: 18px;
    border: 1px solid #f7d08a;
    border-radius: 8px;
    background: #fff8e8;
}

.public-disabled span {
    color: #9a5b00;
    font-weight: 900;
}

.public-disabled p {
    margin: 0;
    color: var(--muted);
}

.recent-links { margin-top: 28px; }

.recent-links h2 {
    margin: 0 0 14px;
    font-size: 22px;
}

.recent-links article {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    background: #fff;
    border-radius: 8px;
    padding: 18px;
    margin-bottom: 12px;
}

.recent-links article div {
    display: grid;
    gap: 4px;
}

.recent-links a {
    color: var(--blue);
    font-weight: 700;
}

.recent-links span {
    color: #16803a;
    font-weight: 800;
}

.redirect-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(circle at 18% 12%, rgb(0 134 153 / 22%), transparent 28%),
        linear-gradient(145deg, #071f38 0%, #08233f 52%, #0d3650 100%);
}

.redirect-card {
    width: min(100%, 460px);
    background: #fff;
    border-radius: 8px;
    padding: 34px;
    box-shadow: 0 24px 70px rgb(0 0 0 / 24%);
}

.redirect-card.wide { width: min(100%, 680px); text-align: center; }
.redirect-card h1 { margin: 0 0 16px; font-size: 32px; line-height: 1.1; }
.redirect-card p:not(.eyebrow) { color: var(--muted); line-height: 1.6; }
.redirect-card form { display: grid; gap: 16px; }
.public-form-fields { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 20px; }
.public-form-field--full { grid-column: 1 / -1; }
.public-form-field--half { grid-column: span 3; }
.public-form-field--third { grid-column: span 2; }
.public-form-field--hidden { display: contents !important; }

/* Payment flow */
.payment-flow-shell {
    background: #edf1f6;
}

.payment-flow-card {
    width: min(100%, 790px);
    overflow: hidden;
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 18px 44px rgb(48 61 86 / 18%);
}

.payment-flow-header {
    background: linear-gradient(120deg, #4b69f1, #432bd2);
    color: #fff;
    min-height: 123px;
    padding: 28px 34px 24px;
    text-align: center;
}

.payment-flow-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.payment-flow-header-icon {
    width: 39px;
    height: 39px;
    flex: none;
}

.payment-flow-header h1 {
    margin: 0;
    color: #fff;
    font-size: 27px;
    letter-spacing: -.02em;
}

.redirect-card .payment-flow-header p {
    margin: 8px 0 0;
    color: rgb(255 255 255 / 84%);
    font-size: 14px;
    font-weight: 600;
}

.payment-flow-progress {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    margin: 0 0 28px;
}

.payment-flow-progress::before {
    position: absolute;
    top: 19px;
    right: 25%;
    left: 25%;
    height: 3px;
    background: #d8dde6;
    content: '';
}

.payment-flow-step {
    position: relative;
    z-index: 1;
    display: grid;
    justify-items: center;
    gap: 6px;
    color: #7a8797;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
}

.payment-flow-step::before {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border: 3px solid currentColor;
    border-radius: 999px;
    background: #fff;
    content: attr(data-step);
}

.payment-flow-step.active { color: #4b69f1; }
.payment-flow-step.active::before { border-color: #4b69f1; background: #fff; color: #4b69f1; }
.payment-flow-step.complete { color: #4b69f1; }
.payment-flow-step.complete::before { border-color: #4b69f1; background: #4b69f1; color: #fff; content: '✓'; }
.payment-flow-step.complete:hover { color: #314ed9; }

.payment-flow-content { padding: 30px 56px 34px; }
.payment-flow-content > .payment-flow-progress,
.payment-flow-content > .payment-flow-section-title,
.payment-flow-content > .payment-summary-card,
.payment-flow-content > .payment-payment-title,
.payment-flow-content > #paypal-button-container,
.payment-flow-content > #message,
.payment-flow-content > .payment-secure-note,
.payment-flow-content > .payment-flow-back-link,
.payment-flow-content > form {
    width: min(100%, 840px);
    margin-right: auto;
    margin-left: auto;
}

.payment-flow-content .payment-flow-section-title { margin-top: 0; margin-bottom: 25px; color: #13203d; font-size: 26px; letter-spacing: -.035em; text-align: left; }
.payment-flow-content .button.primary { width: fit-content; min-width: 148px; justify-content: center; border-radius: 9px; background: #4b69f1; }
.payment-flow-content form > .button.primary { justify-self: end; }
.payment-flow-content input, .payment-flow-content textarea, .payment-flow-content select { border-color: #d4d9e2; border-radius: 10px; font-weight: 600; }
.payment-flow-content form { gap: 20px; }
.payment-summary-card { overflow: hidden; border: 1px solid #d8e0fb; border-radius: 17px; background: linear-gradient(135deg, #fff 0%, #f3f5ff 100%); padding: 28px 34px; }
.payment-summary-product { display: grid; grid-template-columns: 126px minmax(0, 1fr) auto; align-items: center; gap: 26px; }
.payment-product-icon { display: grid; width: 112px; height: 112px; place-items: center; border: 1px solid #e5e8f0; border-radius: 999px; background: #fff; box-shadow: 0 6px 16px rgb(37 55 109 / 12%); color: #3d4ee0; }
.payment-product-icon svg { width: 58px; height: 58px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.65; }
.payment-product-copy { min-width: 0; }
.payment-product-label { margin: 0 0 7px; color: #61708a; font-size: 16px; font-weight: 600; }
.redirect-card .payment-product-name { margin: 0; color: #13203d; font-size: 26px; font-weight: 900; letter-spacing: -.025em; line-height: 1.1; }
.payment-description { margin: 10px 0 0; color: #53627b; font-size: 16px; font-style: normal; font-weight: 500; line-height: 1.45; white-space: pre-wrap; }
.payment-summary-amount { color: #13203d; font-size: 23px; white-space: nowrap; }
.payment-total { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 24px; padding-top: 23px; border-top: 1px solid #d8deeb; color: #13203d; font-size: 20px; font-weight: 800; }
.payment-total strong { font-size: 25px; white-space: nowrap; }
.payment-payment-title { margin: 32px 0 17px; color: #13203d; font-size: 24px; letter-spacing: -.03em; }
#paypal-button-container { min-height: 106px; }
#message { min-height: 1.5rem; margin: 8px 0 0; color: #b91c1c; }
.success { color: #15803d !important; }
.payment-secure-note { margin: 10px 0 0; color: #53627b; font-size: 15px; font-weight: 600; text-align: center; }
.payment-secure-note strong { color: #1165c4; font-style: italic; }
.payment-flow-back-link { display: inline-flex; margin-top: 22px; padding-top: 25px; border-top: 1px solid #dde2eb; color: #315ce6; font-size: 16px; font-weight: 800; text-decoration: none; }
.payment-flow-back-link:hover { text-decoration: underline; }

/* Payment receipt */
.payment-receipt-card { width: min(100%, 530px); overflow: hidden; border-radius: 16px; padding: 0; box-shadow: 0 18px 44px rgb(48 61 86 / 18%); }
.payment-receipt-header { padding: 30px 32px 27px; color: #fff; background: linear-gradient(120deg, #4b69f1, #432bd2); text-align: center; }
.payment-receipt-check { display: grid; width: 46px; height: 46px; place-items: center; margin: 0 auto 12px; border: 2px solid rgb(255 255 255 / 85%); border-radius: 999px; font-size: 25px; font-weight: 900; }
.redirect-card .payment-receipt-header p { display: table; margin: 0 auto 9px; border: 1px solid rgb(255 255 255 / 38%); border-radius: 999px; background: rgb(255 255 255 / 14%); padding: 5px 10px; color: #fff; font-size: 12px; font-weight: 900; line-height: 1.2; text-transform: uppercase; letter-spacing: .07em; }
.payment-receipt-header h1 { margin: 0; color: #fff; font-size: 27px; letter-spacing: -.03em; }
.payment-receipt-body { padding: 30px; }
.payment-receipt-title-row { display: flex; justify-content: space-between; gap: 18px; padding-bottom: 22px; border-bottom: 1px dashed #cdd5e4; }
.payment-receipt-title-row div { display: grid; gap: 5px; min-width: 0; }
.payment-receipt-title-row span, .payment-receipt-details dt { color: #64748b; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.payment-receipt-title-row strong { color: #172033; font-size: 21px; line-height: 1.2; }
.payment-receipt-title-row .payment-receipt-amount { flex: none; font-size: 20px; white-space: nowrap; }
.payment-receipt-details { display: grid; gap: 15px; margin: 22px 0; }
.payment-receipt-details div { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.payment-receipt-details dt { flex: none; }
.payment-receipt-details dd { margin: 0; color: #24324a; font-size: 14px; font-weight: 700; text-align: right; overflow-wrap: anywhere; }
.payment-receipt-details div:first-child dd { color: #16803a; }
.payment-receipt-total { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 0; border-top: 1px solid #d8deeb; border-bottom: 1px solid #d8deeb; color: #172033; font-size: 17px; font-weight: 800; }
.payment-receipt-total strong { font-size: 25px; white-space: nowrap; }
.payment-receipt-note { margin: 20px 0 0; color: #64748b; font-size: 13px; line-height: 1.5; text-align: center; }
.payment-receipt-download { display: flex; justify-content: center; margin-top: 14px; color: #315ce6; font-size: 14px; font-weight: 800; text-decoration: none; }
.payment-receipt-download:hover { text-decoration: underline; }

/* Keep the payment step as compact as the information form. */
.payment-checkout-card .payment-flow-content { padding-top: 24px; padding-bottom: 24px; }
.payment-checkout-card .payment-flow-progress { margin-bottom: 20px; }
.payment-checkout-card .payment-flow-section-title { margin-bottom: 18px; font-size: 24px; }
.payment-checkout-card .payment-summary-card { border-radius: 13px; padding: 19px 22px; }
.payment-checkout-card .payment-summary-product { grid-template-columns: 82px minmax(0, 1fr) auto; gap: 17px; }
.payment-checkout-card .payment-product-icon { width: 72px; height: 72px; }
.payment-checkout-card .payment-product-icon svg { width: 40px; height: 40px; }
.payment-checkout-card .payment-product-label { margin-bottom: 4px; font-size: 14px; }
.payment-checkout-card .payment-product-name { font-size: 23px; }
.payment-checkout-card .payment-description { margin-top: 6px; font-size: 14px; }
.payment-checkout-card .payment-summary-amount { font-size: 20px; }
.payment-checkout-card .payment-total { margin-top: 16px; padding-top: 16px; font-size: 17px; }
.payment-checkout-card .payment-total strong { font-size: 22px; }
.payment-checkout-card .payment-payment-title { margin: 23px 0 12px; font-size: 22px; }
.payment-checkout-card #paypal-button-container { min-height: 92px; }
.payment-checkout-card .payment-secure-note { margin-top: 5px; font-size: 14px; }
.payment-checkout-card .payment-flow-back-link { margin-top: 13px; padding-top: 17px; font-size: 14px; }

@media (max-width: 560px) {
    .public-form-fields { grid-template-columns: 1fr; }
    .public-form-field--full { grid-column: auto; }
    .payment-flow-card { width: min(100%, calc(100vw - 28px)); }
    .payment-flow-header, .payment-flow-content { padding-right: 22px; padding-left: 22px; }
    .payment-flow-header h1 { font-size: 25px; }
    .payment-flow-header-icon { width: 31px; height: 31px; }
    .payment-flow-content .payment-flow-section-title { font-size: 25px; }
    .payment-summary-card { padding: 20px; }
    .payment-summary-product { grid-template-columns: 72px minmax(0, 1fr); gap: 16px; }
    .payment-product-icon { width: 68px; height: 68px; }
    .payment-product-icon svg { width: 37px; height: 37px; }
    .redirect-card .payment-product-name { font-size: 23px; }
    .payment-product-label, .payment-description { font-size: 14px; }
    .payment-summary-amount { grid-column: 2; font-size: 22px; }
    .payment-total { font-size: 18px; }
    .payment-total strong { font-size: 23px; }
    .payment-checkout-card .payment-summary-product { grid-template-columns: 62px minmax(0, 1fr); gap: 14px; }
    .payment-checkout-card .payment-product-icon { width: 58px; height: 58px; }
    .payment-checkout-card .payment-product-icon svg { width: 33px; height: 33px; }
    .payment-checkout-card .payment-summary-amount { grid-column: 2; }
    .payment-receipt-body { padding: 24px 21px; }
    .payment-receipt-header { padding-right: 22px; padding-left: 22px; }
    .payment-receipt-title-row { align-items: start; flex-direction: column; gap: 10px; }
}

.redirect-card-modern {
    width: min(100%, 920px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
    gap: 22px;
    padding: 14px;
    text-align: left;
}

.redirect-card-modern:not(:has(.redirect-ad)) {
    grid-template-columns: 1fr;
    width: min(100%, 680px);
}

.redirect-content {
    padding: 32px;
}

.redirect-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--teal);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--teal);
    box-shadow: 0 0 0 6px rgb(0 134 153 / 12%);
}

.redirect-card-modern h1 {
    max-width: 560px;
    margin: 16px 0 10px;
    font-size: clamp(30px, 5vw, 46px);
}

.redirect-copy {
    max-width: 560px;
    margin: 0;
    font-size: 17px;
}

.destination-pill {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 26px 0 18px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fbff;
}

.destination-pill span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.destination-pill strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.redirect-progress {
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: #e7eef9;
}

.redirect-progress span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--blue), var(--teal));
    transition: width .28s linear;
}

.redirect-timer {
    margin: 12px 0 22px;
    color: var(--muted);
    font-weight: 700;
}

.redirect-timer strong {
    color: var(--blue);
    font-size: 24px;
}

.redirect-timer.muted {
    margin-top: 12px;
}

.redirect-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.redirect-ad {
    display: grid;
    align-content: start;
    gap: 14px;
    padding: 12px;
    border-radius: 8px;
    background: #f4f8fd;
}

.countdown {
    display: inline-grid;
    place-items: center;
    width: 96px;
    height: 96px;
    margin: 18px auto;
    border-radius: 50%;
    color: var(--blue);
    background: #eef5ff;
    font-size: 28px;
    font-weight: 900;
}

.ad-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    padding: 12px 14px;
    color: var(--teal);
    background: #e8fbfd;
    font-weight: 800;
    text-decoration: none;
}

.ad-image {
    width: 100%;
    max-height: 320px;
    object-fit: cover;
    border: 1px solid var(--line);
    border-radius: 8px;
    margin: 0;
}

.redirect-ad .ad-link {
    color: #fff;
    background: var(--teal);
}

.ad-placeholder {
    display: grid;
    place-items: center;
    min-height: 260px;
    padding: 24px;
    border: 1px dashed #b9c3d1;
    border-radius: 8px;
    color: var(--muted);
    background: #fff;
    text-align: center;
}

.ad-placeholder span {
    color: var(--teal);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.ad-placeholder strong {
    color: var(--ink);
    font-size: 22px;
}

@media (max-width: 760px) {
    .topbar, .topbar nav, .recent-links article {
        align-items: flex-start;
        flex-direction: column;
    }

    .hero { padding-top: 18px; }
    .hero-copy { text-align: left; }
    .shortener-panel { padding: 20px; }

    .form-grid,
    .toggles,
    .created-link {
        grid-template-columns: 1fr;
    }

    .created-link img { grid-row: auto; }

    .redirect-card-modern {
        grid-template-columns: 1fr;
        padding: 10px;
    }

    .redirect-content {
        padding: 22px;
    }

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