body {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0 clamp(24px, 9vw, 170px);
    overflow: hidden;
}

/* ------------------------------------------------------------------ panel */

form {
    position: relative;
    width: 100%;
    max-width: 372px;
    padding: 30px 30px 26px;
    background:
        linear-gradient(158deg, rgba(27, 24, 23, 0.93), rgba(10, 9, 8, 0.97));
    border: 1px solid var(--line);
    border-radius: 2px;
    box-shadow:
        0 26px 70px rgba(0, 0, 0, 0.72),
        0 0 0 1px rgba(0, 0, 0, 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(3px) saturate(0.85);
    animation: panelIn 620ms cubic-bezier(.16, .84, .30, 1) both;
}

/* Rust bar welded to the top edge */
form::before {
    content: "";
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    height: 3px;
    background: linear-gradient(90deg, var(--rust-deep), var(--rust-bright) 45%, var(--rust-deep));
    box-shadow: 0 0 18px rgba(205, 69, 34, 0.45);
}

/* HUD bracket, bottom-right corner */
form::after {
    content: "";
    position: absolute;
    right: -1px;
    bottom: -1px;
    width: 26px;
    height: 26px;
    border-right: 2px solid var(--rust);
    border-bottom: 2px solid var(--rust);
    opacity: 0.75;
}

@keyframes panelIn {
    from { opacity: 0; transform: translateY(18px) scale(0.985); }
    to   { opacity: 1; transform: none; }
}

/* ------------------------------------------------------------- head block */

.brand {
    margin-bottom: 20px;
}

.brand__kicker {
    display: block;
    font-size: 10px;
    letter-spacing: 4.5px;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 5px;
}

.brand__title {
    display: block;
    font-size: 31px;
    line-height: 0.95;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #efe7df;
    text-shadow: 0 2px 0 rgba(0, 0, 0, 0.6);
}

.brand__title em {
    font-style: normal;
    color: var(--rust-bright);
}

.brand__note {
    display: block;
    margin-top: 8px;
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.6px;
    color: var(--muted);
}

/* Hazard tape divider */
.hazard {
    height: 7px;
    margin: 16px 0 22px;
    opacity: 0.55;
    background: repeating-linear-gradient(
        -45deg,
        var(--rust) 0 7px,
        #17130f 7px 14px
    );
    border-top: 1px solid rgba(0, 0, 0, 0.6);
    border-bottom: 1px solid rgba(0, 0, 0, 0.6);
}

/* ------------------------------------------------------------------ rows */

form label {
    display: block;
    margin-bottom: 15px;
}

form label > span:first-child {
    display: block;
    margin-bottom: 7px;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 2.6px;
    text-transform: uppercase;
    color: var(--muted);
}

form input[type="text"],
form input[type="password"],
form input[type="email"] {
    width: 100%;
    height: var(--input-height);
    padding: 10px 12px;
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--text);
    background: rgba(0, 0, 0, 0.46);
    border: 1px solid var(--line);
    border-left: 2px solid rgba(168, 48, 26, 0.35);
    border-radius: 1px;
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

form input::placeholder {
    color: rgba(222, 214, 206, 0.26);
    letter-spacing: 0.3px;
}

form input:focus {
    background: rgba(0, 0, 0, 0.62);
    border-color: rgba(205, 69, 34, 0.55);
    border-left-color: var(--rust-bright);
    box-shadow:
        0 0 0 1px rgba(205, 69, 34, 0.18),
        0 6px 20px rgba(168, 48, 26, 0.14);
}

/* --------------------------------------------------------------- checkbox */

form input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    pointer-events: none;
}

form label > span:last-child {
    position: relative;
    display: inline-block;
    padding-left: 29px;
    font-size: 12px;
    letter-spacing: 0.8px;
    color: var(--muted);
    cursor: pointer;
    line-height: 18px;
    user-select: none;
    transition: color var(--transition);
}

form label > span:last-child:hover {
    color: var(--text);
}

form label > span:last-child::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 18px;
    height: 18px;
    border-radius: 1px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(0, 0, 0, 0.5);
    transition: background var(--transition), border-color var(--transition);
}

form input[type="checkbox"]:checked + span::before {
    background: linear-gradient(180deg, var(--rust-bright), var(--rust-deep));
    border-color: rgba(205, 69, 34, 0.8);
}

form input[type="checkbox"]:checked + span::after {
    content: "";
    position: absolute;
    left: 6px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid #f4ece5;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

form input[type="checkbox"]:focus-visible + span::before {
    box-shadow: 0 0 0 2px rgba(205, 69, 34, 0.4);
}

/* ----------------------------------------------------------------- button */

form > button {
    position: relative;
    width: 100%;
    height: 46px;
    margin-top: 6px;
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 3.4px;
    text-transform: uppercase;
    color: #fbeee7;
    cursor: pointer;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 1px;
    background: linear-gradient(180deg, var(--rust-bright), var(--rust) 55%, var(--rust-deep));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.22),
        0 8px 26px rgba(168, 48, 26, 0.3);
    transition: transform var(--transition), box-shadow var(--transition), filter var(--transition);
}

/* Light sweep on hover */
form > button::after {
    content: "";
    position: absolute;
    top: 0;
    left: -60%;
    width: 45%;
    height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.26), transparent);
    transform: skewX(-18deg);
    transition: left 520ms ease;
}

form > button:hover {
    filter: brightness(1.09);
    transform: translateY(-2px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.26),
        0 12px 32px rgba(205, 69, 34, 0.4);
}

form > button:hover::after {
    left: 115%;
}

form > button:active {
    transform: translateY(0);
    filter: brightness(0.95);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.45);
}

/* ------------------------------------------------------------ link/status */

form > a {
    display: inline-block;
    margin-top: 16px;
    font-size: 11.5px;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    color: var(--muted);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color var(--transition), border-color var(--transition);
}

form > a:hover {
    color: var(--rust-bright);
    border-bottom-color: rgba(205, 69, 34, 0.5);
}

.status {
    min-height: 16px;
    margin-top: 12px;
    font-family: var(--font-mono);
    font-size: 11.5px;
    letter-spacing: 0.4px;
    color: transparent;
}

.status--error {
    color: #e6674a;
}

.status--ok {
    color: #9bbf7a;
}

/* Staggered reveal of the rows */
form > *,
form .brand,
form .hazard {
    animation: rowIn 420ms ease both;
}

form > *:nth-child(1) { animation-delay: 90ms; }
form > *:nth-child(2) { animation-delay: 150ms; }
form > *:nth-child(3) { animation-delay: 205ms; }
form > *:nth-child(4) { animation-delay: 255ms; }
form > *:nth-child(5) { animation-delay: 300ms; }
form > *:nth-child(6) { animation-delay: 340ms; }
form > *:nth-child(7) { animation-delay: 375ms; }

@keyframes rowIn {
    from { opacity: 0; transform: translateX(10px); }
    to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    form,
    form > *,
    form .brand,
    form .hazard { animation: none; }
}

@media (max-width: 900px) {
    body {
        justify-content: center;
        padding: 0 20px;
    }
}
