:root {
    color-scheme: dark;
    font-family: "Fira Mono", monospace;
    background: #313338;
    color: #e5e5e7;
}

* {
    box-sizing: border-box;
}

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    background: #313338;
}

button,
textarea {
    font: inherit;
}

.app {
    width: min(100% - 36px, 640px);
    margin: 0 auto;
    padding: 56px 0 32px;
}

.page-header {
    margin-bottom: 22px;
}

h1 {
    margin: 0;
    color: #f2f3f5;
    font-size: 21px;
    font-weight: 500;
    letter-spacing: -.04em;
}

.page-header p {
    margin: 6px 0 0;
    color: #a3a6ad;
    font-size: 12px;
}

.converter {
    padding: 18px;
    border: 1px solid #41434a;
    border-radius: 8px;
    background: #2b2d31;
}

.field + .actions,
.actions + .field {
    margin-top: 12px;
}

.field-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 7px;
}

label {
    color: #d5d7db;
    font-size: 12px;
    font-weight: 700;
}

.counter {
    color: #969ba3;
    font-size: 11px;
    font-variant-numeric: tabular-nums;
}

textarea {
    display: block;
    width: 100%;
    min-height: 132px;
    resize: vertical;
    padding: 11px 12px;
    border: 1px solid #1e1f22;
    border-radius: 5px;
    outline: none;
    background: #1e1f22;
    color: #e1e2e5;
    font-size: 12px;
    line-height: 1.65;
    transition: border-color .12s;
}

textarea::placeholder {
    color: #777b84;
}

textarea:focus {
    border-color: #d9534f;
}

textarea[readonly] {
    color: #b9bbc4;
}

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

.button {
    min-height: 32px;
    padding: 0 11px;
    border: 1px solid #4b4d55;
    border-radius: 4px;
    background: #383a40;
    color: #e5e5e7;
    font-size: 12px;
    font-weight: 550;
    cursor: pointer;
    transition: background .12s, border-color .12s;
}

.button:hover:not(:disabled) {
    border-color: #686b75;
    background: #41434a;
}

.button-primary {
    border-color: #c93c3c;
    background: #c93c3c;
    color: #fff;
}

.button-primary:hover:not(:disabled) {
    border-color: #e04b4b;
    background: #e04b4b;
}

.button:focus-visible {
    outline: 2px solid #ff8a8a;
    outline-offset: 2px;
}

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

.status {
    min-height: 18px;
    margin-top: 10px;
    color: #aeb1b8;
    font-size: 12px;
}

.status-error {
    color: #f08082;
}

footer {
    padding-top: 16px;
    color: #858991;
    font-size: 11px;
    text-align: left;
}

footer a {
    color: #ff8a8a;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

@media (max-width: 520px) {
    .app {
        padding-top: 32px;
    }

    .converter {
        padding: 14px;
    }
}