/* DataDeck site, version 4. The app's look: white, ink, grey 1px rules, Plex Mono + Plex Sans, one orange. */
@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; }
@font-face { font-family: "Plex Sans"; src: url(../fonts/ibm-plex-sans-600.woff2) format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --ink: #111111;
  --text: #333333;
  --mute: #6f6f6f;
  --faint: #a3a3a3;
  --rule: #dedede;
  --wash: #f6f6f4;
  --o: #fb923c;        /* fill, with ink text */
  --ot: #ea580c;       /* accent text and marks */
  --ow: #fff7ed;       /* selected wash */
  --sans: "Plex Sans", -apple-system, "Helvetica Neue", sans-serif;
  --mono: "Plex Mono", ui-monospace, Menlo, monospace;
  --pad: 20px;
  --bar: 60px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { background: #fff; color: var(--text); font: 400 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration-color: var(--faint); text-decoration-thickness: 1px; text-underline-offset: 4px; }
a:hover { text-decoration-color: var(--ot); }
:focus-visible { outline: 2px solid var(--ot); outline-offset: 3px; }
ul, ol { list-style: none; padding: 0; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
section[id] { scroll-margin-top: 24px; }

/* ---------- top bar ---------- */
.top { height: var(--bar); padding: 0 var(--pad); display: flex; align-items: center; justify-content: space-between; gap: 16px; font: 400 13px/1 var(--mono); }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 600 15px/1 var(--mono); color: var(--ink); text-decoration: none; }
.brand img { width: 24px; height: 18px; image-rendering: pixelated; }
.top nav { display: flex; gap: 26px; color: var(--mute); }
.top nav a { text-decoration: none; white-space: nowrap; }
.top nav a:hover { color: var(--ink); }

/* ---------- hero: one plate, one block of words ---------- */
.hero { padding: 8px var(--pad) 0; display: grid; gap: 28px; }
h1 { font: 600 clamp(31px, 9.2vw, 40px)/1.1 var(--sans); letter-spacing: -0.028em; color: var(--ink); }
h1 span { display: block; white-space: nowrap; }
.standfirst { margin-top: 20px; font-size: 16.5px; line-height: 1.55; max-width: 25em; }
.cta { margin-top: 26px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.btn { display: inline-block; background: var(--ink); color: #fff; font: 500 13.5px/1 var(--mono); padding: 14px 18px; text-decoration: none; transition: background 120ms, color 120ms; }
.btn:hover { background: var(--o); color: var(--ink); }
.fine { font: 400 12.5px/1.5 var(--mono); color: var(--mute); }

.plate { position: relative; aspect-ratio: 5 / 4; background: var(--wash); outline: 1px solid var(--ink); outline-offset: -1px; overflow: hidden; }
.plate img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1400ms ease-in-out; }
.plate img.on { opacity: 1; }
.plate::after { content: ""; position: absolute; inset: 0; border: 1px solid var(--ink); pointer-events: none; }

.note { display: grid; gap: 14px; }
.caps { display: grid; }
.caps li { grid-area: 1 / 1; font: 400 12.5px/1.6 var(--mono); color: var(--mute); max-width: 34em; opacity: 0; visibility: hidden; transition: opacity 700ms ease-in-out, visibility 0s 700ms; }
.caps li.on { opacity: 1; visibility: visible; transition: opacity 700ms ease-in-out 300ms; }
.caps b { display: block; font-weight: 500; color: var(--ink); }
.caps i { font-style: normal; color: var(--faint); }
.ticks { display: flex; gap: 6px; margin-left: -3px; }
.ticks button { appearance: none; border: 0; background: none; padding: 10px 3px; cursor: pointer; }
.ticks button::before { content: ""; display: block; width: 22px; height: 2px; background: var(--rule); transition: background 200ms; }
.ticks button:hover::before { background: var(--mute); }
.ticks button[aria-current="true"]::before { background: var(--ot); }

/* ---------- the one sentence of history ---------- */
.link { padding: 72px var(--pad) 64px; font: 400 clamp(25px, 3vw, 38px)/1.25 var(--sans); letter-spacing: -0.018em; color: var(--faint); max-width: 24em; text-wrap: balance; }
.link span { color: var(--ink); }

/* ---------- product: words left, one picture right ---------- */
.product { padding: 0 var(--pad); }
.row { padding: 44px 0; display: grid; gap: 28px; }
.tag { font: 500 12.5px/1 var(--mono); color: var(--ink); }
.tag i { font-style: normal; font-weight: 400; color: var(--faint); margin-right: 8px; }
h2 { font: 600 clamp(24px, 2.3vw, 30px)/1.16 var(--sans); letter-spacing: -0.022em; color: var(--ink); margin-top: 16px; max-width: 17em; text-wrap: balance; }
.words p:not(.tag) { margin-top: 14px; max-width: 27em; }
.words .aside { font: 400 12.5px/1.6 var(--mono); color: var(--mute); }
.words .aside span { color: var(--ink); }

/* The pictures: pieces of the app, in the app's own look. */
.fig { width: 100%; max-width: 600px; min-width: 0; background: #fff; border: 1px solid #cfcfcf; font: 400 12px/1.3 var(--mono); color: var(--mute); overflow: hidden; }
.fig h3 { font: 500 14px/1.25 var(--sans); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fig sub { font-size: .72em; line-height: 0; }
.fig .ml { margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fig .ml b { font-weight: 500; color: var(--ink); }
.fig .r { margin-left: auto; }
.th { display: block; border: 1px solid var(--rule); background: #fff; }
.th svg { display: block; width: 100%; height: 100%; }
.fig svg path { fill: none; stroke: var(--ink); stroke-width: 1.2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.fig svg path.f { fill: #2a2a2a; stroke: none; }
.fig svg path.d { stroke-dasharray: 2 3; stroke: var(--mute); }
.fig svg path.o { fill: var(--ot); stroke: none; }

.f-bar { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-bottom: 1px solid var(--ink); }
.field { flex: 1; min-width: 0; height: 36px; display: flex; align-items: center; padding: 0 11px; background: var(--wash); border: 1px solid var(--rule); border-radius: 0; font: 400 13px/1 var(--mono); color: var(--ink); white-space: nowrap; overflow: hidden; }
.field .ph { color: var(--faint); overflow: hidden; text-overflow: ellipsis; }
.hint { flex: none; font-size: 11.5px; white-space: nowrap; }
.hint b { font-weight: 500; color: var(--ink); }
.tally { display: flex; align-items: baseline; gap: 20px; padding: 13px 14px 12px; border-bottom: 1px solid var(--rule); white-space: nowrap; }
.tally b { font: 500 18px/1 var(--mono); color: var(--ink); margin-right: 3px; }
.tally .mv, .tally .mv b { color: var(--ot); }
.tally .r { font-size: 11.5px; }

/* Collect: a link becomes a card at the top of the list */
.collect .ph, .collect .hint, .collect .caret { display: none; }
.collect .caret { width: 1px; height: 16px; background: var(--ink); margin-left: 1px; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.collect.typing .field { background: #fff; border-color: var(--ink); }
.collect.typing .caret { display: block; }
.collect.typing .hint { display: block; }
.collect.empty .ph { display: block; }
.found { height: 294px; overflow: hidden; }
.found li { position: relative; height: 98px; display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px; padding: 14px 14px 0; border-bottom: 1px solid var(--rule); transition: transform 520ms var(--ease), opacity 320ms linear, background 600ms; }
.found .th { width: 96px; height: 62px; padding: 5px; }
.found .files { margin-top: 5px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.found u { text-decoration-color: var(--faint); text-underline-offset: 3px; margin-right: 8px; }
.found .nt { margin-top: 5px; font: 400 13px/1.3 var(--sans); color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.found .new { background: var(--ow); }
.found .new::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--o); }
.collect.before .found li { transform: translateY(-98px); }
.collect.before .found .new { opacity: 0; }
.collect.snap .found li { transition: none; }

/* Moved: the Wall, with what changed overnight */
.wall { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0 -1px -1px 0; }
.cell { position: relative; padding: 12px 12px 13px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); min-width: 0; }
.cell .th { height: 84px; margin-bottom: 11px; padding: 6px; }
.chg { margin-top: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chg b { font-weight: 500; color: var(--ink); }
.chg span { color: var(--ot); margin-left: 4px; }
.chg.q span { margin-left: 0; }
.chg.same { color: var(--faint); }
.cell.mvd { background: var(--ow); transition: background 500ms calc(var(--d, 0) * 260ms + 400ms); }
.cell.mvd .chg span { transition: opacity 400ms calc(var(--d, 0) * 260ms + 400ms); }
.moved.before .cell.mvd { background: #fff; transition: none; }
.moved.before .cell.mvd .chg span { opacity: 0; transition: none; }
.val { display: inline-block; }
.val.roll { animation: roll 150ms linear both; }
@keyframes roll { from { transform: translateY(-5px); opacity: 0; } to { transform: none; opacity: 1; } }
.moved .cell:nth-child(n+5) { display: none; }

/* Share: the drafted post */
.fig.post { max-width: 480px; }
.f-head { display: flex; align-items: baseline; gap: 10px; padding: 13px 14px 11px; border-bottom: 1px solid var(--rule); }
.f-head b { font: 600 14px/1 var(--sans); color: var(--ink); }
.f-head .r { color: var(--ot); font-size: 11.5px; }
.post .chart { position: relative; height: 132px; margin: 14px 14px 0; border: 1px solid var(--rule); }
.post .chart svg { display: block; width: 100%; height: 100%; }
.post .chart path.g { stroke: #ededed; }
.lbl { position: absolute; font: 400 11px/1.35 var(--mono); color: var(--ink); }
.lbl i { font-style: normal; color: var(--mute); }
.lbl.l1 { left: 12px; top: 62px; }
.lbl.l2 { right: 22px; top: 40px; text-align: right; }
.lbl.l2 b { font-weight: 500; color: var(--ot); }
.tabs { display: flex; gap: 20px; margin: 6px 14px 0; border-bottom: 1px solid var(--rule); font: 400 13px/34px var(--sans); }
.tabs .on { color: var(--ink); font-weight: 500; box-shadow: 0 2px 0 var(--o); }
.cap { margin: 14px 14px 0; padding: 11px 13px; border: 1px solid var(--ink); font: 400 14px/1.5 var(--sans); color: var(--ink); }
.cap span { color: var(--ot); }
.f-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px; font-size: 11.5px; white-space: nowrap; }
.send { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 16px; background: var(--o); color: var(--ink); font: 500 13px/1 var(--sans); }
.send i { font: 400 11px/1 var(--mono); font-style: normal; opacity: .7; }

/* Fast: a box you can type in */
.fast input.field { appearance: none; outline-offset: 0; background: #fff; border-color: var(--ink); }
.rows { height: 204px; overflow: hidden; }
.rows li { height: 34px; display: grid; grid-template-columns: minmax(0, 1fr) auto 28px; align-items: center; gap: 12px; padding: 0 14px; border-bottom: 1px solid var(--rule); white-space: nowrap; }
.rows .t { font: 500 14px/1 var(--sans); color: var(--ink); overflow: hidden; text-overflow: ellipsis; }
.rows mark { background: #fed7aa; color: inherit; }
.rows .a { text-align: right; }
.rows .none { display: block; padding: 0 14px; line-height: 34px; border: 0; color: var(--faint); }

/* Yours: the card beside its file */
.pair { display: grid; }
.pair .cell { border-right: 0; }
.pair pre { margin: 0; padding: 14px 16px 16px; background: var(--wash); font: 400 12px/1.75 var(--mono); color: var(--ink); white-space: pre; overflow: hidden; }
.pair pre i { font-style: normal; color: var(--mute); }
.pair pre .fn { color: var(--mute); display: inline-block; margin-bottom: 4px; }

/* ---------- close ---------- */
.close { padding: 80px var(--pad) 72px; display: grid; gap: 40px; }
.close figure img { width: 100%; height: auto; filter: grayscale(1); }
.close figcaption { margin-top: 12px; font: 400 12.5px/1.6 var(--mono); color: var(--mute); max-width: 34em; }
.close figcaption b { display: block; font-weight: 500; color: var(--ink); }
.get h2 { margin-top: 0; }
.dl { margin-top: 24px; border-top: 1px solid var(--ink); max-width: 440px; }
.dl a { display: grid; grid-template-columns: 96px 1fr auto; align-items: baseline; gap: 12px; padding: 15px 10px 15px 0; border-bottom: 1px solid var(--rule); text-decoration: none; font: 400 12.5px/1.2 var(--mono); color: var(--mute); transition: background 120ms, padding 160ms var(--ease); }
.dl a b { font: 500 16px/1.2 var(--sans); color: var(--ink); }
.dl a i { font-style: normal; color: var(--faint); }
.dl a:hover { background: var(--ow); padding-left: 10px; }
.dl a:hover i { color: var(--ot); }
.get .fine { margin-top: 16px; }

footer { margin: 0 var(--pad); padding: 22px 0 40px; border-top: 1px solid var(--rule); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 32px; font: 400 12.5px/1.7 var(--mono); color: var(--mute); }
footer a, footer span { margin-right: 20px; white-space: nowrap; }
footer p:last-child a { margin: 0 0 0 14px; }

/* ---------- small screens ---------- */
@media (max-width: 560px) {
  .top nav a:not(:last-child) { display: none; }
  .field { font-size: 12px; }
  .tally { gap: 14px; }
  .tally .r, .tally span:nth-child(3) { display: none; }
  .found li { grid-template-columns: 72px minmax(0, 1fr); gap: 12px; padding: 14px 12px 0; }
  .found .th { width: 72px; height: 50px; }
  .rows li { grid-template-columns: minmax(0, 1fr) 28px; }
  .rows .h { display: none; }
  .cell .chg { white-space: normal; }
  .cell .chg span { display: block; margin: 4px 0 0; }
  .cell .chg.q span { margin-top: 0; }
}

/* ---------- desktop ---------- */
@media (min-width: 960px) {
  :root { --pad: 40px; --bar: 64px; }
  .hero { padding-top: 0; height: calc(100vh - var(--bar) - 40px); min-height: 580px; max-height: 1040px; grid-template-columns: minmax(0, 1fr) clamp(340px, 29vw, 420px); grid-template-rows: 1fr auto; gap: 0 56px; }
  .plate { grid-column: 1; grid-row: 1 / span 2; aspect-ratio: auto; }
  .lede { grid-column: 2; grid-row: 1; padding-top: 6px; }
  .note { grid-column: 2; grid-row: 2; gap: 10px; }
  .caps li { max-width: none; }
  h1 { font-size: clamp(34px, 2.9vw, 42px); }
  .standfirst { margin-top: 22px; }

  .link { padding: 150px var(--pad) 90px; }

  .row { grid-template-columns: minmax(0, .8fr) minmax(0, 1fr); column-gap: 72px; align-items: center; padding: 90px 0; }
  .fig { justify-self: center; }
  .moved .wall { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .moved .cell:nth-child(n+5) { display: block; }
  .pair { grid-template-columns: 200px minmax(0, 1fr); }
  .pair .cell { border-right: 1px solid var(--rule); border-bottom: 0; }

  .close { padding: 130px var(--pad) 120px; grid-template-columns: minmax(0, .8fr) minmax(0, 1fr); column-gap: 72px; align-items: start; }
  .close .get { order: -1; }
  .close figure { max-width: 600px; justify-self: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0s !important; transition-delay: 0s !important; animation: none !important; }
}
