@font-face {
    font-family: "Commune Marker";
    src: url("../fonts/PermanentMarker-Regular.woff") format("woff");
    font-display: swap;
}

.ting-commune {
    display: none;
}

html[data-theme="ting"] .ting-commune {
    --ting-banner-height: 228px;
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    min-height: var(--ting-banner-height);
    isolation: isolate;
    overflow: clip;
    background: #151b1c;
    border-block-end: 1px solid var(--color-secondary, #394242);
    color: #eeece3;
    font-family: "OpenDyslexic", sans-serif;
}

html[data-theme="ting"] .ting-commune.ting-home {
    --ting-banner-height: 340px;
}
html[data-theme="ting"] .ting-commune.ting-is-compact {
    --ting-banner-height: 124px;
}
.ting-commune canvas {
    position: absolute;
    z-index: -2;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}
.ting-commune::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    background: linear-gradient(
        90deg,
        #151b1c 0%,
        #151b1cf5 18%,
        #151b1cdd 29%,
        #151b1c30 57%,
        #151b1c00 78%
    );
    pointer-events: none;
}
.ting-identity {
    display: flex;
    align-items: center;
    align-self: center;
    gap: 24px;
    width: fit-content;
    max-width: calc(100% - 32px);
    margin: 24px clamp(16px, 4vw, 64px) 70px;
}
.ting-mark {
    width: 98px;
    height: 98px;
    color: var(--ting-accent, #00feff);
    flex-shrink: 0;
}
.ting-lockup {
    width: 228px;
    height: auto;
    max-width: 100%;
    fill: #eeece3;
}
.ting-identity-copy {
    min-width: 0;
}
.ting-identity-copy p {
    margin: 12px 0 0;
    font-size: 11px;
    letter-spacing: 0.12em;
}
.ting-commune.ting-is-compact .ting-identity {
    gap: 12px;
    margin-block: 14px 56px;
}
.ting-commune.ting-is-compact .ting-mark {
    width: 42px;
    height: 42px;
}
.ting-commune.ting-is-compact .ting-lockup {
    width: 146px;
}
.ting-commune.ting-is-compact .ting-identity-copy p {
    display: none;
}
.ting-controls {
    position: absolute;
    inset-inline-end: clamp(12px, 3vw, 42px);
    bottom: 12px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 9px 12px;
    max-width: calc(100% - 24px);
    background: #151b1c;
    border: 1px solid #445052;
    box-shadow: 0 2px 12px #0003;
    font-size: 14px;
    line-height: 1.5;
}
.ting-controls[hidden] {
    display: none;
}
.ting-controls button {
    font: inherit;
    color: #eeece3;
    border: 1px solid #536162;
    border-radius: 0;
    background: #252e30;
    min-height: 32px;
    padding: 5px 10px;
    cursor: pointer;
}
.ting-controls button:hover {
    background: #354042;
}
.ting-controls :is(button, input):focus-visible {
    outline: 2px solid var(--color-primary, #b4ecec);
    outline-offset: 3px;
}
.ting-controls label {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 7px;
}
.ting-controls input[type="color"] {
    width: 34px;
    height: 32px;
    padding: 3px;
    border: 1px solid #536162;
    background: #252e30;
    cursor: pointer;
}
.ting-speed-track {
    display: grid;
    width: 250px;
    gap: 1px;
}
.ting-controls input[type="range"] {
    width: 100%;
    height: 22px;
    margin: 0;
    accent-color: var(--color-primary, #b4ecec);
    cursor: pointer;
}
.ting-controls output {
    min-width: 44px;
    text-align: end;
    font-variant-numeric: tabular-nums;
}
.ting-notches {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    color: #aeb8b4;
    text-align: center;
    font-size: 11px;
}
.ting-notches span::before {
    content: "";
    display: block;
    width: 1px;
    height: 4px;
    margin: 0 auto 2px;
    background: #768380;
}
.ting-notches [data-active] {
    color: #eeece3;
}
.ting-notches [data-active]::before {
    background: var(--color-primary, #b4ecec);
}
.ting-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}
.ting-fallback {
    margin: 0 24px 12px;
    font-size: 12px;
    color: #b8c2bf;
}
.ting-ready .ting-fallback {
    display: none;
}

@media (max-width: 700px) {
    html[data-theme="ting"] .ting-commune,
    html[data-theme="ting"] .ting-commune.ting-home {
        --ting-banner-height: 282px;
    }
    html[data-theme="ting"] .ting-commune.ting-is-compact {
        --ting-banner-height: 194px;
    }
    .ting-identity {
        gap: 16px;
        margin: 18px 16px 100px;
    }
    .ting-mark {
        width: 72px;
        height: 72px;
    }
    .ting-lockup {
        width: 184px;
    }
    .ting-controls {
        justify-content: center;
        inset-inline: 12px;
        gap: 8px;
        padding: 8px;
    }
    .ting-speed {
        order: 3;
        flex-basis: 100%;
        justify-content: center;
    }
    .ting-speed-track {
        width: min(230px, calc(100vw - 118px));
    }
    .ting-commune.ting-is-compact .ting-identity {
        margin-bottom: 112px;
    }
    .ting-commune::before {
        background: linear-gradient(
            90deg,
            #151b1cfa 0%,
            #151b1cdc 28%,
            #151b1c45 78%
        );
    }
}

@media (prefers-reduced-motion: reduce) {
    .ting-commune *,
    .ting-commune::before {
        animation: none !important;
        transition: none !important;
    }
}
@media print {
    html[data-theme="ting"] .ting-commune {
        display: none;
    }
}
