/* Level Up: an original chunky 8-bit game screen. Hard pixels, a live HUD, the programme as a quest list. */
:root { --te-radius: 0; --s: 5px; }
/* --stair is set per element so a local --s changes the step size. */
.te-btn, .te-btn-outline, .ar-frame, .ar-frame-in, .ar-frame-in > *, .te-icon-tile, .te-gallery-item, footer .te-bg-primary {
  --stair: polygon(calc(3*var(--s)) 0, calc(100% - 3*var(--s)) 0, calc(100% - 3*var(--s)) var(--s), calc(100% - 2*var(--s)) var(--s), calc(100% - 2*var(--s)) calc(2*var(--s)), calc(100% - var(--s)) calc(2*var(--s)), calc(100% - var(--s)) calc(3*var(--s)), 100% calc(3*var(--s)), 100% calc(100% - 3*var(--s)), calc(100% - var(--s)) calc(100% - 3*var(--s)), calc(100% - var(--s)) calc(100% - 2*var(--s)), calc(100% - 2*var(--s)) calc(100% - 2*var(--s)), calc(100% - 2*var(--s)) calc(100% - var(--s)), calc(100% - 3*var(--s)) calc(100% - var(--s)), calc(100% - 3*var(--s)) 100%, calc(3*var(--s)) 100%, calc(3*var(--s)) calc(100% - var(--s)), calc(2*var(--s)) calc(100% - var(--s)), calc(2*var(--s)) calc(100% - 2*var(--s)), var(--s) calc(100% - 2*var(--s)), var(--s) calc(100% - 3*var(--s)), 0 calc(100% - 3*var(--s)), 0 calc(3*var(--s)), var(--s) calc(3*var(--s)), var(--s) calc(2*var(--s)), calc(2*var(--s)) calc(2*var(--s)), calc(2*var(--s)) var(--s), calc(3*var(--s)) var(--s));
}
.te-site { --deep: color-mix(in srgb, var(--te-bg) 74%, #000); --b: var(--te-primary); }

/* Chrome */
.te-nav-wrap { padding: 0; }
.te-nav { max-width: none; border-radius: 0; background: var(--te-menu-bg, var(--deep)); border-bottom: 4px solid var(--te-primary); box-shadow: 0 4px 0 rgba(0,0,0,.35); backdrop-filter: none; -webkit-backdrop-filter: none; }
.te-nav-brand { font-weight: 400 !important; }
.te-nav-link { border-radius: 0; font-weight: 600; opacity: 1; }
.te-nav-link.is-active { font-weight: 600; background: var(--te-primary); color: var(--te-on-primary); }
.te-nav-toggle { border-radius: 0; }
.te-btn, .te-btn-outline { border: 0; border-radius: 0; clip-path: var(--stair); font-family: var(--te-heading); font-weight: 400; padding-inline: 1.5rem; }
.te-btn { background: var(--te-primary); color: var(--te-on-primary); box-shadow: inset -4px -4px 0 rgba(0,0,0,.28), inset 4px 4px 0 rgba(255,255,255,.34); }
.te-btn-sm { --s: 3px; padding-inline: 1rem; }
.te-btn-accent { background: var(--te-accent); color: var(--te-on-accent); }
.te-btn-soft { background: var(--te-tint-strong); color: var(--te-primary-text); }
.te-btn-light { background: #fff; color: #14141c; }
.te-btn.te-btn-outline { background: transparent; color: var(--te-primary-text); box-shadow: inset 0 0 0 3px currentColor; clip-path: none; }
.te-btn:hover { transform: translateY(-4px); }
.te-btn:active { transform: translateY(2px); }
.te-btn:focus-visible { outline: 0; box-shadow: inset 0 0 0 4px var(--te-ink); }
.te-btn-outline:focus-visible { outline: 3px solid var(--te-ink); outline-offset: 2px; }
.te-chip { border-radius: 0; font-weight: 600; }
.te-field, .te-choice { border-radius: 0; }
.te-field { border: 3px solid color-mix(in srgb, var(--te-ink) 40%, transparent); }
.te-field:focus { box-shadow: none; border-color: var(--te-primary-text); }

/* The screen */
.ar-hero { padding: 1.125rem .875rem .75rem; }
.ar-screen { position: relative; isolation: isolate; max-width: 76rem; margin: 10px auto 1.5rem; overflow: hidden; background: repeating-linear-gradient(180deg, transparent 0 2px, rgba(0,0,0,.14) 2px 4px), var(--deep); }
.ar-screen { --p: var(--te-primary); box-shadow: 0 -5px 0 var(--p), 0 5px 0 var(--p), -5px 0 0 var(--p), 5px 0 0 var(--p), 0 -10px 0 -5px var(--p), 0 10px 0 -5px var(--p), -10px 0 0 -5px var(--p), 10px 0 0 -5px var(--p), 0 20px 0 -5px rgba(0,0,0,.35); }
.ar-screen::before { content: ""; position: absolute; z-index: -1; inset: 0; background: var(--te-primary); opacity: .55; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='140' shape-rendering='crispEdges'%3E%3Cpath d='M12 18h4v4h-4zM86 8h4v4h-4zM150 34h4v4h-4zM44 62h4v4h-4zM118 76h4v4h-4zM22 112h4v4h-4zM166 104h4v4h-4zM76 124h4v4h-4z'/%3E%3C/svg%3E") 0 0 / 180px 140px; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='140' shape-rendering='crispEdges'%3E%3Cpath d='M12 18h4v4h-4zM86 8h4v4h-4zM150 34h4v4h-4zM44 62h4v4h-4zM118 76h4v4h-4zM22 112h4v4h-4zM166 104h4v4h-4zM76 124h4v4h-4z'/%3E%3C/svg%3E") 0 0 / 180px 140px; }
.ar-hud { --hud-a: color-mix(in srgb, var(--te-primary) 70%, #fff); --hud-b: color-mix(in srgb, var(--te-accent) 60%, #fff); display: grid; grid-template-columns: 1fr auto; gap: .625rem 1rem; padding: .75rem .875rem; background: color-mix(in srgb, var(--te-bg) 30%, #0a0a14); border-bottom: 4px solid var(--te-primary); color: #fff; }
.ar-hud-c { display: grid; align-content: start; gap: .125rem; min-width: 0; }
.ar-hud-name { grid-column: 1 / -1; }
.ar-cap { font-size: .6875rem; font-weight: 600; color: var(--hud-b); }
.ar-val { font-family: var(--te-heading); font-size: .9375rem; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--hud-a); }
.ar-hud .te-count { justify-content: flex-start; gap: 0; }
.ar-hud .te-count-cell { position: relative; flex: 0 0 auto; width: 2.5rem; max-width: none; padding: 0; background: none !important; box-shadow: none !important; }
.ar-hud .te-count-cell + .te-count-cell::before { content: ":"; position: absolute; top: -.0625rem; left: -.125rem; font-weight: 700; color: var(--hud-a); }
.ar-hud .te-count-num { font-family: var(--te-body); font-weight: 700; font-size: 1rem; color: var(--hud-a); }
.ar-hud .te-count-label { margin: 0; font-size: .6875rem; color: rgba(255,255,255,.82); }
.ar-hud .te-count-done { font-size: .9375rem; color: var(--hud-a); }

.ar-stage { display: grid; gap: 1.75rem; padding: 1.75rem 1.125rem 1.5rem; }
.ar-copy { display: grid; justify-items: start; gap: .875rem; min-width: 0; }
.ar-label { font-weight: 600; font-size: 1.0625rem; color: var(--te-accent-text); }
h1.ar-title { font-weight: 400; font-size: calc(var(--fit, 1) * clamp(3rem, 14.5vw, 7.5rem)); line-height: 1; letter-spacing: 0; overflow-wrap: break-word; color: var(--te-primary-text); text-shadow: .045em .045em 0 var(--te-accent), .09em .09em 0 var(--te-accent), .135em .135em 0 color-mix(in srgb, var(--te-accent) 40%, #000); max-width: 100%; }
.ar-sub { font-size: 1.125rem; font-weight: 500; }
.ar-venue { font-size: .9375rem; color: var(--te-muted); }
.ar-start { min-height: 3.5rem; font-size: 1.125rem; padding-inline: 1.75rem; margin-top: .25rem; }
.ar-start::before { content: ""; width: .625rem; height: .875rem; background: currentColor; clip-path: polygon(0 0, 33% 0, 33% 14%, 66% 14%, 66% 29%, 100% 29%, 100% 71%, 66% 71%, 66% 86%, 33% 86%, 33% 100%, 0 100%); animation: ar-blink 1.3s steps(1) infinite; }
@keyframes ar-blink { 50% { opacity: 0; } }

.ar-frame { --s: 6px; justify-self: center; width: min(100%, 24rem); padding: 6px; clip-path: var(--stair); background: var(--te-primary); }
.ar-frame-in { --s: 6px; padding: 6px; clip-path: var(--stair); background: var(--deep); }
.ar-frame-in > * { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; object-position: 50% 16%; clip-path: var(--stair); }

.ar-ground { position: relative; height: 3rem; margin-top: 4rem; border-top: 8px solid var(--te-primary); background: conic-gradient(var(--te-accent) 25%, color-mix(in srgb, var(--te-accent) 62%, #000) 0 50%, var(--te-accent) 0 75%, color-mix(in srgb, var(--te-accent) 62%, #000) 0) 0 0 / 16px 16px; }
.ar-cake { position: absolute; bottom: 100%; left: 50%; width: 5rem; height: 3.75rem; margin-bottom: 8px; transform: translateX(-50%); }
.ar-px-f { fill: var(--te-accent); }
.ar-px-y { fill: var(--te-primary); }
.ar-px-w { fill: #fff; }
.ar-px-i { fill: #fff; }
.ar-px-c { fill: var(--te-accent); }
.ar-px-d { fill: var(--te-primary); }
.ar-px-p { fill: color-mix(in srgb, var(--te-ink) 70%, var(--deep)); }
@media (min-width: 900px) {
  .ar-hud { grid-template-columns: minmax(0, 1fr) auto auto; gap: 2.5rem; padding: .875rem 1.5rem; }
  .ar-hud-name { grid-column: auto; }
  .ar-stage { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 3rem; align-items: center; padding: 3rem 3rem 1rem; }
  .ar-ground { margin-top: 6rem; }
  .ar-cake { left: 3rem; transform: none; width: 6.5rem; height: 4.875rem; }
}

/* Pixel boxes */
.te-card, .te-tile { --b: var(--te-primary); border: 0; border-radius: 0; background: color-mix(in srgb, var(--te-bg) 88%, #000); box-shadow: 0 -5px 0 var(--b), 0 5px 0 var(--b), -5px 0 0 var(--b), 5px 0 0 var(--b), 0 13px 0 -2px rgba(0,0,0,.4); }
.te-tile-accent { --b: var(--te-accent); }
a.te-card:hover, a.te-tile:hover { transform: translateY(-4px); box-shadow: 0 -5px 0 var(--te-accent), 0 5px 0 var(--te-accent), -5px 0 0 var(--te-accent), 5px 0 0 var(--te-accent), 0 13px 0 -2px rgba(0,0,0,.4); }
.te-icon-tile { --s: 3px; border-radius: 0; clip-path: var(--stair); background: var(--b); color: var(--te-on-primary); }
.te-tile-accent .te-icon-tile { color: var(--te-on-accent); }
.te-i { stroke-linecap: square; stroke-linejoin: miter; stroke-width: 2; shape-rendering: crispEdges; }
.te-h-section, .te-h-page { font-weight: 400; font-size: clamp(2rem, 8vw, 3.5rem); line-height: 1.05; text-shadow: .07em .07em 0 var(--te-accent); }
.te-h-card { font-family: var(--te-heading); font-weight: 400; }
.te-section-head { max-width: 76rem; text-align: left; }
.te-explore a.te-card > svg, .te-facts-grid a > span > svg, .te-story a svg { display: none; }
.te-facts-grid, .te-explore > div, .te-schedule > div { max-width: 76rem !important; }
.te-facts-grid { gap: 1.25rem !important; }
.te-explore .grid { gap: 1.25rem !important; }
@media (min-width: 900px) { .te-explore .grid { grid-template-columns: repeat(4, 1fr) !important; } .te-explore a.te-card { flex-direction: column; align-items: flex-start; min-height: 12rem; } }
.te-page-head { border-radius: 0; background: var(--deep); border-block: 5px solid var(--te-primary); margin-inline: 0; text-align: left; }
.te-count-cell { border-radius: 0; }

/* Programme: a quest list */
.te-timeline { counter-reset: quest; padding: clamp(1rem, 3vw, 2rem) !important; }
.te-timeline li { counter-increment: quest; grid-template-columns: auto 1fr !important; padding: 1.125rem 0 !important; background: repeating-linear-gradient(90deg, color-mix(in srgb, var(--te-ink) 30%, transparent) 0 6px, transparent 6px 12px) bottom / 100% 3px no-repeat; }
.te-timeline li:last-child { background: none; }
.te-timeline li > div:first-child > span:first-child { width: 1.125rem !important; height: 1.125rem !important; margin-top: .125rem; border-radius: 0 !important; background: none; box-shadow: inset 0 0 0 4px var(--te-primary); }
.te-timeline li:last-child > div:first-child > span:first-child { background: var(--te-accent); box-shadow: inset 0 0 0 4px var(--te-accent); }
.te-timeline li > div:first-child > span:last-child:not(:first-child) { display: none; }
.te-timeline li > div:last-child::before { content: "Quest " counter(quest); display: block; font-size: .75rem; font-weight: 600; color: var(--te-accent-text); margin-bottom: .25rem; }
.te-timeline .te-chip { background: none; padding: 0; color: var(--te-primary-text); font-weight: 700; font-size: .9375rem; }
.te-timeline .te-h-card { font-size: clamp(1.125rem, 4vw, 1.5rem); line-height: 1.2; }
@media (min-width: 760px) { .te-timeline li > div:last-child { display: grid; grid-template-columns: 1fr auto; column-gap: 1.5rem; } .te-timeline li > div:last-child::before { grid-column: 1 / -1; } .te-timeline .te-chip { grid-column: 2; grid-row: 2; margin: 0 !important; align-self: start; } .te-timeline .te-h-card { grid-column: 1; grid-row: 2; } .te-timeline li p { grid-column: 1 / -1; } }

.te-gallery-grid { --s: 6px; max-width: 76rem !important; gap: .625rem !important; }
.te-gallery-item { border-radius: 0 !important; clip-path: var(--stair); }
.te-closing-panel { --b: var(--te-accent); }
footer .te-bg-primary { --s: 6px; border-radius: 0 !important; clip-path: var(--stair); }
footer .te-bg-accent { display: none; }

@media (prefers-reduced-motion: reduce) { .ar-start::before { animation: none; } }
