/* Landing: the corner of words and the full-bleed map (design draft B, on the production stack). */
/* ---------- work area: the map fills it edge to edge ---------- */
.work { position: fixed; top: var(--tick); left: var(--rail); right: 0; bottom: 0; }
#map { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: manipulation; outline: none; }
#map:focus-visible { box-shadow: inset 0 0 0 2px var(--ink); }

/* ---------- the corner: the only words, in one corner ---------- */
.corner { position: absolute; z-index: 5; left: 0; top: 0; width: var(--corner); padding: 22px 24px 18px; display: flex; flex-direction: column; gap: 14px; background: var(--bg); }
html.js .corner > * { opacity: 0; transform: translateY(8px); animation: rise 700ms var(--ease-out) forwards; }
html.js .corner > :nth-child(2) { animation-delay: 90ms; } html.js .corner > :nth-child(3), html.js .corner > :nth-child(4) { animation-delay: 180ms; } html.js .corner > :nth-child(n+5) { animation-delay: 270ms; }
@keyframes rise { to { opacity: 1; transform: none; } }
h1 { margin: 0; font: 900 64px/.9 var(--f-head); letter-spacing: -.045em; display: flex; align-items: baseline; gap: 12px; }
h1 small { font: 700 16px/1 var(--f-head); letter-spacing: 0; background: var(--ink); color: #000; padding: 5px 7px 4px; border-radius: 4px; transform: translateY(-6px); }
.line { margin: 0; font: 500 20px/1.25 var(--f-head); letter-spacing: -.01em; max-width: 30ch; }
.status { display: flex; align-items: flex-start; gap: 10px; margin: 0; color: var(--ink-2); font-size: 16px; line-height: 1.35; }
.status.open { flex-direction: column; gap: 10px; }
.status.open p { margin: 0; }
.status .stamp.live { background: var(--ink); color: #000; }
.status .row { display: flex; align-items: flex-start; gap: 10px; }
.status a.btn { height: 48px; padding: 0 20px 0 22px; border-radius: 24px; font-size: 15px; align-self: flex-start; }
.read { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.read label { font-size: 13px; color: var(--ink-2); }
.read.is-focus label { color: var(--ink); }
.read.is-wrong .field input { animation: shake 280ms var(--ease-press); }
/* the read's progress: a thin purple bar under the field, scaled (never resized) once the transactions are counted */
.prog { position: relative; height: 3px; margin: 2px 22px 0; border-radius: 2px; background: var(--line); overflow: hidden; opacity: 0; transition: opacity 200ms var(--ease-press); }
.prog.on { opacity: 1; }
.prog i { position: absolute; inset: 0; background: var(--purple); transform: scaleX(var(--p, 0)); transform-origin: left; transition: transform 320ms var(--ease-out); }
/* before the transactions are counted: the whole track breathes, since there is no fraction to show yet */
.prog.wait i { transform: scaleX(1); animation: breathe 1.1s var(--ease-press) infinite alternate; }
@keyframes breathe { from { opacity: .2; } to { opacity: .9; } }
.msg .stop { display: inline-flex; align-items: center; min-height: 44px; margin: -12px 0 -12px 6px; padding: 0 8px; border: 0; background: transparent; color: var(--ink); font-size: 13px;
  text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); cursor: pointer; }
.msg .stop:hover { text-decoration-color: var(--ink); }
.src { margin: 0; font-size: 13px; line-height: 1.5; color: var(--ink-2); }
.src .mono { color: var(--ink); }
.src b { color: var(--ink); font-weight: 600; }
.again { align-self: flex-start; border: 1px solid var(--line-2); background: transparent; border-radius: 22px; height: 44px; padding: 0 16px; cursor: pointer; font-size: 13px;
  transition: background-color 160ms var(--ease-press), transform 150ms var(--ease-press); }
.again:hover { background: var(--raised-2); } .again:active { transform: scale(.97); }
.again[hidden] { display: none; }
.work .site-foot { display: none; }

@media (min-width: 760px) and (max-height: 860px) {
  .corner { gap: 10px; padding-top: 18px; }
  h1 { font-size: 52px; }
  .line { font-size: 18px; }
  .legend { gap: 6px 12px; padding-top: 10px; }
}
@media (min-width: 760px) and (max-height: 700px) {
  .corner { gap: 8px; padding-top: 14px; padding-bottom: 12px; }
  h1 { font-size: 44px; }
  .line { font-size: 16px; }
  .status { font-size: 15px; }
  .field input { height: 48px; } .go.round { width: 48px; height: 48px; }
}
/* ---------- phone ---------- */
@media (max-width: 759px) {
  .work { position: relative; top: 0; left: 0; display: flex; flex-direction: column; gap: 12px; padding-bottom: 24px; }
  /* on a phone the map comes straight after the paste box; the source and legend follow it */
  .corner { display: contents; }
  .corner > * { margin-left: 16px; margin-right: 16px; }
  #title { order: 1; margin-top: 18px; } .line { order: 2; } .status { order: 3; } .read { order: 4; }
  #map { order: 5; } .src { order: 6; } .again { order: 7; } .legend { order: 8; }
  .work .site-foot { display: flex; order: 9; margin: 6px 16px 0; }
  h1 { font-size: 48px; }
  .line { font-size: 18px; }
  .legend { grid-template-columns: 1fr 1fr; }
  #map { position: relative; height: max(520px, calc(100svh - 96px)); }
}
@media (prefers-reduced-motion: reduce) {
  html.js .corner > * { animation: none; opacity: 1; transform: none; }
  .prog.wait i { animation: none; opacity: .5; }
}
