/* home-chart.css · the home's star chart in motion (owner, 2026-11-01). Loaded after site.css on the home only and written
   in its layers (pages, then motion); no nesting, no priority overrides. The markup is chartHtml in
   scripts/build-observatory.mjs: the wireframe (.chart-depth), the signal's route (.chart-route), the departure ring (.ping)
   and the stop marks (.chart-marks) stand inside the plate. The sparkle and lens layers and the Pause control come from
   home-chart.js, which also sets the state on .chart:
     .is-set      the script runs: the structure fades in and the ambient animations exist, paused
     .is-live     in view, tab visible, not paused, no reduced-motion preference: they run
     .is-paused   the reader's pause (the control reads Resume)
     .has-pointer a mouse is over the plate: the lens and the wireframe's counter-shift follow it
   Without the script every addition here is invisible and the chart is site.css's static chart. Nothing here takes the
   pointer: the plate's stars, the index links and shell.js's tap path keep their hit targets. */
@layer pages {
  /* The wireframe behind the stars: the hexagon's edge, the near frame and the spokes between them, 1 px at every width.
     The rings start on the frame and sink (motion layer); until then they are not drawn. */
  .chart-plate .chart-depth { opacity: 0; transition: opacity 1.2s var(--ease); }
  .chart-plate .chart-depth polygon, .chart-plate .chart-depth path { fill: none; stroke: var(--ivory); stroke-width: 1; vector-effect: non-scaling-stroke; }
  .chart-plate .depth-edge { opacity: .14; }
  .chart-plate .depth-frame { opacity: .1; }
  .chart-plate .depth-spokes { opacity: .08; }
  .chart-plate .depth-ring { opacity: 0; transform-box: fill-box; transform-origin: 50% 50%; }
  /* The route is a constellation line at rest. The signal is three round-capped dashes on copies of it (wake, core, head),
     parked before the start (offset = dash length) until the motion layer runs them. Opacity is the live gate, so a pause
     fades a dash out instead of freezing it mid-route. */
  .chart-plate .chart-route { opacity: 0; transition: opacity 1.2s var(--ease); }
  .chart-plate .route, .chart-plate .ping, .chart-plate .mark { fill: none; stroke: var(--copper); vector-effect: non-scaling-stroke; }
  .chart-plate .route { stroke-width: 1; stroke-linejoin: round; opacity: .16; }
  /* The dashes are fractions of the route (pathLength 1), which only holds in user space: a non-scaling stroke would put the
     pattern in screen space in some engines. So the signal keeps user-unit widths, and the three plate widths (280–320, 420
     and 560 px) scale them to about 7, 1.5 and 5 px. */
  .chart-plate .signal { fill: none; stroke: var(--copper); stroke-linecap: round; stroke-linejoin: round; opacity: 0; transition: opacity var(--t3) var(--ease); }
  .chart-plate .signal-glow { stroke-width: 15; stroke-dasharray: .16 1.84; stroke-dashoffset: .16; }
  .chart-plate .signal-core { stroke-width: 3.2; stroke-dasharray: .07 1.93; stroke-dashoffset: .07; }
  .chart-plate .signal-head { stroke-width: 10.6; stroke-dasharray: .012 1.988; stroke-dashoffset: .012; }
  @media (min-width: 640px) {
    .chart-plate .signal-glow { stroke-width: 10.7; }
    .chart-plate .signal-core { stroke-width: 2.3; }
    .chart-plate .signal-head { stroke-width: 7.6; }
  }
  @media (min-width: 1024px) {
    .chart-plate .signal-glow { stroke-width: 8; }
    .chart-plate .signal-core { stroke-width: 1.7; }
    .chart-plate .signal-head { stroke-width: 5.7; }
  }
  /* The ring that leaves Suhail's star as the signal departs, and the copper bloom on each stop as the head arrives:
     stroke-opacity is theirs to animate, opacity the live gate. */
  .chart-plate .ping { stroke-width: 1; stroke-opacity: 0; opacity: 0; transform-box: fill-box; transform-origin: 50% 50%; transition: opacity var(--t3) var(--ease); }
  .chart-plate .mark { stroke-linecap: round; stroke-opacity: 0; opacity: 0; transition: opacity var(--t3) var(--ease); }
  .chart.is-set .chart-plate .chart-depth, .chart.is-set .chart-plate .chart-route { opacity: 1; }
  .chart.is-live .chart-plate .signal-glow { opacity: .18; }
  .chart.is-live .chart-plate .signal-core { opacity: .9; }
  .chart.is-live .chart-plate .signal-head, .chart.is-live .chart-plate .ping, .chart.is-live .chart-plate .mark { opacity: 1; }
  /* home-chart.js's layers over the plate and under the names and the index: copies of the stars that ignore the pointer.
     The sparkle (every other star, ivory, 1.7× wide) blooms in turn; the lens (every star, copper, 1.35× wide) shows
     through a soft disc around the mouse, --px/--py in px from the plate's corner. */
  .chart-sparkle, .chart-lens { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; opacity: 0; transition: opacity var(--t3) var(--ease); }
  .chart-sparkle path, .chart-lens path { fill: none; stroke-linecap: round; vector-effect: non-scaling-stroke; }
  .chart-sparkle path { stroke: var(--ivory); stroke-opacity: 0; }
  .chart-lens path { stroke: var(--copper); }
  .chart-lens {
    -webkit-mask-image: radial-gradient(circle 120px at var(--px, 50%) var(--py, 50%), #000 0, rgb(0 0 0 / .85) 40%, transparent 100%);
    mask-image: radial-gradient(circle 120px at var(--px, 50%) var(--py, 50%), #000 0, rgb(0 0 0 / .85) 40%, transparent 100%);
  }
  .chart.is-live .chart-sparkle { opacity: 1; }
  /* The control: a 44 px pill in the plate's lower corner, outside the hexagon at every width (that corner is empty
     ground, so it covers no star). Icon and text swap with .is-paused. The transparent border is for forced colours,
     where the inset ring is dropped and the border is painted. */
  .chart-pause { position: absolute; right: 0; bottom: 0; z-index: 6; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 44px; min-height: 44px; padding: 0 14px 0 12px; border: 1px solid transparent; border-radius: 22px; background: var(--forest); color: var(--ivory-2); font-size: 14px; font-weight: 500; line-height: 1; white-space: nowrap; box-shadow: inset 0 0 0 1px var(--rule-dark); transition: color var(--t2) var(--ease), box-shadow var(--t2) var(--ease); }
  .chart-pause:hover { color: var(--ivory); box-shadow: inset 0 0 0 1px var(--copper); }
  .chart-pause svg { width: 16px; height: 16px; flex: none; }
  .chart-pause .ico-pause { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
  .chart-pause .ico-play { fill: currentColor; }
  .chart-pause .ico-play, .chart.is-paused .chart-pause .ico-pause { display: none; }
  .chart.is-paused .chart-pause .ico-play { display: block; }
  /* Below 640 the pill is a 44 px disc; its text is read, not seen. */
  @media (max-width: 639px) {
    .chart-pause { width: 44px; padding: 0; }
    .chart-pause span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  }
  @media print {
    .chart-pause, .chart-sparkle, .chart-lens, .chart-plate .chart-route, .chart-plate .ping, .chart-plate .chart-marks { display: none; }
    .chart-plate .chart-depth { opacity: 1; }
  }
  @media (forced-colors: active) {
    .chart-plate .chart-depth, .chart-plate .chart-route, .chart-plate .ping, .chart-plate .chart-marks, .chart-sparkle, .chart-lens { forced-color-adjust: none; }
  }
}

/* The home's layout: type-only direction (owner, 2026-11-10). */
@layer pages {
  .hero { background: var(--forest); color: var(--ivory); position: relative; overflow-x: clip; }
  .hero-chart { display: grid; gap: 4px; justify-items: center; }
  .hero-facts { display: grid; gap: 6px; font-size: var(--small); line-height: var(--small-lh); font-weight: 500; color: var(--ivory-2); }
  .hero-facts a { display: inline-block; padding-block: 12px; margin-block: -12px; color: var(--ivory); text-decoration-color: var(--copper); }
  .hero-facts a:hover { color: var(--copper); }
  .hero-facts .latest { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
  .hero-facts .latest span { color: var(--copper); }
  .hero .btn-primary { width: 100%; }
  @media (min-width: 640px) { .hero .btn-primary { width: auto; } }
  .guides { display: grid; gap: var(--s6); }
  .guide { position: relative; display: grid; gap: var(--s3); }
  .guide img { display: none; width: 100%; object-fit: cover; }
  .guide h3 a { text-decoration: none; }
  .guide p { font-size: 17px; line-height: 1.5; max-width: 40em; }
  .guide .guide-meta { font-size: var(--small); font-weight: 500; color: var(--ink-2); }
}
@layer typeonly {
  .hero .wrap { min-height: min(calc(100svh - var(--header)), calc(64vw + 220px)); display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: 1fr auto; gap: var(--s6); padding-block: clamp(20px, 4svh, 48px) clamp(24px, 5svh, 48px); align-content: stretch; align-items: start; }
  .hero h1 { grid-column: 1; grid-row: 1; align-self: start; font-size: min(calc(var(--to-wrap) / 3.95), calc((100svh - 190px) / 1.9)); line-height: .86; letter-spacing: -.04em; max-width: 4.3em; margin-inline-start: -.03em; padding-bottom: .12em; color: var(--copper); }
  .hero h1::first-line { color: var(--ivory); }
  .hero-copy { grid-column: 1; grid-row: 2; align-self: end; display: flex; flex-wrap: wrap; gap: var(--s5) var(--s7); align-items: end; justify-content: space-between; }
  .hero-copy .d3 { font-size: var(--to-lead); line-height: 1.25; max-width: 30ch; color: var(--ivory); }
  .hero .actions { flex: none; }
  @media (max-width: 639px) { .hero .actions { width: 100%; } }
  .fit-ask { display: grid; gap: var(--s5); align-content: start; }
  .fit-title, #start .section-head .d2, #notebook .section-head .d2, .guides-band .section-head .d2, #operations-sprint-title .section-head .d2 {
    font-family: var(--display); font-size: var(--to-lead); line-height: 1.1; letter-spacing: -.01em; max-width: none;
  }
  .fit-form { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s3) var(--s4); align-items: center; }
  .fit-form label { font-weight: 500; }
  .fit-form select { appearance: none; width: 100%; min-height: 52px; padding: 0 44px 0 20px; border: 0; border-radius: 999px; background-color: var(--paper-2); color: var(--ink); font: inherit; font-weight: 500; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23172a22' stroke-width='1.8'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 20px center; background-size: 12px 8px; }
  .fit .meta { max-width: 46ch; }
  .fit-answer { display: grid; gap: var(--s4); align-content: start; }
  .fit-figure { font-family: var(--display); font-size: clamp(56px, 9.6vw, 150px); line-height: .9; letter-spacing: -.03em; font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; }
  .fit-verdict { font-size: var(--to-lead); line-height: 1.25; max-width: 30ch; }
  .fit-parts { color: var(--ink-2); max-width: 52ch; }
  .fit + #start { padding-top: 0; }
  #start .grid-2 { grid-template-columns: minmax(0, 1fr); gap: var(--s8); }
  #start .doors { grid-template-columns: minmax(0, 1fr); gap: clamp(36px, 5vw, 64px); }
  #start .door { gap: var(--s3); }
  #start .door h3 { font-size: var(--to-list); line-height: .98; letter-spacing: -.025em; }
  #start .door h3 a { padding-block: 0; margin-block: 0; }
  #start .door p { max-width: 46ch; }
  #start .door .link-action { justify-self: start; }
  @media (min-width: 1024px) {
    #start .door { grid-template-columns: 7fr 5fr; column-gap: var(--s8); align-items: start; }
    #start .door h3 { grid-column: 1; grid-row: 1 / span 2; }
    #start .door p { grid-column: 2; padding-top: .6em; }
    #start .door .link-action { grid-column: 2; }
  }
  .chart-band { position: relative; overflow-x: clip; padding-block: clamp(48px, 5vw, 72px); }
  .chart-band .wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s7); }
  .chart-copy { display: grid; gap: var(--s4); align-content: start; justify-items: start; }
  .chart-copy .support { color: var(--ivory-2); max-width: 44ch; }
  .chart-band .hero-facts p:first-child { font-family: var(--display); font-size: var(--to-lead); font-weight: 400; line-height: 1.1; color: var(--ivory); }
  @media (min-width: 1024px) {
    .chart-band .wrap { grid-template-columns: 4fr 8fr; gap: var(--s8); align-items: center; }
    .chart-band .hero-chart { grid-column: 2; grid-row: 1; }
    .chart-band .chart { width: min(100%, 720px); }
  }
  #notebook .row-title { font-family: var(--sans); font-weight: 400; font-size: var(--to-lead); line-height: 1.2; letter-spacing: -.01em; }
  @media (min-width: 1024px) {
    #notebook .row { grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--s8); }
    #notebook .row-main { grid-column: 1; grid-row: 1; }
    #notebook .row-date { grid-column: 2; grid-row: 1; font-size: var(--to-lead); line-height: 1.2; letter-spacing: -.01em; color: var(--ink); text-align: end; }
  }
  .guide h3 { font-family: var(--sans); font-size: 20px; font-weight: 500; line-height: 1.3; }
  .guide h3 a { color: var(--ink); }
  .guide h3 a:hover { color: var(--copper-ink); }
  .guide p { color: var(--ink-2); }
  .guide img { aspect-ratio: 16 / 9; }
  @media (max-width: 639px) {
    .guide { grid-template-columns: minmax(0, 1fr); gap: var(--s2); }
    .guide img { grid-row: auto; width: 100%; height: auto; }
    .guide:nth-child(-n+3) img { display: block; margin-bottom: var(--s2); }
    .guide:nth-child(n+4) img { display: none; }
    .guide h3, .guide p, .guide-meta { grid-column: 1; }
  }
  @media (min-width: 640px) and (max-width: 1279px) {
    .guides { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s7) var(--s6); }
    .guide { grid-template-columns: minmax(0, 1fr); gap: var(--s2); align-content: start; }
    .guide img { display: block; grid-row: auto; width: 100%; height: auto; margin-bottom: var(--s2); }
    .guide h3, .guide p, .guide-meta { grid-column: 1; }
    .guide p { display: block; overflow: visible; }
  }
  @media (min-width: 1280px) {
    .guides { display: block; position: relative; container-type: inline-size; min-height: 460px; }
    .guide { position: static; grid-template-columns: minmax(0, 1fr) max-content 37%; gap: 0 var(--s5); min-height: 62px; align-items: center; align-content: center; }
    .guide h3 { grid-column: 1; grid-row: 1; font-size: var(--body); }
    .guide-meta { grid-column: 2; grid-row: 1; text-align: end; white-space: nowrap; }
    .guide :is(img, p:not(.guide-meta)) { position: absolute; inset-inline-end: 0; width: 35%; opacity: 0; pointer-events: none; transition: opacity var(--t2) var(--ease); }
    .guide img { top: 0; height: auto; display: block; grid-row: auto; }
    .guide > p:not(.guide-meta) { top: calc(35cqw * .5625 + var(--s4)); display: block; overflow: visible; max-width: none; }
    .guide:is(:hover, :focus-within) :is(img, p:not(.guide-meta)), .guides:not(:has(.guide:is(:hover, :focus-within))) .guide:first-of-type :is(img, p:not(.guide-meta)) { opacity: 1; }
    .guides:has(.guide:is(:hover, :focus-within)) .guide:not(:hover, :focus-within) :is(h3 a, .guide-meta) { color: var(--ink-3); }
  }
  .closing-link { display: grid; grid-template-rows: auto 1fr; min-height: 46svh; padding-block: var(--s6) var(--s5); background: var(--copper); color: var(--forest); text-decoration: none; overflow: hidden; }
  .closing-link:hover, .closing-link:focus-visible { background: var(--forest); color: var(--copper); }
  .closing-link:focus-visible { outline: 3px solid var(--ivory); outline-offset: -8px; }
  .closing-top, .closing-word { width: var(--to-wrap); margin-inline: auto; }
  .closing-top { display: flex; gap: var(--s5); align-items: start; justify-content: space-between; }
  .closing-say { font-size: var(--d3); line-height: 1.35; max-width: 34ch; font-weight: 500; }
  .closing-arrow { flex: none; width: clamp(32px, 4vw, 48px); height: auto; }
  .closing-word { display: block; align-self: end; font-family: var(--display); font-size: calc(var(--to-wrap) / 6.6); line-height: .9; letter-spacing: -.04em; white-space: nowrap; }
  @media (min-width: 640px) { .closing-link { min-height: 60svh; } }
}

