/* The home page's two drawings (js/pages/home-flow.js), their insides only: the transit map of
   chains (ArkUI.buildChainWorld, "How it fits together") and the landscape the chain scene plays on
   (drawLandscape, "See it work"). Since Wave 3 the page is Ark blocks (css/ark-blocks.css) in the
   shared block-page panel (css/block-page.css), each drawing in Ark's figure frame; every hl-*
   rule of the hand-built home went with the markup it styled. Colour is data: neutrals, plus the
   identity accent on the one record in flight and what points at it (tests/home-color-semantics.cjs). */

/* The world: your chain is the heavy line; the others cross it at interchanges. The example's
   counterparty is drawn in full ink. Monochrome by rule. The names' size here (12px of a 560-unit
   drawing) is only the first paint: js/pages/home-flow.js fitWorld() sets each name to 12px ON SCREEN
   (an inline font-size in drawing units), sizes the "you.fxn" pill from its words, slides names that
   would touch apart and reserves a margin for them in the viewBox. tests/home-hero-scene.cjs. */
#scene .hl-world {display:block;width:100%;max-width:560px;height:auto;margin-inline:auto;overflow:visible;}
.world-track {stroke:hsl(var(--text-faint));stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;transition:stroke 320ms,stroke-width 320ms;}
.world-station {fill:hsl(var(--canvas));stroke:hsl(var(--text-faint));stroke-width:1.5;}
.world-name {fill:hsl(var(--text-faint));font:500 12px var(--font-mono,monospace);letter-spacing:.04em;transition:fill 320ms;}
.world-line[data-selected="true"] .world-track {stroke:hsl(var(--text-strong));stroke-width:2;}
.world-line[data-selected="true"] .world-station {stroke:hsl(var(--text-strong));}
.world-line[data-selected="true"] .world-name {fill:hsl(var(--text-strong));font-weight:600;}
.world-mine .world-track {stroke:hsl(var(--text-strong));stroke-width:4;}
.world-record {fill:hsl(var(--text-strong));}
.world-interchange {fill:hsl(var(--canvas));stroke:hsl(var(--text-strong));stroke-width:2;}
.world-you rect {fill:hsl(var(--text-strong));}
.world-you-name {fill:hsl(var(--canvas));font:600 12px var(--font-mono,monospace);letter-spacing:.02em;}
.world-icon path {fill:none;stroke:hsl(var(--canvas));stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}
/* Draws in once, then holds still. With motion off the lines are simply there. */
.world-track {animation:world-draw 1100ms cubic-bezier(.4,0,.2,1) backwards;animation-delay:calc(200ms + var(--i,0) * 120ms);}
.world-line:not(.world-mine) :is(.world-station,.world-name),.world-mine :is(.world-record,.world-interchange) {animation:hl-fade 500ms ease-out backwards;animation-delay:calc(700ms + var(--i,0) * 120ms);}
@keyframes world-draw {from {stroke-dasharray:1;stroke-dashoffset:1;}to {stroke-dasharray:1;stroke-dashoffset:0;}}
@keyframes hl-fade {from {opacity:0;}}

/* The landscape sits in the scene tile; on a wide screen its height, not its width, is what is
   scarce (the fold rule), so it is capped and centred. */
/* (capped by WIDTH at the drawing's 4:3 shape, not by height: a box taller than the drawing leaves the drawing smaller than
   its box, and Ark's figure frame measures the box -- its 12px label size would come out at about 7px) */
#scene .flow-rich .flow-landscape {display:block;width:100%;max-width:calc(min(46vh,400px) * 640 / 480);height:auto;margin-inline:auto;overflow:visible;}
/* The landscape (js/pages/home-flow.js drawLandscape). Colour is data: every
   history is 0% saturation, and only the record whose state changes (J42),
   the head that points at it and the reference its resolution creates carry
   the identity accent. The accent only ever touches neutrals, and its painted
   area is scaled by --primary-scale, derived from its luminance. */
