@font-face {
    font-family: "DSEG7 Classic";
    src: url("/assets/fonts/DSEG7Classic-Regular.woff2?v=046") format("woff2");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: "DSEG7 Classic";
    src: url("/assets/fonts/DSEG7Classic-Bold.woff2?v=046") format("woff2");
    font-style: normal;
    font-weight: 700;
    font-display: swap;
}

.topbar.has-live-clock {
    grid-template-columns: auto minmax(0, 1fr) minmax(300px, 480px) auto;
}

.topbar-live-clock {
    position: relative;
    isolation: isolate;
    width: 100%;
    height: 42px;
    min-width: 0;
    padding: 3px 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: #39403d;
    background: transparent;
    border: 0;
    border-radius: 10px;
    box-shadow: none;
    cursor: pointer;
    transition: transform .18s ease;
}

.topbar-live-clock::before {
    content: "";
    position: absolute;
    inset: 4px 36px 1px;
    z-index: var(--layer-underlay);
    background: radial-gradient(ellipse at center, rgba(50, 56, 53, .25) 0%, rgba(50, 56, 53, .13) 44%, rgba(50, 56, 53, 0) 76%);
    filter: blur(8px);
    transform: scale(1.06, .88);
    pointer-events: none;
}

.topbar-live-clock:hover,
.topbar-live-clock:focus-visible {
    transform: translateY(-1px);
    outline: none;
}

.topbar-live-clock__digits {
    display: flex;
    align-items: center;
    color: #39403d;
    font-family: "DSEG7 Classic", "Lucida Console", monospace;
    font-size: 33px;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    letter-spacing: .025em;
    line-height: 1;
    -webkit-text-stroke: 0;
    font-synthesis: none;
    text-rendering: geometricPrecision;
}

.topbar-live-clock__digits b {
    margin: 0 6px;
    color: #39403d;
    font-family: "Bahnschrift", "DIN Alternate", sans-serif;
    font-size: .72em;
    font-weight: 900;
    line-height: 1;
    text-shadow: 2px 3px 4px rgba(32, 37, 35, .25);
}

.clock-number {
    display: inline-flex;
}

.clock-digit {
    position: relative;
    display: inline-block;
    width: .7em;
    height: 1em;
    overflow: visible;
    font-style: normal;
    filter:
        drop-shadow(0 2px 1px rgba(54, 61, 57, .24))
        drop-shadow(0 7px 6px rgba(25, 30, 27, .28));
    transition: filter .18s ease;
}

.topbar-live-clock:hover .clock-digit,
.topbar-live-clock:focus-visible .clock-digit {
    filter:
        drop-shadow(0 3px 2px rgba(54, 61, 57, .28))
        drop-shadow(0 9px 8px rgba(25, 30, 27, .34));
}

.clock-digit__window {
    position: absolute;
    inset: 0;
    display: block;
    overflow: hidden;
    perspective: 220px;
}

.clock-digit__drum {
    --drum-radius: 52px;
    --drum-angle: 0deg;
    position: absolute;
    inset: 0;
    display: block;
    transform: translateZ(calc(var(--drum-radius) * -1)) rotateX(var(--drum-angle));
    transform-style: preserve-3d;
    transition: transform .76s cubic-bezier(.2, .7, .18, 1);
}

.clock-digit__face {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #39403d;
    background: transparent;
    transform: rotateX(var(--face-angle)) translateZ(var(--drum-radius));
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

@media (max-width: 1250px) {
    .topbar.has-live-clock {
        grid-template-columns: auto minmax(0, 1fr) 230px auto;
    }

    .topbar-live-clock__digits {
        font-size: 24px;
    }
}

@media (max-width: 980px) {
    .topbar.has-live-clock {
        grid-template-columns: auto minmax(0, 1fr) auto;
    }

    .topbar-live-clock {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .topbar-live-clock,
    .clock-digit__drum {
        transition: none;
    }
}

/* Keep role switch, settings and director links visible beside the clock. */
.topbar.has-live-clock {
    grid-template-columns: auto minmax(0, 1fr) minmax(170px, 220px) auto;
    gap: 8px;
}
.topbar-live-clock__digits { font-size: 23px; }

@media (min-width: 1500px) {
    .topbar.has-live-clock { grid-template-columns: auto minmax(0, 1fr) 260px auto; }
    .topbar-live-clock__digits { font-size: 28px; }
}

@media (max-width: 1250px) and (min-width: 1121px) {
    .topbar.has-live-clock { grid-template-columns: auto minmax(0, 1fr) 165px auto; }
    .topbar-live-clock__digits { font-size: 19px; }
    .topbar-live-clock { padding-inline: 5px; }
}

@media (max-width: 1250px) {
    .profile-chip > span { display: none; }
    .work-role-switch select { max-width: 105px; }
    .topbar-settings-select { max-width: 105px; }
}

@media (max-width: 1120px) {
    .topbar.has-live-clock { grid-template-columns: auto minmax(0, 1fr) auto; }
    .topbar-live-clock { display: none; }
    .topbar__actions { min-width: 0; gap: 4px; }
    .topbar__links { min-width: 0; }
}

@media (max-width: 980px) {
    .topbar.has-live-clock { grid-template-columns: auto minmax(0, 1fr) auto; }
}

@media (max-width: 800px) {
    .topbar.has-live-clock {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "brand" "links" "actions";
        gap: 4px;
        padding-block: 5px;
    }
    .topbar > .brand { grid-area: brand; }
    .topbar > .topbar__links { grid-area: links; grid-column: 1 / -1; width: 100%; flex-wrap: wrap; overflow: visible; white-space: normal; }
    .topbar > .topbar__actions { grid-area: actions; justify-self: stretch; justify-content: flex-end; max-width: 100%; }
    .topbar__links a { padding: 5px 7px; font-size: 11px; }
    .topbar-settings-select { max-width: 86px; padding-inline: 6px 20px; }
    .work-role-switch { gap: 3px; }
    .work-role-switch select { max-width: 82px; }
    .workspace-page { display: flex; flex-direction: column; }
    .workspace-page .page-shell { width: calc(100% - 16px); height: auto; min-height: 0; flex: 1 1 auto; }
}
