/* Notes, screen 5, always know your next move. Drawn at 1440 x 1020: two stacked rounded
   cards behind (mist 1220 x 680 at 110, 390; lilac at 50, 340), running off the foot; the
   headline 96 down; the note 680 x 660 at 100, 300; its template 380 wide at 840, 360. */
.nx-back { position: absolute; width: calc(1220 * var(--u)); height: calc(680 * var(--u)); border-radius: calc(72 * var(--u)); pointer-events: none; }
.nx-back-mist { left: calc(50% - 610 * var(--u)); top: calc(390 * var(--u)); background: var(--mist); }
.nx-back-lilac { left: calc(50% - 670 * var(--u)); top: calc(340 * var(--u)); background: var(--lilac); }
.nx-frame { position: relative; width: calc(1440 * var(--u)); height: calc(1020 * var(--u)); margin: 0 auto; }
.nx-copy { position: absolute; left: calc(80 * var(--u)); top: calc(96 * var(--u)); }
.nx-h { font-size: calc(84 * var(--u)); line-height: 1; font-weight: 800; letter-spacing: -0.04em; white-space: nowrap; }
.nx-mid { margin: calc(20 * var(--u)) 0 0 calc(4 * var(--u)); font-size: max(17px, calc(26 * var(--u))); line-height: 1.45; font-weight: 700; letter-spacing: -0.015em; color: var(--body); }
.nx-try { color: var(--breakout); }

.nt-next button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; }
.nt-next button:focus-visible { outline: 3px solid var(--breakout); outline-offset: 3px; }

/* The note: its name and length, the ways it can be made, what is happening, the sections. */
.nx-note { position: absolute; left: calc(100 * var(--u)); top: calc(300 * var(--u)); width: calc(680 * var(--u)); height: calc(660 * var(--u)); padding: calc(26 * var(--u)) calc(28 * var(--u)); border-radius: calc(22 * var(--u)); background: var(--cream); box-shadow: inset 0 0 0 3px var(--ink); }
.nx-top { display: flex; align-items: baseline; justify-content: space-between; }
.nx-title { font-size: calc(22 * var(--u)); font-weight: 800; letter-spacing: -0.01em; color: var(--ink); }
.nx-len { font-size: calc(15 * var(--u)); font-weight: 700; color: var(--body); }
.nx-picks { display: flex; flex-wrap: wrap; gap: calc(8 * var(--u)); margin-top: calc(16 * var(--u)); }
.nt-next .nx-pick { position: relative; display: inline-flex; align-items: center; height: max(38px, calc(42 * var(--u))); padding: 0 calc(18 * var(--u)); border-radius: 999px; background: var(--cream); color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); font-size: max(14px, calc(16 * var(--u))); font-weight: 700; white-space: nowrap; }
.nt-next .nx-pick.is-star { background: var(--lilac); color: var(--plum); box-shadow: inset 0 0 0 2px var(--plum); }
.nt-next .nx-pick[aria-pressed="true"] { background: var(--ink); color: var(--cream); }
.nt-next .nx-pick.is-star[aria-pressed="true"] { background: var(--plum); }
.nx-status { display: flex; align-items: center; min-height: calc(22 * var(--u)); margin-top: calc(12 * var(--u)); font-size: max(13px, calc(14 * var(--u))); font-weight: 700; color: var(--plum); }
.nx-sec { margin-top: calc(14 * var(--u)); }
.nx-sec-h { display: inline-block; margin-left: calc(-6 * var(--u)); padding: calc(2 * var(--u)) calc(6 * var(--u)); border-radius: calc(6 * var(--u)); font-size: calc(16 * var(--u)); line-height: 1.3; font-weight: 800; color: var(--ink); }
.nx-sec.is-moved .nx-sec-h { background: var(--iris); }
.nx-row { display: flex; align-items: center; gap: calc(8 * var(--u)); min-height: calc(22 * var(--u)); margin-top: calc(8 * var(--u)); font-size: calc(16 * var(--u)); line-height: 1.3; font-weight: 600; color: var(--body); white-space: nowrap; }
.nx-row .nx-tick { width: calc(16 * var(--u)); height: calc(16 * var(--u)); }
.nx-row .nx-face { width: calc(20 * var(--u)); height: calc(20 * var(--u)); }

