/* DataDeck — "Deck" direction. The page is the deck's own log; the deck itself runs on the right.
   Type: IBM Plex Mono for the headline, nav, labels, logs, tables and numbers; IBM Plex Sans for running
   paragraphs and, as in the app, for card titles and the drafted post. */

@font-face { font-family: "Plex Mono"; src: url("fonts/ibm-plex-mono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("fonts/ibm-plex-mono-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("fonts/ibm-plex-mono-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Plex Sans"; src: url("fonts/ibm-plex-sans-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Sans"; src: url("fonts/ibm-plex-sans-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --ink: #111;
  --text: #262626;
  --mute: #6f6f6f;
  --faint: #a3a3a3;
  --rule: #dcdcdc;
  --wash: #f6f6f4;
  --o: #fb923c;        /* the app's accent, as a fill */
  --ot: #c2410c;       /* accent as small text on white (darker than the app's #ea580c for contrast) */
  --ow: #fff4e8;
  --mono: "Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sans: "Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --pad: 20px;
  --snap: 200ms;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: #fff; color: var(--text); font: 400 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
h1, h2, p, pre, ul { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration-color: var(--o); text-decoration-thickness: 2px; text-underline-offset: 4px; }
a:hover { background: var(--o); color: var(--ink); text-decoration-color: transparent; }
:focus-visible { outline: 2px solid var(--ot); outline-offset: 3px; }
sub { font-size: .7em; line-height: 0; vertical-align: -0.25em; }
pre sub { display: inline-block; width: .857em; text-align: center; } /* keeps one cell of the mono grid */
.ar { display: inline-block; width: 1ch; height: .62em; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10'%3E%3Cpath d='M0 5h10.5M6.5 1l4 4-4 4' fill='none' stroke='%23111' stroke-width='1.5'/%3E%3C/svg%3E") center / 100% 100% no-repeat; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 20; background: var(--ink); color: #fff; padding: 10px 14px; }
.skip:focus { top: 8px; }

/* ---------- the log (left) ---------- */

.page { display: flex; flex-direction: column; }
.log, main { display: contents; }
.top { order: 0; }
.row.hero { order: 1; }
.stage-wrap { order: 2; }
.row { order: 3; }
.row.foot { order: 4; }

.top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 22px var(--pad) 0; font: 400 12px/1.6 var(--mono); letter-spacing: .05em; color: var(--mute); }
.brand { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; }
.brand .mark { grid-row: 1 / span 3; display: block; width: 32px; height: 24px; margin-top: 6px; image-rendering: pixelated; }
.brand a, .brand > span { grid-column: 2; }
.brand a { text-decoration: none; color: var(--ink); }
.brand a:hover { background: none; }
.brand b { font-weight: 600; letter-spacing: .08em; }
.top nav { display: grid; justify-items: end; }
.top nav a { text-decoration: none; color: var(--ink); white-space: nowrap; }
@keyframes blink { 50% { opacity: 0; } }

.row { padding: 0 var(--pad); }
.row .m { padding-top: 30px; font: 400 12px/1.6 var(--mono); letter-spacing: .05em; color: var(--mute); text-transform: uppercase; }
.row .mi { display: flex; gap: 12px; align-items: baseline; }
.row .m .no { color: var(--ink); font-weight: 600; }
.row .m .no:not(:only-child)::after { content: " /"; color: var(--faint); font-weight: 400; }
.row .c { container-type: inline-size; padding: 8px 0 34px; border-bottom: 1px solid var(--rule); }
.hero .m { padding-top: 28px; }
.hero .c { padding-bottom: 32px; border-bottom: 0; }
.get .c { border-bottom: 0; }
.foot .m { padding-top: 0; }
.foot .c { border-bottom: 0; padding-top: 26px; padding-bottom: 48px; }

.orn { font: 400 12px/1.6 var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--mute); margin-bottom: 18px; }
h1 { font: 600 min(60px, 9.2cqw)/1.08 var(--mono); letter-spacing: -0.035em; color: var(--ink); }
h1 span { display: block; white-space: nowrap; }
h1 mark { background: var(--o); color: var(--ink); padding: 0 .14em; margin-left: -.06em; }
.standfirst { max-width: 33em; margin-top: 22px; font-size: 18px; line-height: 1.55; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-top: 26px; }
.btn { display: inline-block; background: var(--ink); color: #fff; font: 500 14px/1 var(--mono); padding: 16px 20px; text-decoration: none; transition: background var(--snap), color var(--snap); }
.btn::before { content: "[ "; color: var(--o); }
.btn::after { content: " ]"; color: var(--o); }
.btn:hover { background: var(--o); color: var(--ink); }
.btn:hover::before, .btn:hover::after { color: var(--ink); }
.fine { font-size: 14px; color: var(--mute); }

pre { font: 400 min(13.5px, calc((100vw - 2 * var(--pad)) / 31)) / 1.8 var(--mono); color: var(--text); white-space: pre; }
pre .t { color: var(--mute); }
pre b { font-weight: 600; color: var(--ink); }
pre mark, .yours { background: var(--o); color: var(--ink); }
pre mark { padding: 2px 0; box-shadow: -4px 0 0 var(--o), 4px 0 0 var(--o); }
pre i { font-style: normal; color: var(--faint); }
.tail { margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--ink); }
.tail b { display: inline-block; }

.k { font: 600 12px/1.6 var(--mono); letter-spacing: .08em; color: var(--ot); }
h2 { font: 600 clamp(22px, 6.6cqw, 30px)/1.2 var(--mono); letter-spacing: -0.03em; color: var(--ink); margin-top: 10px; max-width: 27ch; text-wrap: balance; }
.row .c > p:not(.k):not(.orn) { max-width: 35em; margin-top: 12px; }
.yours { padding: 1px 6px; font: 500 .86em/1 var(--mono); }
.lg { margin-top: 22px; padding: 4px 0 4px 16px; border-left: 2px solid var(--ink); }
.lg.tbl { padding: 0; border: 0; color: var(--ink); }
.lg.file { border-left: 0; padding: 14px 16px; background: var(--wash); border: 1px solid var(--rule); width: fit-content; max-width: 100%; }
kbd { font: 500 .85em/1 var(--mono); border: 1px solid var(--ink); padding: 2px 6px; color: var(--ink); background: #fff; white-space: nowrap; }
.keys { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 22px !important; font: 400 12.5px/1.75 var(--mono); color: var(--mute); }
.keys kbd { margin-right: 6px; }

.dl { margin-top: 22px; border-top: 1px solid var(--ink); max-width: 560px; font: 400 14.5px/1.75 var(--mono); }
.dl a { display: grid; grid-template-columns: 124px 1fr auto; align-items: baseline; gap: 12px; padding: 15px 8px 15px 0; border-bottom: 1px solid var(--rule); text-decoration: none; transition: padding var(--snap); }
.dl li:last-child a { border-bottom-color: var(--ink); }
.dl a b { font-weight: 600; color: var(--ink); }
.dl a span { color: var(--mute); font-size: 13px; }
.dl a i { font-style: normal; font-size: 12px; color: var(--faint); }
.dl a:hover { background: var(--o); padding-left: 10px; }
.dl a:hover span, .dl a:hover i { color: var(--ink); }
.get .fine { margin-top: 16px !important; }

.foot { font-size: 14.5px; }
.foot .c > p:first-child { margin-top: 0 !important; }
.foot .c > p:not(.credits):not(.alt) { margin-top: 6px !important; }
.foot a { white-space: nowrap; }
.foot .credits { font-size: 12.5px; line-height: 1.6; color: var(--mute); margin-top: 18px !important; }
.foot .credits i { color: var(--text); }
.foot .alt { font-size: 12.5px; color: var(--mute); margin-top: 14px !important; }
.foot .alt a { text-decoration-thickness: 1px; }

/* ---------- the deck (right) ---------- */

.stage-wrap { position: relative; }
.stage { position: relative; height: 620px; overflow: hidden; background: var(--wash); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); --w: min(540px, calc(100% - 32px)); }
.scene { position: absolute; inset: 0; }
.pause { position: absolute; z-index: 6; top: 14px; right: 12px; background: none; border: 0; padding: 6px; font: 400 11.5px/1 var(--mono); letter-spacing: .04em; color: var(--mute); cursor: pointer; }
.pause:hover { color: var(--ink); }

.cap, .bar, .post, .plane { position: absolute; left: 50%; width: var(--w); margin-left: calc(var(--w) / -2); }
.cap { z-index: 4; top: 20px; }
.rail { display: flex; gap: 16px; font: 400 11.5px/1 var(--mono); letter-spacing: .04em; color: var(--faint); text-transform: uppercase; padding-right: 76px; white-space: nowrap; }
.rail span { transition: color var(--snap); }
.rail span { color: var(--mute); }
.rail span.on { color: var(--ink); font-weight: 600; box-shadow: 0 5px 0 -3px var(--o); }
.cap-line { font: 600 clamp(17px, 4.6vw, 22px)/1.25 var(--mono); letter-spacing: -0.03em; color: var(--ink); margin-top: 16px; min-height: 2.5em; max-width: 26ch; }
.tally { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 18px; margin-top: 10px; padding: 10px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule); font: 400 12px/1.3 var(--mono); color: var(--text); background: var(--wash); }
.tally b { font: 500 17px/1 var(--mono); color: var(--ink); margin-right: 2px; font-variant-numeric: tabular-nums; }
.tally .mv, .tally .mv b, .tally .done, .tally .done b { color: var(--ot); }
.tally > span { transition: opacity var(--snap); }
.tally.pre .mv, .tally.pre #tPostWrap { opacity: .25; }
.tally time { margin-left: auto; color: var(--mute); font-variant-numeric: tabular-nums; }

/* The camera is dead centre and still, so type on the cards stays upright rather than slanting. */
.world { position: absolute; inset: 0; perspective: 1100px; perspective-origin: 50% 12%; --m0: 170px; --m1: 232px; -webkit-mask-image: linear-gradient(to bottom, transparent var(--m0), #000 var(--m1)); mask-image: linear-gradient(to bottom, transparent var(--m0), #000 var(--m1)); }
.plane { top: 0; transition: opacity var(--snap) linear; }
.plane.back { opacity: .22; }
.plane.cut { opacity: 0; transition-duration: 140ms; }

/* One card: thumbnail, title over host, value, age. Big enough to read at the front; --f fades the back rows. */
.strip { position: absolute; top: 0; left: 0; width: 100%; height: 58px; transition: transform 320ms cubic-bezier(.2, .8, .2, 1), opacity 160ms linear; }
.strip.dim { opacity: .4; }
.strip.off { opacity: 0; visibility: hidden; transition: transform 320ms cubic-bezier(.2, .8, .2, 1), opacity 90ms linear, visibility 0s 90ms; }
.strip .in { position: relative; height: 100%; display: grid; grid-template-columns: 62px minmax(0, 1fr) auto 30px; align-items: center; gap: 14px; padding: 0 14px 0 8px; background: #fff; border: 1px solid #c9c9c9; font: 400 12px/1 var(--mono); color: var(--mute); opacity: var(--f, 1); transition: opacity 220ms linear; }
.strip.hit .in { border-color: #4a4a4a; }
.strip.new .in { border-color: var(--ink); }
.strip.drop .in { animation: drop 420ms cubic-bezier(.2, .9, .25, 1) both; }
@keyframes drop { from { transform: translateY(-90px) scale(1.05); opacity: 0; } 60% { opacity: 1; } to { transform: none; opacity: 1; } }
.strip .th { width: 62px; height: 40px; border: 1px solid var(--rule); background: #fff; overflow: hidden; display: block; }
.strip .th svg, .strip .th img { display: block; width: 100%; height: 100%; object-fit: cover; }
.strip .th path { fill: none; stroke: var(--ink); stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.strip .th path.f { fill: var(--ink); stroke: none; opacity: .78; }
.strip .th.wait svg { opacity: 0; }
.strip .th svg { transition: opacity 300ms; }
.strip .nm { min-width: 0; display: grid; gap: 6px; }
.strip .n { font: 500 16px/1.15 var(--sans); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.strip .n mark { background: var(--o); color: var(--ink); }
.strip .n.url { font: 400 13.5px/1.15 var(--mono); }
.strip .s { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.strip .s.y { color: var(--ot); font-weight: 500; }
.strip .s.y::before { content: ""; display: inline-block; width: 7px; height: 7px; background: var(--o); margin-right: 6px; }
.strip .v { font: 500 15px/1 var(--mono); color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; display: inline-block; }
.strip .v.flip { animation: flip 110ms linear both; }
@keyframes flip { 0% { transform: rotateX(90deg); opacity: .3; } 100% { transform: none; opacity: 1; } }
.strip .a { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.strip .chg { display: none; height: 28px; padding: 0 10px; margin-right: -4px; font: 500 12.5px/28px var(--mono); white-space: nowrap; background: var(--o); color: var(--ink); animation: chip 160ms ease-out both; }
@keyframes chip { from { opacity: 0; transform: translateX(6px); } }
.strip .chg.q { background: #fff; color: var(--ot); box-shadow: inset 0 0 0 1px var(--o); }
.strip.moved .chg { display: block; }
.strip.moved .a, .strip.moved .v:empty { display: none; }
.strip.moved .in { border-color: var(--o); grid-template-columns: 62px minmax(0, 1fr) auto auto; }
.strip.moved .th path { stroke: var(--ot); }

.bar { z-index: 4; bottom: 20px; height: 46px; display: flex; align-items: center; gap: 10px; padding: 0 14px; background: #fff; border: 1px solid var(--ink); font: 400 13px/1 var(--mono); box-shadow: 6px 6px 0 rgba(17, 17, 17, .08); }
.bar::before { content: ">"; color: var(--ot); font-weight: 600; }
.bar-label { color: var(--faint); white-space: nowrap; }
.bar-label:empty { display: none; }
.bar-text { white-space: nowrap; overflow: hidden; font-weight: 500; color: var(--ink); }
.caret { width: 7px; height: 17px; background: var(--ink); margin-left: -8px; flex: none; animation: blink 1.1s steps(1) infinite; }
.bar-count { margin-left: auto; padding-left: 10px; color: var(--mute); white-space: nowrap; font-variant-numeric: tabular-nums; font-size: 12px; }

.post { z-index: 3; bottom: 80px; background: #fff; border: 1px solid var(--ink); box-shadow: 8px 8px 0 rgba(17, 17, 17, .1); opacity: 0; visibility: hidden; transform: translateY(18px) scaleY(.14); transform-origin: 50% 100%; transition: transform 240ms cubic-bezier(.2, .85, .2, 1), opacity 100ms linear, visibility 0s 240ms; }
.post.open { opacity: 1; visibility: visible; transform: none; transition: transform 240ms cubic-bezier(.2, .85, .2, 1), opacity 100ms linear; }
.post-in { opacity: 0; transition: opacity 120ms linear; }
.post.open .post-in { opacity: 1; transition: opacity 200ms linear 140ms; }
.post-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; height: 34px; padding: 0 12px; border-bottom: 1px solid var(--rule); font: 400 11px/1 var(--mono); color: var(--mute); white-space: nowrap; overflow: hidden; }
.post-head b { color: var(--ink); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.chart-wrap { position: relative; height: 124px; overflow: hidden; border-bottom: 1px solid var(--rule); }
.chart { display: block; width: 100%; height: 100%; }
.chart .grid { stroke: #ececec; stroke-width: 1; vector-effect: non-scaling-stroke; fill: none; }
.chart .line { fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.cover { position: absolute; inset: 0; background: #fff; transform: translateX(0); }
.post.draw .cover { transform: translateX(101%); transition: transform 1100ms cubic-bezier(.35, .1, .25, 1); }
.lbl { position: absolute; font: 400 11px/1.35 var(--mono); color: var(--ink); opacity: 0; transition: opacity var(--snap); }
.lbl i { font-style: normal; color: var(--mute); }
.lbl.l1 { left: 12px; top: 62px; }
.lbl.l2 { right: 12px; top: 38px; text-align: right; }
.lbl.l2 b { font-weight: 600; background: var(--o); padding: 1px 5px; }
.dot { position: absolute; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; background: var(--o); border: 1px solid var(--ink); opacity: 0; transition: opacity var(--snap); }
.post.draw .lbl.l1 { opacity: 1; transition-delay: 200ms; }
.post.draw .lbl.l2, .post.draw .dot { opacity: 1; transition-delay: 1000ms; }
.post-cap { padding: 12px 14px 0; font: 400 14.5px/1.45 var(--sans); color: var(--ink); min-height: 76px; }
.post-link { padding: 4px 14px 12px; font: 400 11.5px/1.3 var(--mono); color: var(--ot); }
.post-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; height: 46px; padding: 0 8px 0 14px; border-top: 1px solid var(--rule); font: 400 11.5px/1 var(--mono); color: var(--mute); white-space: nowrap; }
.post-foot .to i { font-style: normal; color: var(--ink); margin-left: 12px; }
.post-foot .to i::before { content: ""; display: inline-block; width: 7px; height: 7px; background: var(--ink); margin-right: 5px; }
.send { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; background: var(--ink); color: #fff; font-weight: 500; border: 1px solid var(--ink); transition: transform 90ms, background 120ms, color 120ms; }
.send.press { transform: scale(.94); }
.send.done { background: var(--o); color: var(--ink); }
.send.done svg { display: none; }

.stage.paused .caret { animation-play-state: paused; }

@media (max-width: 460px) {
  .strip .in { grid-template-columns: 50px minmax(0, 1fr) auto; gap: 10px; padding-right: 10px; }
  .strip.moved .in { grid-template-columns: 50px minmax(0, 1fr) auto auto; }
  .strip .th { width: 50px; height: 34px; }
  .strip .n { font-size: 14.5px; }
  .strip .v { font-size: 13px; }
  .strip .a, .strip .chg .x, .tally .x, .rail .w { display: none; }
  .strip .chg { padding: 0 7px; font-size: 12px; }
  .tally { gap: 4px 13px; font-size: 11.5px; }
  .tally b { font-size: 15px; }
  .rail { gap: 12px; font-size: 10.5px; }
  .post-foot .to i { margin-left: 8px; }
  .post-cap { min-height: 74px; }
}

/* ---------- desktop: the log scrolls, the deck stays ---------- */

@media (min-width: 1000px) {
  :root { --pad: 40px; }
  .page { display: grid; grid-template-columns: minmax(0, 1.28fr) minmax(0, 1fr); }
  .log, main { display: block; }
  .log { min-width: 0; }
  .top { padding: 28px 44px 0 var(--pad); }
  .row { display: grid; grid-template-columns: 88px minmax(0, 1fr); padding: 0 44px 0 var(--pad); }
  .row .m { display: block; padding: 0; border-right: 1px solid var(--rule); }
  .row .mi { display: block; position: sticky; top: 0; padding: 45px 0 20px; }
  .row .mi > span { display: block; }
  .row .m .no::after { content: none; }
  .row .c { padding: 44px 0 54px 34px; border-bottom: 0; }
  .row + .row .c, .foot .c { box-shadow: inset 0 1px 0 var(--rule); }
  .hero .mi { position: static; padding-top: 51px; }
  .hero .c { padding-top: 50px; padding-bottom: 50px; }
  pre { font-size: 13.5px; }
  .foot .c { padding-top: 34px; padding-bottom: 64px; }

  .stage-wrap { border-left: 1px solid var(--ink); }
  .stage { position: sticky; top: 0; height: 100vh; min-height: 560px; border: 0; --w: min(540px, calc(100% - 64px)); }
  .cap { top: 32px; }
  .pause { top: 26px; right: calc((100% - var(--w)) / 2 - 6px); }
  .bar { bottom: 34px; }
  .post { bottom: 96px; }
  .chart-wrap { height: 176px; }
  .lbl.l1 { top: 100px; }
  .lbl.l2 { top: 52px; }
  .world { --m0: 172px; --m1: 236px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .stage * { animation: none !important; transition: none !important; }
  .pause { display: none; }
}
