:root {
    color-scheme: light;
    --ink: #171717;
    --muted: #6b6b68;
    --line: #dededb;
    --light: #f0f0ef;
    --orange: #e85102;
    font-family:
        "DM Sans",
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    color: var(--ink);
    background: #fff;
    -webkit-font-smoothing: antialiased;
}
* {
    box-sizing: border-box;
}
body {
    margin: 0;
}
[hidden] {
    display: none !important;
}
button,
input {
    font: inherit;
}
a {
    color: inherit;
}
button {
    cursor: pointer;
    touch-action: manipulation;
}
button:disabled {
    cursor: wait;
    opacity: 0.5;
}
button,
input,
a,
summary {
    -webkit-tap-highlight-color: transparent;
}
:focus-visible {
    outline: 2px solid var(--orange);
    outline-offset: 4px;
}
header {
    height: 96px;
    padding: 0 clamp(24px, 6vw, 88px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
}
.brand {
    display: flex;
}
.brand img {
    display: block;
    width: 157px;
    height: auto;
}
.languages {
    display: flex;
    gap: 4px;
}
.languages button {
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    padding: 9px 11px;
    border-radius: 3px;
}
.languages button[aria-pressed="true"] {
    background: var(--ink);
    color: white;
}
main {
    width: min(100% - 48px, 780px);
    margin: 76px auto 0;
}
.intro {
    margin-bottom: 40px;
}
h1 {
    margin: 0 0 16px;
    font-size: clamp(32px, 4.5vw, 48px);
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: -1.8px;
}
.intro p {
    font-size: 16px;
    line-height: 1.7;
    color: var(--muted);
    max-width: 560px;
    margin: 0;
}
.fields {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 150px;
    gap: 16px;
}
label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 10px;
}
input {
    width: 100%;
    min-width: 0;
    height: 54px;
    padding: 0 15px;
    border: 1px solid #cececa;
    border-radius: 4px;
    color: var(--ink);
    background: #fff;
    font-size: 15px;
}
input::placeholder {
    color: #858580;
}
input[aria-invalid="true"] {
    border-color: #b42318;
}
input[readonly] {
    background: var(--light);
}
.hint {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
    margin: 12px 0 0;
}
.primary,
.secondary {
    height: 54px;
    padding: 0 23px;
    font-weight: 500;
    font-size: 14px;
    border-radius: 4px;
    white-space: nowrap;
}
.primary {
    margin-top: 27px;
    min-width: 196px;
    border: 1px solid var(--orange);
    background: var(--orange);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}
.primary:hover:not(:disabled) {
    background: #cb4500;
    border-color: #cb4500;
}
.secondary {
    background: var(--ink);
    border: 1px solid var(--ink);
    color: #fff;
}
.secondary:hover:not(:disabled) {
    background: #353535;
}
.input-action {
    display: flex;
    gap: 10px;
}
.access-form {
    padding-bottom: 26px;
    margin-bottom: 26px;
    border-bottom: 1px solid var(--line);
}
.access-form input {
    max-width: 320px;
}
.error {
    margin: 18px 0 0;
    color: #b42318;
    font-size: 13px;
    line-height: 1.6;
}
.result {
    border-top: 1px solid var(--line);
    margin-top: 40px;
    padding-top: 28px;
}
.result-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}
h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
}
#dimensions {
    font-size: 12px;
    color: var(--muted);
}
.preview {
    display: block;
    width: 100%;
    height: auto;
    max-height: 420px;
    object-fit: contain;
    background: var(--light);
    border-radius: 4px;
}
.result-link {
    margin-top: 20px;
}
.result-link input {
    font-size: 12px;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}
.result-footer {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 15px;
    margin-top: 12px;
}
.result-footer a {
    flex-shrink: 0;
    font-size: 13px;
    text-underline-offset: 4px;
}
.result-footer .hint {
    margin: 0;
}
.guide {
    border-top: 1px solid var(--line);
    margin-top: 44px;
    padding-top: 23px;
}
.guide h2 {
    font-size: 24px;
}
.guide h3 {
    margin: 28px 0 10px;
    font-size: 15px;
    font-weight: 600;
}
.guide p {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.7;
    margin: 18px 0;
}
.guide .example-note {
    font-size: 12px;
    margin-top: -4px;
}
.parameter-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    line-height: 1.6;
}
.parameter-table th,
.parameter-table td {
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--line);
    padding: 12px 0;
}
.parameter-table th {
    font-weight: 500;
    padding-right: 24px;
}
.parameter-table td {
    color: var(--muted);
}
.parameter-table code {
    color: var(--ink);
}
pre {
    background: var(--light);
    padding: 18px;
    border-radius: 4px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font-size: 12px;
    line-height: 1.8;
}
footer {
    border-top: 1px solid var(--line);
    display: flex;
    gap: 24px;
    justify-content: space-between;
    align-items: baseline;
    margin-top: 32px;
    padding: 22px 0 30px;
    color: var(--muted);
    font-size: 11px;
}
footer span {
    font-size: 10px;
    letter-spacing: 2px;
}
footer p {
    margin: 0;
    text-align: right;
    line-height: 1.5;
}
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.skip-link {
    position: absolute;
    top: -100px;
    left: 24px;
    background: var(--ink);
    color: white;
    padding: 12px;
}
.skip-link:focus {
    top: 12px;
}
@media (max-width: 520px) {
    header {
        height: 76px;
    }
    .brand img {
        width: 140px;
    }
    main {
        margin-top: 44px;
    }
    .intro {
        margin-bottom: 30px;
    }
    .fields {
        grid-template-columns: minmax(0, 1fr) 118px;
        gap: 10px;
    }
    input {
        padding: 0 12px;
        font-size: 13px;
    }
    .input-action {
        gap: 8px;
    }
    .secondary {
        padding: 0 15px;
        font-size: 13px;
    }
    h1 {
        letter-spacing: -1px;
    }
    .intro p {
        font-size: 14px;
    }
    footer {
        gap: 15px;
    }
}
@media (max-width: 370px) {
    .fields {
        grid-template-columns: 1fr;
    }
    .size-field {
        max-width: 150px;
    }
    .result-link {
        flex-direction: column;
    }
}
