html {
    font-family: var(--font-sans);
    font-size: var(--fs-14);
    font-weight: var(--fw-regular);
    line-height: var(--lh-text);
    color: var(--text-1);
    background: var(--bg-1);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    margin: 0;
}

[hidden] {
    display: none !important;
}

@media (max-width: 768px), (hover: none) and (pointer: coarse) {
    :is(input, textarea, select, [contenteditable="true"]) {
        font-size: max(var(--fs-16), var(--control-font-size, 0px)) !important;
    }
}

:where(h1, h2, h3, h4, h5, h6) {
    margin: 0;
    font-weight: var(--fw-bold);
    line-height: var(--lh-tight);
}

:where(p, ul, ol, figure, blockquote) {
    margin: 0;
}

:where(button, input, select, textarea) {
    font: inherit;
    color: inherit;
}

:where(a) {
    color: var(--link);
}

:where(code, kbd, pre, samp) {
    font-family: var(--font-mono);
}

:where(img, svg, video) {
    max-width: 100%;
}

:where(:focus-visible) {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
}

::selection {
    background: color-mix(in srgb, var(--link) 35%, transparent);
}

:where(input[type="search"])::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
    width: 28px;
    height: 28px;
    margin: 0 -4px 0 6px;
    flex: none;
    cursor: pointer;
    background-color: var(--text-2);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 6l12 12M18 6 6 18' stroke='white' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") center / 18px 18px no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 6l12 12M18 6 6 18' stroke='white' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") center / 18px 18px no-repeat;
}

:where(input[type="search"])::-webkit-search-cancel-button:hover {
    background-color: var(--text-1);
}

@media (hover: none) and (pointer: coarse) {
    :where(input[type="search"])::-webkit-search-cancel-button {
        width: 36px;
        height: 36px;
        margin-right: -8px;
        -webkit-mask-size: 20px 20px;
        mask-size: 20px 20px;
    }
}
