/* /neuro-expectation-setting: its own sheet, loaded after site.css.
   The page exists to lower expectations, so nothing on it rises: a diary
   being written (what you watch), a cell whose signal reaches tissue with a
   piece missing that stays missing (what it cannot do), three kinds of
   signal, and three check-ins on a line that ends at a decision.
   Script: scripts/neuro-expectation-setting.js. With that script absent
   every part is visible, drawn in its finished state, and every link jumps. */

html:has(body.nxp) {
  --hc-nav-h: 64px;            /* fallback; the script sets the real header height */
  --hc-bar-h: 52px;
  /* every jump, anchor and Tab stop lands below the header and the bar */
  scroll-padding-top: calc(var(--hc-nav-h) + var(--hc-bar-h) + 12px);
}
.nxp {
  --nx-ease: cubic-bezier(.16, 1, .3, 1);
  --nx-gut: clamp(20px, 4vw, 56px);
  --nx-on-navy: rgba(255, 255, 255, .8);
}

/* ============ GROUND RULES ============ */
.nx-wrap { max-width: calc(1240px + 2 * var(--nx-gut)); margin-inline: auto; padding-inline: var(--nx-gut); }
/* text fills its column; the column sets the measure */
.nxp main p { max-width: none; margin: 0; }
.nxp main :is(ul, ol) { list-style: none; margin: 0; padding: 0; }
.nxp main a:not(.btn) { border-bottom: 0; }
.nxp main h2 {
  font-family: var(--font-display); font-weight: 300; color: var(--ink);
  font-size: clamp(1.9rem, 3.3vw, 3rem); line-height: 1.1; letter-spacing: -.01em;
  margin: 0; max-width: none; text-wrap: wrap;
}
.nxp main h3 { font-family: var(--font-body); font-weight: 600; font-size: 1.1875rem; line-height: 1.3; letter-spacing: 0; color: var(--ink); margin: 0; max-width: none; }
.nxp main :is(a, .btn):focus-visible { outline: 2px solid var(--accent-blue); outline-offset: 3px; border-radius: 4px; }
.nxp :is(.nx-none, .nx-end) :is(a, .btn):focus-visible { outline-color: var(--accent-ice); }
/* a part that receives focus after a jump is not itself a control */
.nxp main :is(h1, h2, h3, section, div)[tabindex="-1"]:focus { outline: none; }

/* the sentence that answers the heading above it */
.nx-answer { font-size: clamp(1.15rem, 1.5vw, 1.34rem); line-height: 1.55; color: var(--ink); }

