/* Footer tableau: the WunderOS stack, with one invoice moving through it.
   Markup: _includes/footer-tableau.html. Drawing and story: assets/tableau.js. */
.tableau {
    --tb-bg: var(--bg, #FAFAFA);
    --tb-ink: var(--ink, #16161D);
    --tb-dim: var(--dim, #787B82);
    --tb-rule: var(--rule, #D6D8DD);
    --tb-cyan: #00AEEF;
    --tb-magenta: #EC008C;
    --tb-yellow: #FFD100;
    --tb-blue: #0086B8;     /* cyan, dark enough for text */
    --tb-gold: #C99A00;     /* yellow, dark enough for lines */
    --tb-mono: var(--font-mono, 'Spline Sans Mono', ui-monospace, Menlo, Consolas, monospace);
    margin-top: 2.5rem;
    padding-top: 2.5rem;
    border-top: 1px solid var(--tb-rule);
    background: var(--tb-bg);
    color: var(--tb-ink);
    font-family: var(--tb-mono);
    text-transform: none;
    letter-spacing: normal;
    overflow: hidden;
    container-type: inline-size;
}
.tableau svg { display: block; width: 100%; height: auto; }
.tableau svg text { font-family: var(--tb-mono); }
.tableau .t-label { fill: var(--tb-ink); font-size: 11px; letter-spacing: .08em; }
.tableau .t-sub { fill: var(--tb-dim); font-size: 9.5px; }
.tableau .t-lead { stroke: var(--tb-rule); stroke-width: 1; }
.tableau a:hover .t-label { fill: var(--tb-blue); }

.tableau .plate-top { fill: rgba(250,250,250,.86); stroke: var(--tb-ink); stroke-width: 1; stroke-opacity: .55; }
.tableau .plate-side { fill: rgba(0,174,239,.07); stroke: var(--tb-ink); stroke-width: 1; stroke-opacity: .4; }
.tableau .inset { fill: none; stroke: var(--tb-ink); stroke-opacity: .25; stroke-width: .8; }
.tableau .inset.lit { stroke: var(--tb-cyan); stroke-opacity: 1; fill: rgba(0,174,239,.16); }
.tableau .roadmap { stroke-dasharray: 3 3; stroke-opacity: .35; }
.tableau .dot { fill: var(--tb-ink); opacity: .22; }
.tableau .proc { fill: var(--tb-cyan); opacity: .35; }
.tableau .wall { fill: rgba(0,174,239,.12); stroke: var(--tb-ink); stroke-opacity: .55; stroke-width: 1; }
.tableau .door { fill: none; stroke: var(--tb-gold); stroke-width: 1.3; stroke-opacity: .7; }
.tableau .door.lit { stroke-opacity: 1; filter: drop-shadow(0 0 4px var(--tb-yellow)); }
.tableau .rail { stroke: var(--tb-gold); stroke-width: .8; stroke-opacity: .35; stroke-dasharray: 1 3; }
.tableau .agent { fill: var(--tb-ink); opacity: .7; }
.tableau .agent.working { fill: var(--tb-cyan); opacity: 1; animation: tb-work .45s ease-in-out infinite alternate; }
.tableau .ctl { fill: none; stroke: var(--tb-ink); stroke-width: 1.2; opacity: .75; }
.tableau .ctl.lit { stroke: var(--tb-gold); opacity: 1; filter: drop-shadow(0 0 4px var(--tb-yellow)); }
.tableau .runs-on { stroke: var(--tb-dim); stroke-width: .8; stroke-dasharray: 2 3; opacity: .6; transition: stroke .3s, opacity .3s; }
.tableau .runs-on.lit { stroke: var(--tb-cyan); opacity: 1; }
.tableau .vm polygon { transition: fill .3s, stroke .3s; }
.tableau .vm.lit polygon { fill: rgba(0,174,239,.28); stroke: var(--tb-cyan); stroke-opacity: 1; }
.tableau .vm.lit { filter: drop-shadow(0 0 4px var(--tb-cyan)); }
.tableau .layer { transition: opacity .6s; }
.tableau .layer.faded { opacity: .1; }
.tableau .role { fill: var(--tb-ink); font-size: 9px; opacity: 0; transition: opacity .3s;
                 stroke: var(--tb-bg); stroke-width: 3px; stroke-linejoin: round; paint-order: stroke; }
.tableau .role.on { opacity: 1; }

.tableau .bus { stroke: var(--tb-magenta); stroke-width: 2; opacity: .7; }
.tableau .bus-glow { stroke: var(--tb-magenta); stroke-width: 6; opacity: .08; }
.tableau .tap { stroke: var(--tb-magenta); stroke-width: 1; opacity: .45; }
.tableau .tap-dot { fill: var(--tb-magenta); opacity: .8; }
.tableau .seal { fill: none; stroke: var(--tb-magenta); stroke-width: 1; opacity: .6; }
.tableau .pulse { fill: var(--tb-magenta); filter: drop-shadow(0 0 3px var(--tb-magenta)); }
.tableau .seal-count { fill: var(--tb-magenta); font-size: 10px; }
.tableau .seal-inv { fill: var(--tb-dim); font-size: 9.5px; }

.tableau .packet, .tableau .worker { fill: var(--tb-cyan); filter: drop-shadow(0 0 4px var(--tb-cyan)); }
.tableau .trail { fill: none; stroke: var(--tb-cyan); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: .8; }

/* The invoice label is HTML, not SVG text: only HTML can blur what is behind it. */
.tableau .stack-wrap { position: relative; }
.tableau .tag { position: absolute; left: -999px; transform: translate(0, -100%); pointer-events: none; white-space: nowrap;
                font-size: clamp(8px, 1vw, 10px); color: var(--tb-ink); padding: 1px 5px; border-radius: 3px;
                background: rgba(250,250,250,.55); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
                box-shadow: 0 0 6px 3px rgba(250,250,250,.55); transition: opacity .3s; }
.tableau .tag.paid { color: var(--tb-blue); font-weight: 600; }

.tableau-sub { margin: -1rem auto 1.5rem; max-width: 38em; text-align: center; font-size: .72rem; line-height: 1.5; color: var(--tb-dim); }
.tableau-ticker { margin: .75rem 0 0; min-height: 1.5em; font-size: .72rem; line-height: 1.5; color: var(--tb-ink); }
.tableau-ticker .ticker-time { color: var(--tb-blue); margin-right: 1.25em; }
.tableau-foot { margin-top: 1.25rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem;
                font-size: .62rem; text-transform: uppercase; letter-spacing: .08em; color: var(--tb-dim); }
.site-foot .tableau-foot a { color: var(--tb-dim); }
.site-foot .tableau-foot a:hover { color: var(--tb-ink); }

/* Wordmark: 3D-ASCII glyphs, each turning about one tilted axis in a wave.
   The class is wos-glyph, not glyph: /wunderlog/ styles .glyph page-wide.
   font: inherit keeps any page rule from resizing a glyph past its box. */
.wos-title { position: relative; margin: 0 auto 2rem; color: var(--tb-ink); opacity: .85;
             font-size: min(15px, 100cqi / 56);  /* 90ch = 54em: fit the tableau width */ line-height: 1.1; perspective: 60em; }
.wos-title .wos-glyph { font: inherit; line-height: inherit; position: absolute; top: 0; white-space: pre; transform-origin: 50% 50%;
                    animation: tb-spin 6s cubic-bezier(.65,0,.35,1) infinite;
                    animation-delay: calc(var(--i) * .12s); }
@keyframes tb-spin {
    0%   { transform: rotate3d(.35, 1, .25, 0deg); color: var(--tb-ink); }
    15%  { color: var(--c); }
    30%  { transform: rotate3d(.35, 1, .25, 360deg); color: var(--tb-ink); }
    100% { transform: rotate3d(.35, 1, .25, 360deg); color: var(--tb-ink); }
}
@keyframes tb-work { to { opacity: .35; } }
@keyframes tb-twinkle { from { opacity: .12; } to { opacity: .6; } }

/* Phone: the JS crops the viewBox to the stack and the bus; side text would be unreadable. */
@media (max-width: 640px) {
    .tableau .t-side { display: none; }
    .tableau-foot { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
    .wos-title .wos-glyph, .tableau .proc, .tableau .agent.working { animation: none !important; }
}
