:root {
    color-scheme: light;
    --ink: #14211d;
    --muted: #5d6b65;
    --line: #d9e0dc;
    --paper: #fffefa;
    --wash: #edf3ef;
    --green: #176b4c;
    --green-dark: #0d4e36;
    --red: #8d2d2d;
    --red-wash: #fff0ed;
    --success-wash: #eaf7ef;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--wash);
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at 12% 10%, rgba(39, 126, 91, 0.12), transparent 28rem),
        linear-gradient(145deg, #f6f4ec 0%, #e8f0eb 100%);
}

.shell {
    width: min(100% - 2rem, 34rem);
    margin: 0 auto;
    padding: clamp(3rem, 9vh, 7rem) 0 2rem;
}

.card {
    padding: clamp(1.5rem, 5vw, 2.5rem);
    border: 1px solid rgba(20, 33, 29, 0.1);
    border-radius: 1.25rem;
    background: var(--paper);
    box-shadow: 0 1.5rem 4rem rgba(24, 50, 40, 0.11);
}

.eyebrow {
    margin-bottom: 0.6rem;
    color: var(--green);
    font-size: 0.75rem;
    font-weight: 750;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

h1 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2rem, 8vw, 3.15rem);
    font-weight: 500;
    letter-spacing: -0.035em;
    line-height: 1;
}

.intro {
    margin: 1.1rem 0 1.75rem;
    color: var(--muted);
    line-height: 1.6;
}

.stack {
    display: grid;
    gap: 0.65rem;
    margin-top: 1.75rem;
}

label {
    margin-top: 0.45rem;
    font-size: 0.9rem;
    font-weight: 720;
}

input,
select,
button {
    width: 100%;
    min-height: 3.2rem;
    border-radius: 0.7rem;
    font: inherit;
}

input,
select {
    border: 1px solid var(--line);
    padding: 0.75rem 0.9rem;
    color: var(--ink);
    background: white;
}

input:focus,
select:focus,
button:focus-visible {
    outline: 3px solid rgba(23, 107, 76, 0.25);
    outline-offset: 2px;
    border-color: var(--green);
}

button {
    margin-top: 0.75rem;
    border: 0;
    padding: 0.75rem 1rem;
    color: white;
    font-weight: 750;
    background: var(--green);
    cursor: pointer;
    transition: background 140ms ease, transform 140ms ease;
}

button:hover {
    background: var(--green-dark);
}

button:active {
    transform: translateY(1px);
}

.secondary {
    margin-top: 0.8rem;
    border: 1px solid var(--line);
    color: var(--muted);
    background: transparent;
}

.secondary:hover {
    color: var(--ink);
    background: #f4f6f4;
}

.captcha {
    min-height: 4.1rem;
    margin-top: 0.65rem;
}

.notice {
    margin-top: 1.4rem;
    padding: 0.9rem 1rem;
    border-radius: 0.7rem;
    font-size: 0.92rem;
    line-height: 1.45;
}

.notice.error {
    border: 1px solid #efc9c2;
    color: var(--red);
    background: var(--red-wash);
}

.notice.success {
    border: 1px solid #bee1ca;
    color: var(--green-dark);
    background: var(--success-wash);
}

.added-address {
    overflow-wrap: anywhere;
}

.copy-button {
    display: inline-flex;
    position: relative;
    align-items: center;
    justify-content: center;
    width: 1.55rem;
    min-height: 1.55rem;
    margin: 0 0.12rem 0 0.04rem;
    border-radius: 0.35rem;
    padding: 0.15rem;
    color: var(--muted);
    vertical-align: middle;
    background: transparent;
}

.copy-button:hover {
    color: var(--green-dark);
    background: rgba(23, 107, 76, 0.1);
}

.copy-button:active {
    transform: none;
}

.copy-icon {
    position: relative;
    width: 1.05rem;
    height: 1.05rem;
}

.copy-icon::before,
.copy-icon::after {
    position: absolute;
    width: 0.72rem;
    height: 0.72rem;
    border: 2px solid currentColor;
    border-radius: 0.22rem;
    content: "";
}

.copy-icon::before {
    top: 0;
    right: 0;
}

.copy-icon::after {
    bottom: 0;
    left: 0;
    background: var(--success-wash);
}

.copy-feedback {
    margin-left: 0.25rem;
    font-size: 0.78rem;
    font-weight: 750;
}

.clipboard-fallback {
    position: fixed;
    top: -9999px;
    left: -9999px;
    opacity: 0;
}

.identity {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.6rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--line);
    border-radius: 0.7rem;
    color: var(--muted);
    background: #f7f8f5;
}

.domain {
    color: var(--green);
    font-weight: 750;
}

.help,
.footer {
    color: var(--muted);
    font-size: 0.8rem;
    line-height: 1.45;
}

.help {
    margin: 0 0 0.25rem;
}

.logout-form {
    margin-top: 0.3rem;
}

.footer {
    margin: 1rem 0 0;
    text-align: center;
}

@media (max-width: 28rem) {
    .shell {
        width: min(100% - 1rem, 34rem);
        padding-top: 1rem;
    }

    .card {
        border-radius: 1rem;
    }

    .identity {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.25rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    button {
        transition: none;
    }
}