.land-grid {stroke:hsl(var(--text-strong));stroke-opacity:.07;stroke-width:.5;}
.land-history-line {stroke:hsl(var(--text-faint));stroke-width:1;stroke-opacity:.5;}
.land-reference {stroke:hsl(var(--text-muted));stroke-width:1;stroke-dasharray:3 3;}
.land-top {fill:hsl(var(--surface));stroke:hsl(var(--border-strong));stroke-width:.6;}
.land-front {fill:hsl(var(--canvas));stroke:hsl(var(--border-default));stroke-width:.6;}
.land-side {fill:hsl(var(--depth));stroke:hsl(var(--border-default));stroke-width:.6;}
.land-inscription {stroke:hsl(var(--text-faint));stroke-width:1;stroke-opacity:.6;}
/* Your history: raised, heavier base, brighter edges. Still monochrome. */
.land-record-main .land-top {fill:hsl(var(--raised));stroke:hsl(var(--text-muted));}
.land-record-main .land-front {fill:hsl(var(--anchor));stroke:hsl(var(--text-faint));}
.land-record-main .land-side {fill:hsl(var(--surface));stroke:hsl(var(--text-faint));}
.land-record-main .land-inscription {stroke:hsl(var(--text-muted));}
/* Every word in the drawing is data-ark-label (js/pages/home-flow.js): Ark's figure frame sets its size, so no rule here does. */
.land-index {fill:hsl(var(--text-muted));font-family:var(--font-mono,monospace);font-weight:500;letter-spacing:.04em;}
.land-party {fill:hsl(var(--text-muted));font-family:var(--font-mono,monospace);font-weight:500;letter-spacing:.04em;}
.land-party-mine {fill:hsl(var(--text-strong));font-weight:600;}
.land-label {fill:hsl(var(--text-strong));font-family:var(--font-mono,monospace);font-weight:600;letter-spacing:.14em;}
.land-meta {fill:hsl(var(--text-muted));font-family:var(--font-mono,monospace);font-weight:500;letter-spacing:.08em;text-transform:uppercase;}
.land-value {fill:hsl(var(--text-strong));font-family:var(--font-sans,"Albert Sans",sans-serif);font-weight:500;}
.land-panel {fill:hsl(var(--canvas));stroke:hsl(var(--border-strong));stroke-width:1;}
.land-panel-heavy {fill:hsl(var(--anchor));}
.land-leader {stroke:hsl(var(--text-faint));stroke-width:1;}
/* The record in flight: hovering and dashed until the chain is extended. */
.land-record-new,.land-head {transition:transform 640ms cubic-bezier(.22,.72,.22,1);}
.flow-landscape[data-placed="false"] .land-record-new {transform:translateY(-28px);}
.flow-landscape[data-placed="false"] .land-record-new :is(.land-top,.land-front,.land-side) {fill:none;stroke:hsl(var(--text-strong));stroke-dasharray:3 3;}
.land-accent {fill:hsl(var(--primary));transform-box:fill-box;transform-origin:center;transform:scale(var(--primary-scale,1));}
.flow-landscape[data-placed="false"] .land-accent {fill:none;stroke:hsl(var(--primary));stroke-width:1.5;}
.land-record-new .land-inscription {stroke:hsl(var(--primary-ink));stroke-opacity:1;}
.flow-landscape[data-placed="false"] .land-record-new .land-inscription {stroke:hsl(var(--text-muted));}
.land-current {stroke:hsl(var(--text-strong));stroke-width:1.5;stroke-dasharray:4 3;transition:opacity 320ms;}
.flow-landscape[data-placed="false"] .land-current {opacity:0;}
.land-head-stem {stroke:hsl(var(--text-muted));stroke-width:1;}
.land-head-dot {fill:hsl(var(--primary));transform-box:fill-box;transform-origin:center;transform:scale(var(--primary-scale,1));}
.land-head-label {fill:hsl(var(--text-strong));}
.land-resolution {opacity:0;transition:opacity 400ms;}
.land-resolution[data-shown="true"] {opacity:1;}
.land-resolution-ref {stroke:hsl(var(--primary));stroke-width:1.5;stroke-dasharray:4 4;}
.land-key-accent {fill:hsl(var(--primary));}
.land-key-history {fill:hsl(var(--raised));stroke:hsl(var(--text-muted));}
.land-key-ref {stroke:hsl(var(--text-muted));stroke-dasharray:3 3;}
/* Icons from js/ark/icons.js, upright in tags or laid flat on the floor plane. */
.land-icon {fill:none;stroke:hsl(var(--text-muted));stroke-width:1.3;stroke-linecap:round;stroke-linejoin:round;}
.land-tag rect {fill:hsl(var(--canvas));stroke:hsl(var(--border-strong));stroke-width:1;}
.land-tag-text {fill:hsl(var(--text-muted));font-family:var(--font-mono,monospace);font-weight:500;letter-spacing:.02em;}
.land-party-mine rect {stroke:hsl(var(--text-strong));}
.land-party-mine .land-tag-text {fill:hsl(var(--text-strong));font-weight:600;}
.land-party-mine .land-icon,.land-party-counterpart .land-icon {stroke:hsl(var(--text-strong));}
.land-party-counterpart .land-tag-text {fill:hsl(var(--text-strong));}
.land-accent-icon {stroke:hsl(var(--primary-ink));stroke-width:1.6;}
.flow-landscape[data-placed="false"] .land-accent-icon {stroke:hsl(var(--primary));}
.land-object-icon {stroke:hsl(var(--text-strong));stroke-width:1.4;}
.land-card-icon {stroke:hsl(var(--text-strong));}
.land-readout .land-step-icon {stroke:hsl(var(--anchor-ink));}
/* The FXN coin: the brand mark as a mask, filled with the ink around it. */
.land-coin {fill:hsl(var(--text-strong));stroke:none;-webkit-mask:var(--mark-fxn) center/contain no-repeat;mask:var(--mark-fxn) center/contain no-repeat;}
.land-result .land-coin {fill:hsl(var(--canvas));}
.land-result rect:not(.land-coin) {fill:hsl(var(--text-strong));stroke:none;}
.land-result .land-tag-text {fill:hsl(var(--canvas));font-weight:600;}
.land-result .land-icon {stroke:hsl(var(--canvas));}
/* Counterparts: monochrome objects; only what J42 adds to them is accent. */
.land-pool-split {stroke:hsl(var(--text-muted));stroke-width:1;}
.land-ballot-slot {stroke:hsl(var(--text-strong));stroke-width:2;}
.land-vote {stroke:hsl(var(--text-faint));stroke-width:1;stroke-dasharray:2 4;}
.land-slab .land-top {fill:hsl(var(--raised));stroke:hsl(var(--text-faint));}
.land-slab-new {opacity:0;transform:translateY(-18px);transition:opacity 400ms,transform 640ms cubic-bezier(.22,.72,.22,1);}
.land-counterpart[data-resolved="true"] .land-slab-new {opacity:1;transform:none;}
/* Readout marks: passed is solid ink, pending is an outline. No hue. */
.land-check,.land-peer {opacity:0;transition:opacity 240ms;}
.land-check[data-shown="true"],.land-peer[data-shown="true"] {opacity:1;}
.land-check rect,.land-peer {fill:none;stroke:hsl(var(--border-strong));}
.land-check[data-on="true"] rect,.land-peer[data-on="true"] {fill:hsl(var(--text-strong));stroke:hsl(var(--text-strong));}
.land-check text {fill:hsl(var(--text-muted));font-family:var(--font-mono,monospace);font-weight:600;}
.land-check[data-on="true"] text {fill:hsl(var(--canvas));}
.land-check:nth-child(2),.land-peer:nth-child(6) {transition-delay:60ms;}
.land-check:nth-child(3),.land-peer:nth-child(9) {transition-delay:120ms;}
.land-check:nth-child(4),.land-peer:nth-child(12) {transition-delay:180ms;}
/* The readout sits on the anchor, so its ink is the anchor's ink in every appearance. */
.land-readout .land-meta {fill:hsl(var(--anchor-ink) / .64);}
.land-readout .land-value {fill:hsl(var(--anchor-ink));}
.land-readout :is(.land-check rect,.land-peer) {stroke:hsl(var(--anchor-ink) / .4);}
.land-readout :is(.land-check[data-on="true"] rect,.land-peer[data-on="true"]) {fill:hsl(var(--anchor-ink));stroke:hsl(var(--anchor-ink));}
.land-readout .land-check text {fill:hsl(var(--anchor-ink) / .64);}
.land-readout .land-check[data-on="true"] text {fill:hsl(var(--anchor));}
.flow[data-playing="true"]:not([data-held]) :is(.flow-landscape[data-phase="extend"] .land-current,.land-resolution[data-shown="true"] .land-resolution-ref) {animation:flow-reference-travel 1.6s linear infinite;}
/* (it runs only while the scene plays, and the scene plays once and settles: js/pages/home-flow.js) */
@keyframes flow-reference-travel {to {stroke-dashoffset:-28;}}
/* Below 600px the drawing renders at about half scale: keep the histories and names legible, and
   let the quote under it carry the step instead of the in-drawing legend, readout and resolver card
   (the quote says the same words; nothing is lost). */
@media (max-width:600px) {
  #scene .flow-landscape :is(.land-legend,.land-readout,.land-resolver,.land-leader) {display:none;}
  #scene .flow-landscape .land-label {display:none;}
  #scene .flow-landscape .land-index {display:none;}
  /* At 12px on screen a name is about a quarter of the drawing's width: the other chains' names would sit on each other.
     Yours and the example's counterparty stay; the other four are named on the map under "How it fits together". */
  #scene .flow-landscape .land-party:not(.land-party-mine,.land-party-counterpart) {display:none;}
  #scene .flow-rich .flow-now {padding-bottom:50px;}  /* the play button sits under the drawing, not over a name */
  /* The legend band is empty here, so pull the drawing up into it. */
  #scene .flow-rich .flow-landscape {margin:-14% auto -5%;}
}
@media (prefers-reduced-motion:reduce) {
  #scene :is(.hl-world,.flow-landscape) *,#scene :is(.hl-world,.flow-landscape) *::before,#scene :is(.hl-world,.flow-landscape) *::after {animation:none !important;transition:none !important;}
}
#scene .hero-still :is(.hl-world,.flow-landscape) * {animation:none !important;transition:none !important;}