/* a word another page explains */
.nx-term { color: inherit; text-decoration: underline dotted; text-decoration-color: var(--accent-blue); text-decoration-thickness: 1.5px; text-underline-offset: 4px; transition: color 200ms, text-decoration-color 200ms; }
.nx-term:hover { color: var(--accent-blue-hover); text-decoration-style: solid; }
.nx-end .nx-term { text-decoration-color: var(--accent-ice); }
.nx-end .nx-term:hover { color: #fff; }

/* an icon in its ring: the three signals, the three check-ins */
.nx-badge { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: #fff; border: 1px solid var(--border-strong); transition: background-color 420ms, border-color 420ms, opacity 420ms, transform 520ms var(--nx-ease); }
.nx-ic { width: 28px; height: 28px; display: block; overflow: visible; }
.nx-ic path { fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; transition: stroke 420ms; }
.nx-badge--dark { background: var(--navy-brand); border-color: rgba(255, 255, 255, .34); }
.nx-badge--dark .nx-ic path { stroke: #fff; }

/* ============ REVEALS ============
   Hidden only once the script has said it is running (nx-js on <html>), so
   with no script nothing is ever hidden. Each part comes in its own way. */
@keyframes nx-up { from { opacity: 0; transform: translateY(22px); } }
@keyframes nx-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes nx-ink { from { stroke-dashoffset: 1; opacity: 0; } 10% { opacity: 1; } to { stroke-dashoffset: 0; opacity: 1; } }
@keyframes nx-fade { from { opacity: 0; } }

.nx-js [data-r] { transition: opacity 620ms ease, transform 820ms var(--nx-ease); }
.nx-js [data-r]:not(.is-in) { opacity: 0; transform: translateY(18px); }
.nx-js [data-r="left"]:not(.is-in) { transform: translateX(-32px); }
.nx-js [data-r="right"]:not(.is-in) { transform: translateX(32px); }
/* these hold their place and bring their parts in instead */
.nx-js :is([data-r="words"], [data-r="links"], [data-r="pt"]):not(.is-in) { opacity: 1; transform: none; }

/* ============ HERO ============ */
.nx-hero { padding-block: clamp(24px, 3.4vw, 48px) clamp(48px, 6vw, 88px); }
.nx-hero__h1 { font-family: var(--font-display); font-weight: 300; font-size: clamp(2.1rem, 4.1vw, 3.7rem); line-height: 1.06; letter-spacing: -.015em; color: var(--ink); margin: 0 0 clamp(28px, 4vw, 52px); max-width: none; text-wrap: wrap; }
/* a heading that has to wrap breaks where the styling changes */
.nx-hero__h1 > .h-lead, .nx-hero__h1 > em { display: inline-block; }
.nx-hero__h1 > em { color: var(--accent-blue); }

.nx-hero__row { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 88px); align-items: center; }
.nx-hero__answer { font-size: clamp(1.2rem, 1.7vw, 1.5rem); line-height: 1.5; color: var(--ink); }
.nx-hero__answer strong { font-weight: 600; }
.nx-hero__lede { font-size: 1.0625rem; line-height: 1.65; color: var(--ink-muted); margin-top: 20px !important; }
.nx-hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; margin-top: 32px; }
.nx-back { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 15px; font-weight: 500; color: var(--ink-muted); text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 5px; transition: color 200ms, text-decoration-color 260ms; }
.nx-back span { display: inline-block; transition: transform 360ms var(--nx-ease); }
.nx-back:hover { color: var(--accent-blue-hover); text-decoration-color: currentColor; }

.nx-hero__fig { margin: 0; }
.nx-diary { display: block; width: 100%; height: auto; overflow: visible; }
.nx-diary path { fill: none; stroke: var(--ink); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nx-diary .nx-diary__cover { stroke: var(--border-strong); stroke-width: 1.4; }
.nx-diary .nx-diary__page { fill: #fff; }
.nx-diary .nx-diary__spine { stroke: var(--border-strong); stroke-width: 1.4; }
.nx-diary .nx-diary__ribbon { stroke: var(--accent-blue); fill: var(--accent-wash); }
.nx-diary .nx-diary__rule { stroke: var(--border); stroke-width: 1; }
.nx-diary .nx-diary__ink { stroke-width: 1.5; }
.nx-diary .nx-diary__ink--old { stroke: var(--ink-muted); opacity: .55; }
.nx-diary .nx-diary__ink--new { stroke: var(--accent-blue); }
.nx-diary .nx-diary__pencil path { fill: #fff; stroke: var(--ink); }

/* first paint: the book is drawn, the old entries are there, and today's is written */
@keyframes nx-old { from { opacity: 0; } to { opacity: .55; } }
@keyframes nx-write {
  0% { transform: translate(-92px, -76px); }
  38% { transform: translate(72px, -76px); }
  41% { transform: translate(-92px, -38px); }
  78% { transform: translate(80px, -38px); }
  81% { transform: translate(-92px, 0); }
  100% { transform: none; }
}
.nx-js .nx-hero__h1 > * { animation: nx-up 900ms var(--nx-ease) both; }
.nx-js .nx-hero__h1 > em { animation-delay: 110ms; }
.nx-js .nx-hero__text > * { animation: nx-up 900ms var(--nx-ease) 240ms both; }
.nx-js .nx-hero__text > .nx-hero__lede { animation-delay: 330ms; }
.nx-js .nx-hero__text > .nx-hero__actions { animation-delay: 420ms; }
.nx-js .nx-diary .nx-draw { stroke-dasharray: 1; animation: nx-ink 900ms var(--nx-ease) 200ms both; }
.nx-js .nx-diary .nx-diary__page { animation-delay: 420ms; }
.nx-js .nx-diary .nx-diary__spine { animation-delay: 700ms; animation-duration: 500ms; }
.nx-js .nx-diary .nx-diary__ribbon { animation-delay: 1000ms; animation-duration: 500ms; }
.nx-js .nx-diary .nx-diary__rule { animation: nx-fade 600ms ease 900ms both; }
.nx-js .nx-diary .nx-diary__ink--old { animation: nx-old 500ms ease calc(1100ms + var(--i) * 30ms) both; }
.nx-js .nx-diary .nx-diary__ink--new { stroke-dasharray: 1; animation: nx-ink 250ms linear calc(2000ms + var(--i) * 260ms) both; }
.nx-js .nx-diary .nx-diary__pencil { animation: nx-fade 400ms ease 1700ms both, nx-write 2600ms linear 2000ms both; }

/* ============ CONTENTS BAR (follows the reader) ============ */
.nxp .hc-bar {
  /* under the phone menu's sheet (55) and backdrop (50), over the page */
  position: fixed; left: 0; right: 0; top: var(--hc-nav-h); z-index: 49;
  height: var(--hc-bar-h);
  background: rgba(255, 255, 255, .94);
  -webkit-backdrop-filter: saturate(180%) blur(12px); backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
  transform: translateY(-8px); opacity: 0; visibility: hidden;
  transition: opacity 260ms, transform 360ms var(--nx-ease), visibility 0s 360ms;
}
.nxp .hc-bar.is-on { transform: none; opacity: 1; visibility: visible; transition: opacity 260ms, transform 360ms var(--nx-ease); }
body.nxp.nav-open .hc-bar { opacity: 0; visibility: hidden; }
.nxp .hc-bar__track {
  max-width: calc(1240px + 2 * var(--nx-gut)); margin: 0 auto; padding: 0 var(--nx-gut);
  height: 100%; display: flex; align-items: stretch; gap: clamp(18px, 2.4vw, 32px);
  overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; scroll-padding-inline: 28px;
}
.nxp .hc-bar__track::-webkit-scrollbar { display: none; }
.nxp .hc-bar__track a {
  position: relative; flex: none; display: flex; align-items: center;
  font-size: 14px; font-weight: 500; color: var(--ink-muted); white-space: nowrap; border-bottom: 0;
  transition: color 200ms;
}
.nxp .hc-bar__track a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: var(--accent-blue); transform: scaleX(0); transform-origin: left;
  transition: transform 360ms var(--nx-ease);
}
.nxp .hc-bar__track a[aria-current] { color: var(--ink); }
.nxp .hc-bar__track a[aria-current]::after { transform: scaleX(1); }
.nxp .hc-bar__track a:focus-visible { outline: 2px solid var(--accent-blue); outline-offset: -4px; border-radius: 4px; }
.nxp .hc-bar__progress {
  position: absolute; left: 0; top: 0; height: 2px; width: 100%;
  background: var(--accent-ice); transform-origin: left; transform: scaleX(var(--hc-p, 0));
}

/* ============ WHAT WON'T HAPPEN ============ */
.nx-floor { padding-block: clamp(48px, 6vw, 96px); border-top: 1px solid var(--border); }
.nxp .nx-floor h2 { margin-bottom: clamp(24px, 3.4vw, 44px); }
.nx-floor__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 88px); align-items: center; }
.nx-floor__text p + p { margin-top: 20px !important; }
.nx-floor__text p:not(.nx-answer) { font-size: 1.0625rem; line-height: 1.7; color: var(--ink-soft); }
.nx-floor__fig { margin: 0; }

.nx-signal { display: block; width: 100%; height: auto; overflow: visible; }
.nx-signal :is(circle, path, rect) { fill: none; stroke: var(--ink); stroke-width: 1.7; stroke-linecap: round; }
.nx-signal .nx-signal__cell { fill: #fff; }
.nx-signal .nx-signal__core { fill: var(--accent-wash); stroke: var(--accent-blue); }
.nx-signal .nx-signal__speck { fill: var(--ink); stroke: none; }
.nx-signal .nx-signal__wave { stroke: var(--accent-blue); stroke-width: 2; }
.nx-signal .nx-signal__tile { fill: #fff; stroke: var(--border-strong); stroke-width: 1.5; }
/* the piece that is gone: outlined, never filled */
.nx-signal .nx-signal__gap { stroke: var(--ink-muted); stroke-width: 1.5; stroke-dasharray: 4 6; }

/* the signal goes out and the tissue hears it; only while it is on screen */
@keyframes nx-wave { 0%, 100% { opacity: .18; } 30% { opacity: 1; } 60% { opacity: .18; } }
@keyframes nx-tile { 0%, 100% { stroke: var(--border-strong); } 30% { stroke: var(--accent-blue); } 60% { stroke: var(--border-strong); } }
.nx-floor__fig.is-live .nx-signal__wave { animation: nx-wave 3200ms ease-in-out calc(var(--i) * 380ms) infinite; }
.nx-floor__fig.is-live .nx-signal__tile { animation: nx-tile 3200ms ease-in-out calc(1140ms + var(--c) * 220ms) infinite; }

/* the ceiling, said one word at a time */
.nx-ceiling { margin-top: clamp(40px, 5.5vw, 80px); padding-top: clamp(28px, 3.6vw, 48px); border-top: 1px solid var(--ink); }
.nx-ceiling__words { font-family: var(--font-display); font-weight: 300; font-size: clamp(2rem, 6.2vw, 5.4rem); line-height: 1.04; letter-spacing: -.015em; color: var(--ink); }
.nx-ceiling__words span { display: inline-block; }
.nx-ceiling__rest { font-size: clamp(1.1rem, 1.45vw, 1.3rem); line-height: 1.6; color: var(--ink-soft); margin-top: clamp(16px, 2vw, 24px) !important; }
.nx-js .nx-ceiling__words span { transition: opacity 900ms ease, transform 1100ms var(--nx-ease); }
.nx-js .nx-ceiling:not(.is-in) .nx-ceiling__words span { opacity: 0; transform: translateY(26px); }
.nx-js .nx-ceiling__words span:nth-child(2) { transition-delay: 480ms; }
.nx-js .nx-ceiling__words span:nth-child(3) { transition-delay: 960ms; }
.nx-js .nx-ceiling__rest { transition: opacity 800ms ease 1500ms; }
.nx-js .nx-ceiling:not(.is-in) .nx-ceiling__rest { opacity: 0; }

/* ============ WHAT TO WATCH (the one tinted band) ============ */
.nx-signals { background: var(--accent-wash); padding-block: clamp(48px, 6vw, 96px); }
.nx-signals__head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(20px, 5vw, 88px); align-items: end; }
.nx-signals__lead { margin-top: clamp(36px, 5vw, 64px) !important; padding-bottom: 14px; font-size: 1.0625rem; font-weight: 600; color: var(--ink); }
.nx-rows { border-top: 1px solid var(--ink); }
.nx-row { display: grid; grid-template-columns: 60px minmax(0, 7fr) minmax(0, 4fr); gap: clamp(20px, 3vw, 44px); align-items: start; padding-block: clamp(24px, 3vw, 36px); border-bottom: 1px solid var(--border-strong); }
.nx-row__body p { margin-top: 8px !important; font-size: 1.0625rem; line-height: 1.65; color: var(--ink-soft); }
.nx-row__list li { position: relative; padding-left: 20px; font-size: 1rem; line-height: 1.5; color: var(--ink-soft); }
.nx-row__list li + li { margin-top: 8px; }
.nx-row__list li::before { content: ""; position: absolute; left: 0; top: .72em; width: 10px; height: 1.5px; background: var(--accent-blue); }
/* the signal being read: its ring fills and its icon is drawn again */
.nx-row.is-lit .nx-badge { background: var(--accent-blue); border-color: var(--accent-blue); transform: scale(1.06); }
.nx-row.is-lit .nx-ic path { stroke: #fff; stroke-dasharray: 1; animation: nx-draw 900ms var(--nx-ease) both; }
.nx-row.is-lit .nx-ic path:nth-child(n+2) { animation-delay: 220ms; }
.nx-js .nx-row[data-r]:not(.is-in) { transform: translateX(-28px); }
.nx-js .nx-row:nth-child(2) { transition-delay: 90ms; }
.nx-js .nx-row:nth-child(3) { transition-delay: 180ms; }

/* ============ WHEN RESPONSE ISN'T THERE (navy) ============ */
.nx-none { background: var(--navy-brand); color: #fff; padding-block: clamp(56px, 7vw, 112px) clamp(40px, 5vw, 72px); }
.nxp .nx-none :is(h2, h3) { color: #fff; }
.nx-none__grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: clamp(36px, 6vw, 104px); align-items: start; }
.nxp .nx-none__text h2 { font-size: clamp(2.3rem, 5vw, 4.4rem); line-height: 1.02; margin-bottom: clamp(20px, 2.6vw, 32px); }
.nx-none__text p { font-size: 1.0625rem; line-height: 1.7; color: var(--nx-on-navy); }
.nx-none__text p + p { margin-top: 18px !important; }
.nx-none__text .nx-answer { font-size: clamp(1.15rem, 1.5vw, 1.34rem); line-height: 1.55; color: #fff; }
.nx-none__window { font-size: 1.0625rem; line-height: 1.65; color: var(--nx-on-navy); padding-bottom: clamp(24px, 3vw, 36px); }
.nx-none__window strong { display: block; font-weight: 600; color: #fff; }

/* three check-ins, joined ring to ring; nothing is drawn after the last */
.nx-tl__pt { position: relative; display: grid; grid-template-columns: 60px minmax(0, 1fr); gap: clamp(16px, 2vw, 28px); padding-bottom: clamp(28px, 3.4vw, 44px); }
.nx-tl__pt:last-child { padding-bottom: 0; }
.nx-tl__pt:not(:last-child)::before, .nx-tl__pt:not(:last-child)::after { content: ""; position: absolute; left: 29px; top: 60px; bottom: 0; width: 2px; background: rgba(255, 255, 255, .2); }
.nx-tl__pt:not(:last-child)::after { background: var(--accent-ice); transform: scaleY(var(--nx-p, 1)); transform-origin: top; }
.nx-tl__when { font-size: 15px; font-weight: 600; color: var(--accent-ice); line-height: 1.3; padding-top: 6px; }
.nx-tl__body h3 { margin-top: 2px; font-size: 1.25rem; }
.nx-tl__body h3 + p { margin-top: 6px !important; font-size: 1.0625rem; line-height: 1.6; color: var(--nx-on-navy); }
.nx-js .nx-tl__pt:not(.is-passed) .nx-badge { border-color: rgba(255, 255, 255, .22); }
.nx-js .nx-tl__pt:not(.is-passed) .nx-ic path { stroke: rgba(255, 255, 255, .45); }
.nx-tl__pt.is-passed .nx-badge { border-color: var(--accent-ice); }
.nx-js .nx-tl__pt.is-passed .nx-ic path { stroke-dasharray: 1; animation: nx-draw 800ms var(--nx-ease) both; }
.nx-js .nx-tl__pt.is-passed .nx-ic path:nth-child(n+2) { animation-delay: 180ms; }
.nx-js .nx-tl__pt:not(.is-in) .nx-tl__body { opacity: 0; transform: translateX(20px); }
.nx-js .nx-tl__pt .nx-tl__body { transition: opacity 620ms ease, transform 820ms var(--nx-ease); }
.nx-js .nx-tl__pt:not(.is-in) .nx-badge { opacity: 0; transform: scale(.6); }

.nx-second { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(12px, 6vw, 104px); align-items: start; margin-top: clamp(40px, 5.5vw, 80px); padding-top: clamp(28px, 3.4vw, 44px); border-top: 1px solid rgba(255, 255, 255, .26); }
.nxp .nx-second h3 { font-family: var(--font-display); font-weight: 300; font-size: clamp(1.5rem, 2.3vw, 2.1rem); line-height: 1.16; }
.nx-second p { font-size: clamp(1.1rem, 1.4vw, 1.25rem); line-height: 1.6; color: #fff; }

/* ============ KEEP READING ============ */
.nx-next { padding-block: clamp(48px, 6vw, 96px); }
.nx-next__grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(20px, 5vw, 88px); align-items: start; }
.nx-post { margin: clamp(20px, 3vw, 40px) 0 0; width: min(100%, 220px); }
.nx-post svg { display: block; width: 100%; height: auto; overflow: visible; }
.nx-post path { fill: none; stroke: var(--ink); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nx-post .nx-post__board > path:first-child { fill: #fff; transition: fill 320ms, stroke 320ms; }
.nx-post .nx-post__line { stroke: var(--border-strong); stroke-width: 1.5; transition: stroke 320ms; }
.nx-post__board { transform-box: fill-box; transform-origin: center; transition: transform 520ms var(--nx-ease), opacity 420ms; transition-delay: calc(var(--n) * 70ms); }
/* the board for the link under the pointer, or holding focus */
.nx-post__board.is-on { transition-delay: 0s; }
.nx-post__board.is-on > path:first-child { fill: var(--accent-blue); stroke: var(--accent-blue); }
.nx-post__board.is-on .nx-post__line { stroke: #fff; }
.nx-post__board.is-on:nth-of-type(odd) { transform: translateX(6px); }
.nx-post__board.is-on:nth-of-type(even) { transform: translateX(-6px); }
.nx-js .nx-post:not(.is-in) { opacity: 1; transform: none; }
.nx-js .nx-post:not(.is-in) .nx-post__board { opacity: 0; transform: scale(.7); }
.nx-links { border-top: 1px solid var(--ink); }
.nx-links li { border-bottom: 1px solid var(--border-strong); }
.nx-links a { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 64px; padding-block: 14px; font-size: clamp(1.1rem, 1.5vw, 1.3rem); line-height: 1.3; color: var(--ink); transition: color 200ms, padding-left 420ms var(--nx-ease); }
.nx-links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--accent-blue); transform: scaleX(0); transform-origin: left; transition: transform 520ms var(--nx-ease); }
.nx-links i { font-style: normal; flex: none; color: var(--accent-blue); transition: transform 420ms var(--nx-ease); }
.nx-js .nx-links:not(.is-in) li { opacity: 0; transform: translateY(14px); }
.nx-js .nx-links li { transition: opacity 560ms ease, transform 760ms var(--nx-ease); transition-delay: calc(var(--n, 0) * 70ms); }

/* ============ THE CALL (navy, narrow and centred on purpose) ============ */
.nx-end { background: var(--navy-brand); color: #fff; padding-block: clamp(64px, 8vw, 120px); text-align: center; }
.nx-end__inner { max-width: 760px; margin-inline: auto; padding-inline: var(--nx-gut); }
.nxp .nx-end h2 { color: #fff; }
.nx-end p { font-size: clamp(1.1rem, 1.4vw, 1.25rem); line-height: 1.6; color: rgba(255, 255, 255, .86); margin-top: 20px !important; }
.nx-end .nx-term { color: #fff; }
.nx-end .btn { margin-top: 32px; }
.nx-end .nx-end__note { font-size: 14px; line-height: 1.5; color: rgba(255, 255, 255, .72); margin-top: 28px !important; }

/* ============ COURTESIES ============ */
/* a jump says where it landed: a rule is drawn under the heading reached, then let go */
@keyframes nx-land { 0% { background-size: 0 2px; } 45%, 80% { background-size: 100% 2px; } 100% { background-size: 100% 0; } }
.nxp main :is(h2, h3).is-landed { background: linear-gradient(var(--accent-blue), var(--accent-blue)) no-repeat left bottom / 0 2px; animation: nx-land 1500ms var(--nx-ease) 500ms both; }
.nxp .nx-none :is(h2, h3).is-landed { background-image: linear-gradient(var(--accent-ice), var(--accent-ice)); }
/* a press is acknowledged where the thumb is */
.nx-links a:active i { transform: translateX(10px); }
.nx-back:active span { transform: translateX(-8px); }
/* second time through in the same visit: the diary is already written */
.nx-seen .nx-diary *, .nx-seen .nx-hero__h1 > *, .nx-seen .nx-hero__text > * { animation: none !important; }

/* ============ HOVER (a pointer that can hover; a thumb leaves nothing stuck) ============ */
@media (hover: hover) {
  .nxp .hc-bar__track a:hover { color: var(--ink); }
  .nxp .hc-bar__track a:hover::after { transform: scaleX(.35); }
  .nxp .hc-bar__track a[aria-current]:hover::after { transform: scaleX(1); }
  .nx-back:hover span { transform: translateX(-5px); }
  .nx-links a:hover { color: var(--accent-blue-hover); padding-left: 10px; }
  .nx-links a:hover::after { transform: scaleX(1); }
  .nx-links a:hover i { transform: translateX(6px); }
}

/* ============ SHAPES ============ */
@media (max-width: 1100px) {
  .nxp .hc-bar__track { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 28px), transparent); }
}
@media (max-width: 900px) {
  .nx-hero__row, .nx-floor__grid, .nx-signals__head, .nx-none__grid, .nx-second, .nx-next__grid { grid-template-columns: minmax(0, 1fr); }
  .nx-hero__fig { max-width: 440px; }
  .nx-next__lead { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
  .nx-post { width: 96px; margin-top: 0; }
  .nx-floor__fig { max-width: 460px; }
  .nx-signals__head { align-items: start; gap: 16px; }
  .nx-row { grid-template-columns: 60px minmax(0, 1fr); }
  .nx-row__list { grid-column: 2; }
}
@media (max-width: 560px) {
  html:has(body.nxp) { --hc-bar-h: 48px; }
  .nxp .hc-bar__track { gap: 22px; }
  .nx-hero__actions .btn { width: 100%; }
  .nx-badge { width: 52px; height: 52px; }
  .nx-ic { width: 24px; height: 24px; }
  .nx-row { grid-template-columns: 52px minmax(0, 1fr); gap: 14px 16px; }
  .nx-tl__pt { grid-template-columns: 52px minmax(0, 1fr); }
  .nx-tl__pt:not(:last-child)::before, .nx-tl__pt:not(:last-child)::after { left: 25px; top: 52px; }
  .nx-end .btn { width: 100%; }
}

/* ============ STILL ============
   Reduced motion: every drawing holds its finished state and nothing moves. */
@media (prefers-reduced-motion: reduce) {
  .nxp main *, .nxp main *::before, .nxp main *::after { animation: none !important; transition: none !important; }
  .nx-js [data-r], .nx-js [data-r] * { opacity: 1 !important; transform: none !important; }
  .nxp .hc-bar { transition: none !important; }
  .nx-row.is-lit .nx-badge, .nx-links a:hover i, .nx-back:hover span { transform: none; }
  .nx-links a:hover { padding-left: 0; }
}

/* Parts waiting to slide in sit a little to one side; without this the page
   could be scrolled sideways until they arrive. clip keeps sticky working. */
.nxp main { overflow-x: clip; }

/* Paper is taken the instant the print dialog opens: nothing may still be
   fading, sliding or half drawn, and the navy bands print as dark text on white. */
@media print {
  .nxp .hc-bar { display: none !important; }
  .nxp main *, .nxp main *::before, .nxp main *::after { animation: none !important; transition: none !important; }
  .nx-js [data-r], .nx-js [data-r] *, .nx-js .nx-hero * { opacity: 1 !important; transform: none !important; }
  .nx-diary .nx-diary__ink--old { opacity: .55 !important; }
  .nx-none, .nx-end, .nx-signals { background: #fff !important; }
  .nx-none *, .nx-end * { color: var(--ink) !important; }
  .nx-badge--dark { background: #fff; border-color: var(--border-strong) !important; }
  .nx-badge--dark .nx-ic path, .nx-js .nx-tl__pt .nx-ic path { stroke: var(--ink) !important; }
  .nx-tl__pt:not(:last-child)::before { background: var(--border-strong); }
  .nx-tl__pt:not(:last-child)::after { display: none; }
  .nx-second { border-top-color: var(--border-strong); }
  .nx-end .btn { border: 1px solid var(--ink); background: #fff; }
}
