:root {
    color-scheme: light;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #1d2433;
    background: #f4f6fb;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    display: grid;
    place-items: center;
    padding: 24px;
}

.card {
    width: min(100%, 500px);
    padding: clamp(24px, 6vw, 42px);
    border: 1px solid #e3e7f0;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 20px 60px rgb(34 48 84 / 9%);
}

.card__header {
    margin-bottom: 30px;
}

.eyebrow {
    color: #536ce4;
    font-size: 0.72rem;
    font-weight: 750;
    letter-spacing: 0.13em;
}

h1 {
    margin: 8px 0;
    font-size: clamp(2rem, 8vw, 2.65rem);
    letter-spacing: -0.055em;
}

.card__header p {
    max-width: 38ch;
    margin: 0;
    color: #687187;
    line-height: 1.55;
}

.form {
    display: grid;
    gap: 22px;
}

.field {
    display: grid;
    gap: 8px;
}

label {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.92rem;
    font-weight: 700;
}

.label-hint,
.field small {
    color: #7b8498;
    font-size: 0.8rem;
    font-weight: 450;
}

input {
    width: 100%;
    min-height: 52px;
    padding: 0 15px;
    border: 1px solid #d7dce7;
    border-radius: 10px;
    outline: none;
    background: #fff;
    color: #1d2433;
    font: inherit;
    font-size: 1.05rem;
    letter-spacing: 0.08em;
    transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

input::placeholder {
    color: #aab1c0;
    letter-spacing: 0.02em;
}

input:focus {
    border-color: #536ce4;
    box-shadow: 0 0 0 3px rgb(83 108 228 / 14%);
}

.result {
    display: grid;
    gap: 8px;
    margin-top: 26px;
    padding: 17px;
    border: 1px solid #dce8df;
    border-radius: 12px;
    background: #f5fbf6;
}

.result[hidden] {
    display: none;
}

.result__label {
    color: #55705d;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.result__number {
    overflow-wrap: anywhere;
    color: #1d2433;
    font-size: clamp(1rem, 5vw, 1.28rem);
    font-weight: 750;
    letter-spacing: 0.07em;
    font-variant-numeric: tabular-nums;
}

.copy-button {
    justify-self: start;
    min-height: 40px;
    padding: 0 15px;
    border: 1px solid #cfd6e7;
    border-radius: 8px;
    background: #fff;
    color: #344265;
    font: inherit;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: border-color 150ms ease, background 150ms ease;
}

.copy-button:hover:not(:disabled) {
    border-color: #536ce4;
    background: #f7f8ff;
}

.copy-button:focus-visible {
    outline: 3px solid rgb(83 108 228 / 25%);
    outline-offset: 2px;
}

.copy-button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.result__message {
    margin: 0;
    color: #55705d;
    font-size: 0.84rem;
    line-height: 1.45;
}

.copy-message {
    min-height: 1.25em;
    margin: 0;
    color: #55705d;
    font-size: 0.82rem;
}

.result--error {
    border-color: #f0d8d8;
    background: #fff7f7;
}

.result--error .result__label,
.result--error .result__message {
    color: #a34444;
}

@media (max-width: 420px) {
    body {
        padding: 14px;
    }

    .card {
        border-radius: 15px;
    }
}