/* Improve the template, centred at the note's foot, with quake lines that show as it shakes. */
.nx-act { position: absolute; left: 0; right: 0; bottom: calc(36 * var(--u)); display: flex; justify-content: center; }
.nx-shake { position: relative; display: inline-flex; }
.nx-quake { position: absolute; top: 0; width: calc(16 * var(--u)); height: calc(46 * var(--u)); stroke: var(--ink); opacity: 0; }
.nx-quake-l { left: calc(-18 * var(--u)); }
.nx-quake-r { right: calc(-18 * var(--u)); }
.nt-next .nx-improve { display: inline-flex; align-items: center; height: max(44px, calc(46 * var(--u))); padding: 0 calc(24 * var(--u)); border-radius: 999px; background: var(--orange); color: var(--ink); font-size: max(15px, calc(16 * var(--u))); font-weight: 800; white-space: nowrap; }
.nx-note.is-making .nx-act, .nx-note.is-done .nx-act { display: none; }
html:not(.js) .nx-act { display: none; }

/* What was wrong? Over the note's foot. */
.nx-wrong { position: absolute; left: calc(16 * var(--u)); right: calc(16 * var(--u)); bottom: calc(16 * var(--u)); padding: calc(18 * var(--u)); border-radius: calc(16 * var(--u)); background: var(--cream); box-shadow: inset 0 0 0 2px var(--ink), 0 -12px 24px rgba(18, 26, 43, 0.08); }
.nx-wrong[hidden] { display: none; }
.nx-wrong-t { font-size: max(15px, calc(16 * var(--u))); font-weight: 800; color: var(--ink); }
.nx-complaint { margin-top: calc(10 * var(--u)); padding: calc(10 * var(--u)) calc(12 * var(--u)); border-radius: calc(10 * var(--u)); box-shadow: inset 0 0 0 2px var(--iris); font-size: max(14px, calc(15 * var(--u))); font-weight: 600; color: var(--ink); }
.nx-wrong-act { display: flex; justify-content: flex-end; margin-top: calc(12 * var(--u)); }
.nt-next .nx-fix { display: inline-flex; align-items: center; height: max(40px, calc(40 * var(--u))); padding: 0 calc(20 * var(--u)); border-radius: 999px; background: var(--ink); color: var(--cream); font-size: max(14px, calc(15 * var(--u))); font-weight: 700; }

/* The template: its name, and the few words it is; while it is made, its headings arriving. */
.nx-sheet { position: absolute; left: calc(840 * var(--u)); top: calc(360 * var(--u)); width: calc(380 * var(--u)); padding: calc(24 * var(--u)); border-radius: calc(22 * var(--u)); background: var(--cream); box-shadow: inset 0 0 0 3px var(--ink); }
.nx-sheet-t { font-size: calc(20 * var(--u)); font-weight: 800; letter-spacing: -0.01em; color: var(--ink); }
.nx-lab { margin-top: calc(16 * var(--u)); font-size: max(12px, calc(13 * var(--u))); font-weight: 700; color: var(--body); }
.nx-sheet-t + .nx-lab { margin-top: calc(18 * var(--u)); }
.nx-field { display: flex; align-items: center; height: calc(40 * var(--u)); margin-top: calc(6 * var(--u)); padding: 0 calc(12 * var(--u)); border-radius: calc(10 * var(--u)); box-shadow: inset 0 0 0 2px var(--iris); font-size: calc(16 * var(--u)); font-weight: 700; color: var(--ink); }
.nx-words-box { min-height: calc(120 * var(--u)); margin-top: calc(6 * var(--u)); padding: calc(12 * var(--u)); border-radius: calc(10 * var(--u)); box-shadow: inset 0 0 0 2px var(--iris); font-size: calc(16 * var(--u)); line-height: 1.45; font-weight: 600; color: var(--ink); }
.nx-words.is-own { color: var(--body); }
.nx-making[hidden], .nx-words[hidden] { display: none; }
.nx-making-t { margin-bottom: calc(8 * var(--u)); font-size: calc(13 * var(--u)); font-weight: 800; color: var(--plum); }
.nx-writing { display: grid; gap: calc(4 * var(--u)); }
.nx-writing p { font-size: calc(15 * var(--u)); font-weight: 800; }