@layer motion {
  /* The chart's ongoing motion (owner, 2026-11-01): on this component the one-signature-move rule yields to continuous,
     pausable motion. Every run here is infinite, lives inside .chart and is declared paused until .is-live, so a pause
     freezes the frame and a resume continues it; a reduced-motion preference, at load or changed live, removes the whole
     block. One cycle is 9 s: the signal leaves Suhail's star at 0, its head crosses the route in 5.43 s (the dashes run
     1.16 of the line over 70 % of the cycle, so the wake has cleared the last stop by 6.3 s), and the plate rests until the
     next departure. The rings take 12.6 s from the frame to the centre, one every 4.2 s. Keyframe values stay plain:
     Chrome steps a calc() stroke-dashoffset. */
  @keyframes chart-sink { 0% { transform: scale(1); opacity: 0; } 10% { opacity: .1; } 85% { opacity: .06; } 100% { transform: scale(.3); opacity: 0; } }
  @keyframes chart-signal-glow { 0% { stroke-dashoffset: .16; } 70%, 100% { stroke-dashoffset: -1.02; } }
  @keyframes chart-signal-core { 0% { stroke-dashoffset: .07; } 70%, 100% { stroke-dashoffset: -1.11; } }
  @keyframes chart-signal-head { 0% { stroke-dashoffset: .012; } 70%, 100% { stroke-dashoffset: -1.168; } }
  @keyframes chart-ping { 0% { transform: scale(.5); stroke-opacity: 0; } 4% { stroke-opacity: .55; } 24%, 100% { transform: scale(2.6); stroke-opacity: 0; } }
  @keyframes chart-flash { 0% { stroke-opacity: 0; } 3% { stroke-opacity: .9; } 26%, 100% { stroke-opacity: 0; } }
  @keyframes chart-sparkle { 0%, 100% { stroke-opacity: 0; } 50% { stroke-opacity: .55; } }
  @keyframes chart-breathe { to { transform: scale(1.14); } }
  @media (prefers-reduced-motion: no-preference) {
    .chart.is-set .chart-plate .depth-ring { animation: chart-sink 12.6s linear infinite paused; animation-delay: calc(var(--k, 0) * -4.2s); }
    .chart.is-set .chart-plate .signal-glow { animation: chart-signal-glow 9s linear infinite paused; }
    .chart.is-set .chart-plate .signal-core { animation: chart-signal-core 9s linear infinite paused; }
    .chart.is-set .chart-plate .signal-head { animation: chart-signal-head 9s linear infinite paused; }
    .chart.is-set .chart-plate .ping { animation: chart-ping 9s var(--curve-out) infinite paused; }
    /* each stop blooms as the head arrives: its fraction of the route times the head's 5.43 s crossing, less the rise */
    .chart.is-set .chart-plate .mark { animation: chart-flash 9s linear infinite paused; animation-delay: calc(var(--at, 0) * 5.43s - .2s); }
    /* the halo keeps site.css's entrance (140 ms, like the star's) and breathes after it */
    .chart.is-set .chart-plate .suhail-halo { animation: star-in-halo var(--t3) var(--ease) both, chart-breathe 3.2s ease-in-out infinite alternate; animation-delay: 140ms, 0s; animation-play-state: running, paused; transform-box: fill-box; transform-origin: 50% 50%; }
    /* the sparkle's phase comes from each star's --i; three periods keep neighbours out of step */
    .chart.is-set .chart-sparkle path { animation: chart-sparkle 5.8s ease-in-out infinite paused; animation-delay: calc(var(--i, 0) * -.37s); }
    .chart.is-set .chart-sparkle path:nth-child(3n) { animation-duration: 4.6s; }
    .chart.is-set .chart-sparkle path:nth-child(3n + 1) { animation-duration: 7.1s; }
    .chart.is-live .chart-plate .depth-ring, .chart.is-live .chart-plate .signal, .chart.is-live .chart-plate .ping, .chart.is-live .chart-plate .mark, .chart.is-live .chart-sparkle path { animation-play-state: running; }
    .chart.is-live .chart-plate .suhail-halo { animation-play-state: running, running; }
    /* the mouse: the lens follows it (pages layer) and the wireframe eases the other way, so the stars sit on a plate with
       depth; --dx/--dy are plate units set by home-chart.js and cleared when the pointer leaves or the motion stops */
    .chart.is-set .chart-plate .chart-depth { transform: translate(var(--dx, 0px), var(--dy, 0px)); transition: opacity 1.2s var(--ease), transform .9s var(--ease); }
    .chart.is-live.has-pointer .chart-lens { opacity: 1; }
  }
}
