/* A day in the life of a mine (/stories/a-day-in-the-life-of-a-mine): the full-screen 3D stage, the clock, the captions,
   the running numbers, the scrub bar, the labels, the Narvik map and the text below. Page from builder/day/build_day.py,
   script from builder/www/src/day/ (bundled to /assets/day.js?v=9613ba7a). Tokens from minerals.css. */
.dl-main { padding: 0; }
.dl-stage { --dock: 132px; position: relative; height: 100vh; height: 100svh; min-height: 640px; overflow: hidden; isolation: isolate; background: #05080c; }
.dl-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; outline: none; }
.dl-stage canvas:active { cursor: grabbing; }
.dl-vignette { position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background: radial-gradient(130% 90% at 50% 45%, transparent 58%, rgba(2, 4, 6, .7) 100%), linear-gradient(180deg, rgba(4, 7, 10, .8) 0, transparent 200px),
  linear-gradient(0deg, rgba(4, 7, 10, .75) 0, transparent 220px); }
.dl-stage > :not(canvas):not(.dl-vignette) { z-index: 3; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* heading */
.dl-head { position: absolute; left: 32px; top: 86px; max-width: 440px; pointer-events: none; }
.dl-head a, .dl-head .crumbs { pointer-events: auto; }
.dl-head .crumbs { font-size: 12.5px; color: var(--faint); margin-bottom: 10px; }
.dl-head .crumbs a { color: var(--muted); text-decoration: none; }
.dl-head .crumbs span { margin: 0 4px; }
.dl-head .kick { margin-bottom: 10px; }
.dl-head h1 { font-size: clamp(28px, 3.3vw, 44px); line-height: 1.02; letter-spacing: -.035em; text-shadow: 0 2px 30px rgba(0, 0, 0, .6);
  background: linear-gradient(95deg, #fff 0%, #eef3f1 45%, #ffcf8a 80%, #ff8a5c 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.dl-head .lede { font-size: 15px; color: #c9d4d0; margin-top: 12px; line-height: 1.55; text-shadow: 0 1px 12px rgba(0, 0, 0, .8); }

/* the clock */
.dl-clock { position: absolute; right: 28px; top: 134px; text-align: right; pointer-events: none; }
.dl-clock time { display: block; font: 600 clamp(52px, 6.4vw, 92px)/.9 var(--head); letter-spacing: -.04em; color: #fff; font-variant-numeric: tabular-nums;
  text-shadow: 0 0 40px rgba(255, 170, 90, .25), 0 2px 20px rgba(0, 0, 0, .7); }
.dl-clock span { display: inline-block; margin-top: 8px; font: 11px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: #ffcf8a;
  padding: 4px 9px; border-radius: 999px; background: rgba(6, 11, 13, .6); border: 1px solid var(--line); }

/* caption */
.dl-cap { position: absolute; left: 32px; bottom: calc(var(--dock) + 16px); width: min(470px, calc(100% - 64px)); font-size: 14px; line-height: 1.5; color: #c9d4d0;
  padding: 14px 16px 12px; border-radius: 16px; background: rgba(6, 11, 13, .7); border: 1px solid var(--line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.dl-cap time { font: 500 11px var(--mono); color: #ff8a5c; letter-spacing: .08em; }
.dl-cap b { display: block; font: 600 19px/1.2 var(--head); color: var(--text); letter-spacing: -.01em; margin: 3px 0 6px; }
.dl-cap p { margin: 0; }
.dl-cap .src { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.dl-cap .src a { font: 10.5px var(--mono); color: var(--muted); text-decoration: none; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line2); }
.dl-cap .src a::before { content: "Source · "; color: var(--faint); }
.dl-cap .src a:hover { color: var(--lime); border-color: var(--lime); }
.dl-cap.in { animation: dl-in .55s var(--ease); }
@keyframes dl-in { from { opacity: 0; transform: translateY(8px); } }

/* running numbers */
.dl-stats { position: absolute; right: 28px; bottom: calc(var(--dock) + 16px); display: grid; grid-template-columns: repeat(2, minmax(118px, 1fr)); gap: 6px; pointer-events: none; }
.dl-stats div { padding: 8px 12px 7px; border-radius: 12px; background: rgba(6, 11, 13, .62); border: 1px solid var(--line); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.dl-stats b { display: block; font: 600 18px/1.15 var(--head); color: #fff; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.dl-stats span { font: 10px var(--mono); color: var(--faint); text-transform: uppercase; letter-spacing: .05em; }
.dl-stats div:last-child b { color: #ffcf8a; }

/* dock: views and the scrub bar */
.dl-dock { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); width: min(980px, calc(100% - 24px)); display: flex; flex-direction: column; align-items: center; gap: 9px; }
.dl-views { display: flex; gap: 4px; padding: 5px; border-radius: 18px; background: rgba(6, 11, 13, .74); border: 1px solid var(--line2);
  backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3); box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .9); }
.dl-views button { font: inherit; display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 96px; padding: 7px 12px 6px; border-radius: 13px;
  border: 0; background: none; color: var(--muted); cursor: pointer; transition: background .25s, color .25s, box-shadow .25s; }
.dl-views button b { font-family: var(--head); font-size: 14.5px; font-weight: 600; }
.dl-views button small { font: 9.5px var(--mono); color: var(--faint); letter-spacing: .03em; white-space: nowrap; }
.dl-views button:hover { color: var(--text); background: rgba(255, 255, 255, .05); }
.dl-views button[aria-selected="true"] { color: #1a0d00; background: #ffb36b; box-shadow: 0 0 28px -4px rgba(255, 150, 80, .6); }
.dl-views button[aria-selected="true"] small { color: rgba(26, 13, 0, .7); }
.dl-bar { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 16px; background: rgba(6, 11, 13, .74); border: 1px solid var(--line2);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.dl-play { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; background: #ffb36b; color: #1a0d00; }
.dl-play svg { width: 20px; height: 20px; fill: currentColor; }
.dl-play .pa, .dl-play[aria-pressed="true"] .pl { display: none; }
.dl-play[aria-pressed="true"] .pa { display: inline; }
.dl-track { position: relative; flex: 1; height: 40px; }
.dl-sky { position: absolute; left: 0; right: 0; top: 13px; height: 14px; border-radius: 7px; opacity: .9; }
.dl-marks { position: absolute; inset: 0; pointer-events: none; }
.dl-marks .band { position: absolute; top: 13px; height: 14px; }
.dl-marks .band.evac { background: repeating-linear-gradient(135deg, rgba(255, 207, 138, .5) 0 3px, transparent 3px 6px); }
.dl-marks .band.blast { background: #ff5a36; box-shadow: 0 0 14px #ff5a36; }
.dl-marks .band.vent { background: linear-gradient(90deg, rgba(201, 162, 122, .7), rgba(201, 162, 122, 0)); }
.dl-marks .mk { position: absolute; transform: translateX(-50%); border: 0; padding: 0; cursor: pointer; pointer-events: auto; }
.dl-marks .mk.ch { top: 30px; width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, .55); }
.dl-marks .mk.ch:hover { background: #fff; transform: translateX(-50%) scale(1.5); }
.dl-marks .mk.train { top: 0; width: 3px; height: 13px; background: #5fe0c8; border-radius: 2px; }
.dl-marks .mk.train span { position: absolute; left: 50%; bottom: 100%; transform: translateX(-50%); font: 9px var(--mono); color: #5fe0c8; opacity: 0; transition: opacity .2s; white-space: nowrap; }
.dl-marks .mk.train:hover span { opacity: 1; }
.dl-marks .hr { position: absolute; top: 31px; transform: translateX(-50%); font: 500 9px var(--mono); color: var(--faint); }
.dl-marks .hr:first-of-type { transform: none; }
.dl-marks .hr:last-of-type { transform: translateX(-100%); }
.dl-track input { position: absolute; left: 0; right: 0; top: 6px; width: 100%; height: 28px; margin: 0; background: none; -webkit-appearance: none; appearance: none; cursor: pointer; }
.dl-track input::-webkit-slider-runnable-track { height: 28px; background: none; }
.dl-track input::-moz-range-track { height: 28px; background: none; }
.dl-track input::-webkit-slider-thumb { -webkit-appearance: none; width: 4px; height: 28px; border-radius: 2px; background: #fff; box-shadow: 0 0 0 3px rgba(255, 179, 107, .5), 0 0 18px #ffb36b; }
.dl-track input::-moz-range-thumb { width: 4px; height: 28px; border: 0; border-radius: 2px; background: #fff; box-shadow: 0 0 0 3px rgba(255, 179, 107, .5), 0 0 18px #ffb36b; }
.dl-track input:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; border-radius: 8px; }
.dl-speed select, .dl-date select { font: 12px var(--mono); color: var(--text); background: rgba(6, 11, 13, .7); border: 1px solid var(--line2); border-radius: 10px; padding: 7px 8px; cursor: pointer; }
.dl-speed select option, .dl-date select option { background: #0a1013; }

/* tools */
.dl-tools { position: absolute; right: 24px; top: 84px; display: flex; gap: 6px; align-items: center; }
.dl-ic { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line2); background: rgba(6, 11, 13, .7); color: var(--text); cursor: pointer;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); transition: border-color .2s, color .2s; }
.dl-ic:hover { border-color: #ffb36b; color: #ffb36b; }
.dl-ic svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* labels */
.dl-labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.dl-labels .tag { position: absolute; left: 0; top: 0; opacity: 0; transition: opacity .35s; padding-left: 12px; white-space: nowrap; will-change: transform; }
.dl-labels .tag.on { opacity: 1; }
.dl-labels .tag::before { content: ""; position: absolute; left: -3px; top: -3px; width: 6px; height: 6px; border-radius: 50%; background: #fff; box-shadow: 0 0 10px #fff; }
.dl-labels .tag b { display: block; font: 600 13px var(--head); color: #fff; text-shadow: 0 1px 8px rgba(0, 0, 0, .9); margin-top: -9px; }
.dl-labels .tag span { display: block; font: 10.5px var(--mono); color: #c9d4d0; text-shadow: 0 1px 6px rgba(0, 0, 0, .9); }
.dl-labels .tag.depth::before { background: #ffd27a; box-shadow: 0 0 8px #ffd27a; }
.dl-labels .tag.depth b { font: 500 11px var(--mono); color: #ffd27a; }
.dl-labels .tag.hot b { color: #ff8a5c; }

/* the map to Narvik */
.dl-map { position: absolute; right: 28px; top: 47%; transform: translateY(-50%); width: min(720px, calc(100% - 560px)); pointer-events: none; }
@media (max-width: 1250px) { .dl-map { right: 50%; transform: translate(50%, -50%); width: min(720px, calc(100% - 32px)); top: 42%; } }
.dl-map[hidden] { display: none; }
.dl-map-in { padding: 16px 18px 12px; border-radius: 18px; background: rgba(4, 8, 11, .78); border: 1px solid var(--line2); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); animation: dl-in .6s var(--ease); }
.dl-map-k { font: 11px var(--mono); color: #5fe0c8; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 4px; }
.dl-map svg { width: 100%; height: auto; display: block; }
.dl-map .rail { fill: none; stroke: url(#dlrail); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 6px rgba(255, 179, 107, .4)); }
.dl-map .border { stroke: rgba(255, 255, 255, .25); stroke-width: 1.5; stroke-dasharray: 5 6; }
.dl-map .cty { font: 11px var(--mono); fill: var(--faint); letter-spacing: .08em; }
.dl-map .st circle { fill: #0a1013; stroke: #c9d4d0; stroke-width: 1.5; }
.dl-map .st.big circle { fill: #ffcf8a; stroke: #fff; }
.dl-map .st text { font: 600 15px var(--head); fill: #eef3f1; }
.dl-map .st .km { font: 11px var(--mono); fill: var(--faint); font-weight: 400; }
.dl-map .tr circle { fill: #fff; }
.dl-map .tr .halo { fill: rgba(255, 140, 80, .25); stroke: #ff8a5c; stroke-width: 1.5; }
.dl-map .tr text { font: 500 12px var(--mono); fill: #ffcf8a; }
.dl-map .tr.done circle { fill: #5fe0c8; }
.dl-map-n { font-size: 12px; color: var(--muted); margin: 4px 0 0; }

/* misc */
.dl-toast { position: absolute; left: 50%; top: 92px; transform: translateX(-50%); padding: 9px 16px; border-radius: 999px; font-size: 13px; color: #1a0d00; background: #ffb36b; }
.dl-toast[hidden] { display: none; }
.dl-load { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 14px; background: #05080c; transition: opacity .8s; z-index: 9 !important; }
.dl-load.gone { opacity: 0; pointer-events: none; }
.dl-load i { width: 2px; height: 90px; background: linear-gradient(#ffb36b, transparent); animation: dl-drop 1.4s ease-in-out infinite; }
.dl-load span { font: 12px var(--mono); color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
@keyframes dl-drop { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }
.dl-credit { position: absolute; right: 12px; bottom: 4px; margin: 0; font-size: 10px; color: rgba(255, 255, 255, .45); }
.dl-credit a { color: inherit; }
.dl-credit[hidden] { display: none; }
.dl-down { position: absolute; left: 32px; bottom: 6px; font: 11px var(--mono); color: var(--faint); text-decoration: none; letter-spacing: .05em; }
.dl-down:hover { color: var(--text); }
.no-gl canvas, .no-gl .dl-dock, .no-gl .dl-stats, .no-gl .dl-cap, .no-gl .dl-tools, .no-gl .dl-clock { display: none; }
.no-gl { height: auto; min-height: 0; padding-bottom: 40px; }
.no-gl .dl-head { position: static; padding: 90px 24px 0; max-width: 680px; }

/* the text below */
.dl-copy { max-width: 860px; margin: 0 auto; padding: 56px 24px 40px; }
.dl-intro { font-size: 18px; line-height: 1.6; color: #dfe7e4; }
.dl-hours { list-style: none; padding: 0; margin: 18px 0 30px; border-left: 1px solid var(--line2); }
.dl-hours li { position: relative; padding: 0 0 18px 22px; }
.dl-hours li::before { content: ""; position: absolute; left: -5px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: #ffb36b; box-shadow: 0 0 10px #ffb36b; }
.dl-hours a { text-decoration: none; color: var(--text); }
.dl-hours time { font: 500 12px var(--mono); color: #ff8a5c; margin-right: 10px; }
.dl-hours b { font: 600 17px var(--head); }
.dl-hours p { margin: 4px 0 0; color: #c9d4d0; }
.dl-src { font: 10.5px var(--mono); color: var(--muted); padding: 1px 7px; border: 1px solid var(--line2); border-radius: 999px; text-decoration: none; white-space: nowrap; }
.dl-src:hover { color: var(--lime); border-color: var(--lime); }
.dl-steps { counter-reset: s; list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; margin: 16px 0 28px; }
.dl-steps li { counter-increment: s; padding: 14px 16px; border-radius: 14px; background: rgba(255, 255, 255, .03); border: 1px solid var(--line); font-size: 14px; color: #c9d4d0; }
.dl-steps li b { display: block; font: 600 15px var(--head); color: var(--text); margin-bottom: 4px; }
.dl-steps li b::before { content: counter(s, decimal-leading-zero) "  "; font: 500 11px var(--mono); color: #ff8a5c; }
.dl-copy td.mono { font: 12px var(--mono); color: var(--muted); }
.dl-srcs { font-size: 14px; }

@media (max-width: 1180px) { .dl-stats { display: none; } }
@media (max-width: 900px) {
  .dl-stage { --dock: 150px; }
  .dl-head { left: 16px; right: 16px; top: 74px; max-width: none; }
  .dl-head .lede { display: none; }
  .dl-head h1 { font-size: 26px; max-width: 60%; }
  .dl-clock { right: 16px; top: 118px; }
  .dl-clock time { font-size: 46px; }
  .dl-tools { right: 12px; top: 70px; }
  .dl-date select { max-width: 120px; }
  .dl-cap { left: 12px; right: 12px; width: auto; bottom: calc(var(--dock) + 8px); font-size: 13px; padding: 10px 12px; }
  .dl-cap b { font-size: 16px; }
  .dl-cap p { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .dl-stats { display: none; }
  .dl-views { width: 100%; overflow-x: auto; scrollbar-width: none; }
  .dl-views button { min-width: 80px; padding: 6px 8px; flex: 1; }
  .dl-views button small { display: none; }
  .dl-labels .tag span { display: none; }
  .dl-map-in { padding: 10px; }
  .dl-map-n { display: none; }
}
@media (max-width: 520px) {
  .dl-head .crumbs, .dl-head .kick { display: none; }
  .dl-head { top: 66px; }
  .dl-clock { top: 112px; }
  .dl-speed select { max-width: 86px; }
  .dl-stage { --dock: 162px; }
  .dl-dock { bottom: 26px; }
  .dl-head h1 { font-size: 24px; max-width: none; }
  .dl-tools { left: 12px; right: auto; top: 128px; }
  .dl-ic { width: 36px; height: 36px; }
  .dl-date select { max-width: 104px; }
  .dl-clock { top: 122px; }
  .dl-clock time { font-size: 40px; }
  .dl-down { display: none; }
  .dl-credit { left: 12px; right: 12px; text-align: center; bottom: 6px; }
}