/* While a shape is made the note shows faint; once made it comes in. */
.nx-note.is-making .nx-body { opacity: 0.25; }

@media (max-width: 1023.98px) {
  .nx-frame { width: auto; height: auto; padding: 64px var(--m) 72px; }
  .nx-copy, .nx-note, .nx-sheet { position: relative; left: auto; top: auto; }
  .nx-h { font-size: var(--fs-l); white-space: normal; text-wrap: balance; }
  .nx-mid { margin: 14px 0 0; font-size: 18px; }
  .nx-note { width: auto; height: auto; margin-top: 28px; padding: 20px 16px 22px; border-radius: 20px; }
  .nx-title { font-size: 18px; }
  .nx-len { font-size: 14px; }
  .nx-picks { gap: 6px; margin-top: 12px; }
  .nt-next .nx-pick { height: 38px; padding: 0 13px; font-size: 14px; }
  .nx-status { min-height: 20px; margin-top: 8px; font-size: 13px; }
  .nx-sec { margin-top: 12px; }
  .nx-sec-h { margin-left: -5px; padding: 1px 5px; font-size: 15px; }
  .nx-row { align-items: flex-start; gap: 8px; margin-top: 6px; font-size: 15px; white-space: normal; }
  .nx-row .nx-tick { width: 16px; height: 16px; margin-top: 2px; }
  .nx-row .nx-face { width: 20px; height: 20px; }
  .nx-act { position: static; margin-top: 22px; }
  .nx-quake { width: 14px; height: 44px; }
  .nx-quake-l { left: -17px; } .nx-quake-r { right: -17px; }
  .nx-wrong { position: static; margin-top: 18px; padding: 16px; }
  .nx-complaint { margin-top: 8px; padding: 9px 11px; }
  .nx-wrong-act { margin-top: 10px; }
  .nx-sheet { width: auto; margin-top: 16px; padding: 20px 18px; border-radius: 20px; }
  .nx-sheet-t { font-size: 17px; }
  .nx-lab, .nx-sheet-t + .nx-lab { margin-top: 12px; font-size: 12px; }
  .nx-field { height: 38px; padding: 0 10px; font-size: 15px; }
  .nx-words-box { min-height: 0; padding: 10px; font-size: 15px; }
  .nx-making-t { font-size: 12px; }
  .nx-writing p { font-size: 14px; }
  .nx-back { width: 120vw; height: 70%; border-radius: 48px; }
  .nx-back-mist { left: -6vw; top: 34%; }
  .nx-back-lilac { left: -14vw; top: 30%; }
}

/* ---------------------------------------------------------------- motion
   js/pages/notes/next.js drives the note: a shape made comes in over 0.4 s (.is-fresh);
   Improve the template pops in (.is-pop) and shakes twice (.is-shake, the home page's 4x
   quake), the made headings arrive on the sheet; a press by the demo's dot on a chip. */
