:root {
    color-scheme: light;
    font: 16px/1.5 system-ui, sans-serif;
    --ink: #192c36;
    --muted: #465d65;
    --line: #c8dbdb;
    --accent: #ffce42;
    --accent-hover: #ffdf71;
    --outline: #253b42;
    color: var(--ink);
    background: #bdeafa;
}
* { box-sizing: border-box; }
body {
    position: relative;
    min-height: 100dvh;
    margin: 0;
    background:
        radial-gradient(ellipse 85% 28% at 16% 112%, #a2cf63 99%, transparent 100%),
        radial-gradient(ellipse 85% 24% at 95% 108%, #b7df79 99%, transparent 100%),
        linear-gradient(#bdeafa, #e2f6ff);
}
header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem max(1rem, calc((100vw - 72rem)/2)); background: #fffdf3; border-bottom: 3px solid var(--outline); }
header, main { position: relative; z-index: 1; }
.mark { display: block; width: clamp(8.5rem, 30vw, 11.25rem); height: auto; }
.account { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: .6rem; font-size: .9rem; }
main { width: min(72rem, calc(100% - 2rem)); margin: clamp(1.5rem, 5vw, 4rem) auto; }
h1, h2 { font-family: "Arial Rounded MT Bold", system-ui, sans-serif; font-weight: 850; line-height: 1.18; letter-spacing: -.025em; margin: 0 0 1rem; }
h1 { font-size: clamp(1.85rem, 6vw, 3rem); }
h2 { font-size: 1.35rem; }
p { margin: .5rem 0 1rem; color: var(--muted); }
.login {
    max-width: 29rem;
    margin: 5vh auto;
    padding: clamp(1.2rem, 6vw, 2.4rem);
    border: 3px solid var(--outline);
    background: #fffdf3;
    border-radius: 1.25rem;
    box-shadow: 0 .5rem 0 #4b8399;
}
.login form { display: grid; gap: .75rem; }
.login label { font-weight: 600; }
.login details { border-top: 1px solid var(--line); padding-top: .8rem; }
.login details input { width: 100%; margin: .45rem 0; }
input, select, button { min-width: 0; font: inherit; border: 2px solid var(--outline); border-radius: .65rem; padding: .5rem .75rem; }
input, select { background: #fff; color: var(--ink); }
button { background: var(--accent); color: var(--ink); font-weight: 750; cursor: pointer; box-shadow: 0 .2rem 0 var(--outline); }
button:hover { background: var(--accent-hover); }
button:disabled { opacity: .6; }
:focus-visible { outline: 3px solid #1d6482; outline-offset: 3px; }
summary { cursor: pointer; }
#status:empty { display: none; }
.heading { display: flex; justify-content: space-between; align-items: baseline; gap: .8rem; flex-wrap: wrap; }
.month { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.totals { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; margin: 1.15rem 0 2rem; }
.totals article, section:not(.login) { border: 2px solid var(--outline); border-radius: .95rem; background: #fffdf3; padding: 1rem; box-shadow: 0 .25rem 0 #4b8399; }
.totals article:first-child { background: #ffee99; }
.totals article:last-child { background: #dcf0ae; }
.totals strong { display: block; font-size: clamp(1.15rem, 4vw, 1.55rem); }
section + section { margin-top: 1rem; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
td:first-child, td:last-child { white-space: nowrap; }
.customer { padding: .55rem 0; border-top: 1px solid var(--line); }
small { color: var(--muted); }

.meadow-sheep {
    position: absolute;
    inset: auto 0 0;
    height: clamp(4.5rem, 14vh, 8rem);
    overflow: hidden;
    pointer-events: none;
}

.sheep-lane {
    position: absolute;
    bottom: 1rem;
    left: 0;
    width: 2.9rem;
    height: 2.2rem;
    --stride: 15s;
    --rest: 30vw;
    animation: sheep-cross var(--stride) linear infinite;
}

.sheep-lane-0 { animation-delay: -3s; }
.sheep-lane-1 {
    bottom: 2.4rem;
    --stride: 18s;
    --rest: 56vw;
    animation-direction: reverse;
    animation-delay: -9s;
}
.sheep-lane-2 { bottom: .4rem; --stride: 20s; --rest: 77vw; animation-delay: -15s; }

.sheep { position: relative; width: 100%; height: 100%; animation: sheep-hop .75s ease-in-out infinite; }
.sheep-lane-1 .sheep { scale: -.8 .8; animation-delay: -.35s; }
.sheep-lane-2 .sheep { scale: .9; animation-delay: -.18s; }

.sheep-wool {
    position: absolute;
    top: .4rem;
    left: .25rem;
    width: 2rem;
    height: 1.25rem;
    background: #fffbec;
    border: 2px solid #354445;
    border-radius: 54% 47% 45% 51%;
    box-shadow: inset -.15rem -.16rem #e7d9b6;
}

.sheep-wool::before {
    content: "";
    position: absolute;
    inset: -.3rem .25rem auto auto;
    width: .9rem;
    height: .6rem;
    border-radius: 50%;
    background: #fffbec;
}

.sheep-face {
    position: absolute;
    top: .68rem;
    right: .16rem;
    width: .9rem;
    height: .92rem;
    border-radius: 48% 48% 52% 40%;
    rotate: 10deg;
    background: #2c3840;
}

.sheep-face::before, .sheep-face::after { content: ""; position: absolute; }
.sheep-face::before {
    top: -.11rem;
    left: -.15rem;
    width: .46rem;
    height: .25rem;
    border-radius: 55%;
    rotate: 22deg;
    background: #2c3840;
}
.sheep-face::after {
    top: .23rem;
    right: .18rem;
    width: .14rem;
    height: .14rem;
    border-radius: 50%;
    background: #fff;
}

.sheep-legs {
    position: absolute;
    bottom: .13rem;
    left: .68rem;
    width: 1.2rem;
    height: .62rem;
}

.sheep-legs::before, .sheep-legs::after {
    content: "";
    position: absolute;
    width: .19rem;
    height: 100%;
    border-radius: .12rem;
    background: #2c3840;
    transform-origin: top;
    animation: sheep-step .37s ease-in-out infinite alternate;
}
.sheep-legs::before { left: 0; }
.sheep-legs::after { right: 0; animation-direction: alternate-reverse; }

@keyframes sheep-cross {
    from { translate: -3.5rem 0; }
    to { translate: calc(100vw + 3.5rem) 0; }
}
@keyframes sheep-hop {
    0%, 100% { translate: 0 0; }
    32% { translate: 0 -.35rem; }
    65% { translate: 0 -.05rem; }
}
@keyframes sheep-step { from { rotate: -25deg; } to { rotate: 25deg; } }

@media (prefers-reduced-motion: reduce) {
    .sheep-lane, .sheep, .sheep-legs::before, .sheep-legs::after { animation: none; }
    .sheep-lane { left: var(--rest); }
}
