:root {
    color-scheme: light;
    --cashmere: #bbaa8e;
    --ink: #251f18;
    --paper: #f8f5ee;
    --line: #716450;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body.is-home {
    position: relative;
    isolation: isolate;
    background: var(--cashmere) url("hero-alashan-cashmere.jpg") center / cover no-repeat;
}

body.is-home::before {
    position: fixed;
    z-index: -1;
    inset: 0;
    background: rgba(38, 31, 22, .14);
    content: "";
}

body {
    display: flex;
    min-height: 100vh;
    margin: 0;
    flex-direction: column;
    background: var(--cashmere);
    color: var(--ink);
    font: 16px/1.5 "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
    letter-spacing: 0;
}

button,
input {
    font: inherit;
}

a {
    color: inherit;
}

.site-main {
    display: flex;
    min-width: 0;
    flex: 1;
}

.trace-home {
    display: grid;
    width: 100%;
    min-height: 100%;
    grid-template-rows: auto minmax(280px, 1fr);
    background: transparent;
}

.trace-home h1 {
    margin: 0;
    padding: 168px 24px 0;
    font-size: 42px;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
    text-shadow: 0 2px 18px rgba(248, 245, 238, .95);
}

.trace-query-stage {
    display: grid;
    min-width: 0;
    padding: 40px 24px 80px;
    place-items: center;
}

.trace-query-form {
    display: grid;
    width: min(720px, 100%);
    grid-template-columns: minmax(0, 1fr) 120px;
    gap: 10px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, .7);
    border-radius: 8px;
    background: rgba(248, 245, 238, .9);
    box-shadow: 0 20px 60px rgba(33, 25, 16, .28);
}

.trace-query-form input,
.trace-query-form button {
    min-width: 0;
    min-height: 58px;
    border: 1px solid var(--line);
    border-radius: 6px;
}

.trace-query-form input {
    padding: 0 18px;
    background: #fff;
    color: var(--ink);
}

.trace-query-form input::placeholder {
    color: #746957;
}

.trace-query-form button {
    padding: 0 20px;
    border-color: var(--ink);
    background: var(--ink);
    color: #fff;
    cursor: pointer;
    font-weight: 700;
}

.trace-query-form button:hover {
    background: #443a2e;
}

.trace-query-form input:focus-visible,
.trace-query-form button:focus-visible,
.site-footer a:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 3px;
}

.site-footer {
    display: flex;
    min-height: 76px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 7px;
    padding: 18px 24px;
    border-top: 1px solid rgba(37, 31, 24, .28);
    font-size: 14px;
}

.site-footer__main,
.site-footer__legal {
    display: flex;
    max-width: 100%;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    column-gap: 18px;
    row-gap: 4px;
}

.site-footer__legal {
    font-size: 13px;
}

body.is-home .site-footer {
    border-top: 0;
    background: transparent;
    text-shadow: 0 1px 10px rgba(248, 245, 238, .95);
}

.site-footer a {
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
}

.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;
}

@media (max-width: 640px) {
    .trace-home {
        grid-template-rows: auto minmax(240px, 1fr);
    }

    .trace-home h1 {
        padding-top: 124px;
        font-size: 30px;
    }

    .trace-query-stage {
        padding: 32px 20px 56px;
    }

    .trace-query-form {
        grid-template-columns: 1fr;
    }

    .site-footer {
        gap: 8px;
        padding-inline: 18px;
        text-align: center;
    }

    .site-footer__main,
    .site-footer__legal {
        width: 100%;
        flex-direction: column;
        gap: 4px;
    }

    .site-footer a {
        max-width: 100%;
        overflow-wrap: anywhere;
    }
}
