/* Снежинки на фоне шапки и футера. */
.site-snow {
    --edge: max(10px, calc((100% - 1320px) / 2 + 8px));
    position: absolute;
    z-index: -1;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}
.site-header .site-snow { color: #fffef6; }
.site-snowflake {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: 1em;
    height: 1em;
    font-size: var(--size);
    opacity: var(--opacity);
    transform: translate(-50%, -50%) rotate(var(--angle));
}
.site-snowflake > i {
    position: absolute;
    inset-block: 4%;
    inset-inline-start: calc(50% - .5px);
    width: 1px;
    background: currentColor;
}
.site-snowflake > i:nth-child(2) { transform: rotate(60deg); }
.site-snowflake > i:nth-child(3) { transform: rotate(120deg); }
.site-snowflake > i::before, .site-snowflake > i::after {
    content: "";
    position: absolute;
    left: 50%;
    width: .3em;
    height: .3em;
    border-right: 1px solid currentColor;
    border-bottom: 1px solid currentColor;
}
.site-snowflake > i::before {
    top: 8%;
    transform: translateX(-50%) rotate(45deg);
}
.site-snowflake > i::after {
    bottom: 8%;
    transform: translateX(-50%) rotate(225deg);
}
.site-header .site-snowflake:nth-child(1) {
    --x: var(--edge);
    --y: 31%;
    --size: 12px;
    --angle: 11deg;
    --opacity: .64;
}
.site-header .site-snowflake:nth-child(2) {
    --x: 61%;
    --y: 29%;
    --size: 16px;
    --angle: -8deg;
    --opacity: .82;
}
.site-header .site-snowflake:nth-child(3) {
    --x: calc(100% - var(--edge));
    --y: 72%;
    --size: 13px;
    --angle: 19deg;
    --opacity: .73;
}
.site-header .site-snowflake:nth-child(4) {
    --x: 57%;
    --y: 76%;
    --size: 9px;
    --angle: 16deg;
    --opacity: .53;
}
.site-header .site-snowflake:nth-child(7) {
    --x: 49%;
    --y: 12%;
    --size: 7px;
    --angle: -20deg;
    --opacity: .58;
}
.site-header .site-snowflake:nth-child(8) {
    --x: 79%;
    --y: 91%;
    --size: 8px;
    --angle: 14deg;
    --opacity: .58;
}
.site-header .site-snowflake:nth-child(9) {
    --x: 68%;
    --y: 17%;
    --size: 9px;
    --angle: 8deg;
    --opacity: .57;
}
@media (max-width: 1199px) {
    .site-snowflake:nth-child(5),
    .site-snowflake:nth-child(6),
    .site-snowflake:nth-child(9) { display: none; }
}
@media (min-width: 390px) {
    .site-header .site-snowflake:nth-child(4) { --x: 67%; }
}
@media (min-width: 601px) {
    .site-header .site-snowflake:nth-child(2) { --x: 49%; }
    .site-header .site-snowflake:nth-child(4) { --x: 54%; }
}
@media (min-width: 1200px) {
    .site-header .site-snowflake:nth-child(1) { --size: 15px; }
    .site-header .site-snowflake:nth-child(2) { --x: 25%; --y: 39%; --size: 19px; }
    .site-header .site-snowflake:nth-child(3) { --size: 16px; }
    .site-header .site-snowflake:nth-child(4) { --x: 71%; --y: 68%; --size: 13px; }
    .site-header .site-snowflake:nth-child(7) { --x: 32%; --y: 12%; --size: 8px; }
    .site-header .site-snowflake:nth-child(8) { --x: 19%; --y: 87%; --size: 9px; }
    .site-header .site-snowflake:nth-child(5) {
        --x: 43%;
        --y: 85%;
        --size: 8px;
        --angle: 26deg;
        --opacity: .52;
    }
    .site-header .site-snowflake:nth-child(6) {
        --x: 77%;
        --y: 13%;
        --size: 10px;
        --angle: -14deg;
        --opacity: .62;
    }
}

.site-footer {
    position: relative;
    isolation: isolate;
}
.site-footer .site-snow { color: #527b65; }
:root[data-theme='dark'] .site-footer .site-snow { color: #e4efdf; }

.site-footer .site-snowflake:nth-child(1) {
    --x: var(--edge);
    --y: 28px;
    --size: 12px;
    --angle: 12deg;
    --opacity: .6;
}
.site-footer .site-snowflake:nth-child(2) {
    --x: 54%;
    --y: 20px;
    --size: 17px;
    --angle: -9deg;
    --opacity: .63;
}
.site-footer .site-snowflake:nth-child(3) {
    --x: calc(100% - var(--edge));
    --y: 65%;
    --size: 13px;
    --angle: 23deg;
    --opacity: .65;
}
.site-footer .site-snowflake:nth-child(4) {
    --x: 86%;
    --y: 31%;
    --size: 11px;
    --angle: -18deg;
    --opacity: .61;
}
.site-footer .site-snowflake:nth-child(5) {
    --x: 92%;
    --y: calc(100% - 81px);
    --size: 16px;
    --angle: 12deg;
    --opacity: .58;
}
.site-footer .site-snowflake:nth-child(6) {
    --x: 53%;
    --y: 26px;
    --size: 9px;
    --angle: 23deg;
    --opacity: .5;
}
.site-footer .site-snowflake:nth-child(7) {
    --x: 76%;
    --y: 35px;
    --size: 9px;
    --angle: 13deg;
    --opacity: .56;
}
.site-footer .site-snowflake:nth-child(8) {
    --x: 83%;
    --y: 82%;
    --size: 14px;
    --angle: 6deg;
    --opacity: .62;
}
.site-footer .site-snowflake:nth-child(9) {
    --x: 27%;
    --y: 74%;
    --size: 10px;
    --angle: -12deg;
    --opacity: .55;
}
@media (min-width: 640px) {
    .site-footer .site-snowflake:nth-child(2) { --x: 36%; --y: 23px; }
    .site-footer .site-snowflake:nth-child(4) { --x: 86%; --y: 29%; }
}
@media (min-width: 992px) {
    .site-footer .site-snowflake:nth-child(2) { --x: 31%; --y: 28px; }
    .site-footer .site-snowflake:nth-child(4) { --x: 27%; --y: 53%; }
}
@media (min-width: 1200px) {
    .site-footer .site-snowflake:nth-child(8) { --x: 69%; --y: 71%; }
}

/* Ёлка на листе Excel в первом экране. */
.l-hero > .site-container { position: relative; }

.winter-sheet {
    --sheet-border: #b4cfb470;
    --sheet-grid: #bbd5b439;
    --sheet-header: #d8edce12;
    --sheet-green: #87ae83;
    --sheet-green-light: #b6cc9f;
    --sheet-green-mid: #9fbd91;
    --sheet-green-dark: #739c77;
    position: absolute;
    inset-block-start: -16px;
    inset-inline-end: 18px;
    width: 96px;
    border: 1px solid var(--sheet-border);
    border-radius: 4px;
    overflow: hidden;
    background: #0f332632;
    color: #e0ead8;
    box-shadow: 0 6px 0 #17382c43;
    font: 6px/1 var(--mono);
    pointer-events: none;
    user-select: none;
}
.winter-sheet-bar {
    display: flex;
    align-items: center;
    gap: .75em;
    min-height: 1.65em;
    background: var(--sheet-header);
    border-bottom: 1px solid var(--sheet-grid);
}
.winter-sheet-bar strong {
    width: 3.2em;
    align-self: stretch;
    display: grid;
    place-items: center;
    border-inline-end: 1px solid var(--sheet-grid);
    font-weight: 400;
}
.winter-sheet-grid {
    display: grid;
    grid-template-columns: 2em repeat(7, minmax(0, 1fr));
    grid-template-rows: 1.55em repeat(8, minmax(0, 1fr));
    aspect-ratio: 1.13;
}
.winter-axis, .winter-cell {
    position: relative;
    display: grid;
    place-items: center;
    border-inline-end: 1px solid var(--sheet-grid);
    border-block-end: 1px solid var(--sheet-grid);
}
.winter-axis { background: var(--sheet-header); }
.winter-axis-current { background: #d8edce2b; color: #fffaf0; }
.winter-cell:nth-child(8n), .winter-axis:nth-child(8n) { border-inline-end: 0; }
.winter-sheet-grid > :nth-last-child(-n + 8) { border-block-end: 0; }
.winter-axis-corner::after {
    content: "";
    width: .75em;
    aspect-ratio: 1;
    background: #c8ddc99e;
    clip-path: polygon(100% 0, 100% 100%, 0 100%);
}
.winter-light { background: var(--sheet-green-light); }
.winter-mid { background: var(--sheet-green-mid); }
.winter-green, .winter-ornament { background: var(--sheet-green); }
.winter-deep { background: var(--sheet-green-dark); }
.winter-trunk::after {
    content: "";
    width: 58%;
    height: 100%;
    background: #b7a283;
}
.winter-ornament::after {
    content: "";
    width: 48%;
    max-width: 13px;
    aspect-ratio: 1;
    border-radius: 50%;
    background: #a73949;
    box-shadow: inset 0 0 0 1px #fff3e644;
}
.winter-selected {
    z-index: 1;
    outline: 1px solid #ffc5bc;
    outline-offset: -1px;
    background: #a73a4a;
}
.winter-selected::after { background: #f9d1c5; box-shadow: none; }
.winter-selected::before {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    width: 3px;
    height: 3px;
    background: #ffc5bc;
}
.winter-star::after, .winter-snowflake::after {
    content: "";
    width: 86%;
    height: 90%;
    background: #fff2ce;
    clip-path: polygon(50% 0, 62% 36%, 100% 50%, 62% 64%, 50% 100%, 38% 64%, 0 50%, 38% 36%);
}
.winter-snowflake::after {
    width: 33%;
    height: 43%;
    background: #d9e8d0;
    opacity: .76;
}
.winter-snow::after {
    content: "";
    width: 2px;
    height: 2px;
    border-radius: 50%;
    background: #d9e8d0;
    opacity: .72;
}

@media (min-width: 390px) {
    .winter-sheet { inset-inline-end: 22px; width: 104px; }
}
@media (max-width: 639px) {
    .l-hero-meta { justify-content: flex-start; max-width: calc(100% - 112px); }
    .l-hero-meta > span:empty { display: none; }
}
@media (min-width: 640px) {
    .winter-sheet {
        inset-block-start: 152px;
        inset-inline-end: 30px;
        width: 166px;
        font-size: 8px;
    }
}
@media (min-width: 640px) and (max-width: 991px) {
    .project-layout .l-hero-tagline, .l-hero-bottom p {
        max-width: min(570px, calc(100% - 190px));
    }
}
@media (min-width: 992px) {
    .winter-sheet {
        inset-block-start: 42px;
        width: min(218px, calc(100vw - 855px));
        font-size: 10px;
    }
    .winter-selected { outline-width: 2px; outline-offset: -2px; }
    .winter-selected::before { width: 5px; height: 5px; }
}
@media (min-width: 1200px) {
    .winter-sheet { inset-block-start: 30px; width: 259px; }
}
@media (min-width: 1360px) {
    .winter-sheet { inset-inline-end: 36px; width: 286px; font-size: 11px; }
}
@media (forced-colors: active) {
    .site-snow, .winter-sheet { display: none; }
}