.motion .nx-note.is-fresh .nx-body { animation: nt-in 0.4s linear both; }
.motion .nx-shake.is-pop { animation: nx-pop 0.26s linear both; }
.motion .nx-shake.is-shake { animation: nx-shake 0.45s linear both; }
.motion .nx-shake.is-shake .nx-quake { animation: nx-quake 0.45s linear both; }
.motion .nx-press.is-pressing { animation: nt-press 0.7s linear both; }
.motion .nx-writing p { animation: nt-in calc(0.8s / var(--n)) linear calc(var(--i) * 0.8s / var(--n)) both; }
@keyframes nx-pop { from { scale: 0; } to { scale: 1.15; } }
@keyframes nx-shake {
  0% { translate: calc(0.00 * var(--u)) 0; rotate: 0.00deg; scale: 1.140; }
  3.33% { translate: calc(2.84 * var(--u)) 0; rotate: 6.72deg; scale: 1.135; }
  6.67% { translate: calc(1.13 * var(--u)) 0; rotate: 8.24deg; scale: 1.131; }
  10% { translate: calc(-2.20 * var(--u)) 0; rotate: 3.84deg; scale: 1.126; }
  13.33% { translate: calc(-1.92 * var(--u)) 0; rotate: -2.95deg; scale: 1.121; }
  16.67% { translate: calc(1.27 * var(--u)) 0; rotate: -7.16deg; scale: 1.117; }
  20% { translate: calc(2.27 * var(--u)) 0; rotate: -6.02deg; scale: 1.112; }
  23.33% { translate: calc(-0.28 * var(--u)) 0; rotate: -0.73deg; scale: 1.107; }
  26.67% { translate: calc(-2.19 * var(--u)) 0; rotate: 4.62deg; scale: 1.103; }
  30% { translate: calc(-0.61 * var(--u)) 0; rotate: 6.28deg; scale: 1.098; }
  33.33% { translate: calc(1.75 * var(--u)) 0; rotate: 3.39deg; scale: 1.093; }
  36.67% { translate: calc(1.24 * var(--u)) 0; rotate: -1.58deg; scale: 1.089; }
  40% { translate: calc(-1.10 * var(--u)) 0; rotate: -4.96deg; scale: 1.084; }
  43.33% { translate: calc(-1.53 * var(--u)) 0; rotate: -4.54deg; scale: 1.079; }
  46.67% { translate: calc(0.38 * var(--u)) 0; rotate: -1.02deg; scale: 1.075; }
  50% { translate: calc(1.50 * var(--u)) 0; rotate: 2.79deg; scale: 1.070; }
  53.33% { translate: calc(0.24 * var(--u)) 0; rotate: 4.20deg; scale: 1.065; }
  56.67% { translate: calc(-1.21 * var(--u)) 0; rotate: 2.54deg; scale: 1.061; }
  60% { translate: calc(-0.66 * var(--u)) 0; rotate: -0.62deg; scale: 1.056; }
  63.33% { translate: calc(0.77 * var(--u)) 0; rotate: -2.87deg; scale: 1.051; }
  66.67% { translate: calc(0.84 * var(--u)) 0; rotate: -2.80deg; scale: 1.047; }
  70% { translate: calc(-0.32 * var(--u)) 0; rotate: -0.85deg; scale: 1.042; }
  73.33% { translate: calc(-0.79 * var(--u)) 0; rotate: 1.28deg; scale: 1.037; }
  76.67% { translate: calc(-0.04 * var(--u)) 0; rotate: 2.08deg; scale: 1.033; }
  80% { translate: calc(0.58 * var(--u)) 0; rotate: 1.31deg; scale: 1.028; }
  83.33% { translate: calc(0.22 * var(--u)) 0; rotate: -0.10deg; scale: 1.023; }
  86.67% { translate: calc(-0.31 * var(--u)) 0; rotate: -0.98deg; scale: 1.019; }
  90% { translate: calc(-0.23 * var(--u)) 0; rotate: -0.87deg; scale: 1.014; }
  93.33% { translate: calc(0.09 * var(--u)) 0; rotate: -0.25deg; scale: 1.009; }
  96.67% { translate: calc(0.10 * var(--u)) 0; rotate: 0.13deg; scale: 1.005; }
  100% { translate: calc(0.00 * var(--u)) 0; rotate: 0.00deg; scale: 1.000; }
}
@keyframes nx-quake { 0%, 31% { opacity: 1; } 100% { opacity: 0; } }
