/* /saptamsa-d7-children/: the grid of the saptāṁśa (sapta-grid.js) is the first screen. Tokens and type roles:
   /assets/canon.css; values here are var(--…) only. The figure is a sky island: inside it the contract names take the
   obsidian values in both themes. Below 1100 px: kicker, h1, the grid, the answer, the form; from 1100 px the grid
   stands in the left column under h1 and the form keeps its place on the right. Their place is taken before scripts
   and data. The type size of the grid is geometry: sapta-grid.js writes it on each text. */
#sp-figure{width:100%;max-width:none;margin:0 0 var(--space-4);padding:var(--space-4);background-color:var(--surface-sky);color:var(--text-body);border-radius:var(--radius-card);min-width:0}
.sapta-grid{display:block;width:100%;max-width:560px;height:auto;aspect-ratio:360/477;margin:0 auto;overflow:visible}
.sapta-grid rect,.sapta-grid path{fill:none;stroke:var(--accent-struct);stroke-width:1;vector-effect:non-scaling-stroke}
.sapta-grid .sx-edges{stroke:var(--text-muted);stroke-width:2}
.sapta-grid .sx-col{stroke:var(--text-body)}
.sapta-grid .sx-hit{stroke:var(--text-body);stroke-width:2}
.sapta-grid text{font-family:var(--font-body);font-weight:500;fill:var(--text-muted)}
.sapta-grid .is-on{fill:var(--text-body)}
@media (prefers-reduced-motion:no-preference){
  /* the cells of the live layer enter; the frame and every text stand from the first frame */
  .sapta-grid.is-entering #sx-live>rect{animation:sx-in var(--duration-picture) var(--ease-picture) both}
}
@keyframes sx-in{from{opacity:0}to{opacity:1}}

/* The lines under the grid: their place is kept before the data comes, by the longest view measured at every width
   240–1920 (the frame; «now» with each sign of Guru; «own» with each sign of the D7 lagna and of Guru); from 895 px four
   lines would do, but a classic scrollbar of 15 px takes five up to 909 px. A long line wraps, nothing is cut. */
#sp-readout{margin-top:var(--space-3);min-height:calc(13 * var(--fs-small) * var(--lh-dense) + var(--space-1));font-size:var(--fs-small);line-height:var(--lh-dense)}
@media(min-width:252px){#sp-readout{min-height:calc(12 * var(--fs-small) * var(--lh-dense) + var(--space-1))}}
@media(min-width:264px){#sp-readout{min-height:calc(11 * var(--fs-small) * var(--lh-dense) + var(--space-1))}}
@media(min-width:285px){#sp-readout{min-height:calc(10 * var(--fs-small) * var(--lh-dense) + var(--space-1))}}
@media(min-width:316px){#sp-readout{min-height:calc(9 * var(--fs-small) * var(--lh-dense) + var(--space-1))}}
@media(min-width:357px){#sp-readout{min-height:calc(8 * var(--fs-small) * var(--lh-dense) + var(--space-1))}}
@media(min-width:458px){#sp-readout{min-height:calc(7 * var(--fs-small) * var(--lh-dense) + var(--space-1))}}
@media(min-width:490px){#sp-readout{min-height:calc(6 * var(--fs-small) * var(--lh-dense) + var(--space-1))}}
@media(min-width:527px){#sp-readout{min-height:calc(5 * var(--fs-small) * var(--lh-dense) + var(--space-1))}}
@media(min-width:910px){#sp-readout{min-height:calc(4 * var(--fs-small) * var(--lh-dense) + var(--space-1))}}
@media(min-width:1100px){#sp-readout{min-height:calc(5 * var(--fs-small) * var(--lh-dense) + var(--space-1))}}
#sp-readout p{margin:0;color:var(--text-body);font-size:var(--fs-small);line-height:var(--lh-dense)}
#sp-readout #sp-caption{font-weight:500}
#sp-readout #sp-cue{margin-top:var(--space-1);color:var(--text-muted)}
/* text on the sky is no brighter than --text-body: the figures of the lines too; their taller face does not grow the
   line, so the kept place holds the longest view */
#sp-readout .mono{font-size:var(--fs-small);line-height:1;color:var(--text-body)}

section.tool-hero#calculator>.kicker{order:0}
section.tool-hero#calculator>h1{order:1}
section.tool-hero#calculator>#sp-figure{order:2}
section.tool-hero#calculator>p.answer{order:3}
section.tool-hero#calculator>.tool-desk{order:4}
@media(max-width:759.98px){
  section.tool-hero#calculator>h1{font-size:var(--fs-h4);line-height:var(--lh-tight);margin-bottom:var(--space-3)}
  main h2{font-size:var(--fs-h4)}
  main h3{font-size:var(--fs-lead)}
  section.tool-hero#calculator>#sp-figure{margin-inline:calc(50% - 50vw);width:100vw;max-width:none;border-radius:0}
}
@media(min-width:760px) and (max-width:1099.98px){
  .sapta-grid{max-width:520px}
}
@media(min-width:1100px){
  section.tool-hero#calculator{grid-template-rows:auto auto auto 1fr}
  section.tool-hero#calculator>.tool-desk{grid-column:2;grid-row:1 / span 4}
  section.tool-hero#calculator>#sp-figure{grid-column:1}
  section.tool-hero#calculator>h1{font-size:var(--fs-h3);margin-bottom:var(--space-3)}
  /* the grid whole in the window at 1366 × 768 and 1440 × 900 */
  .sapta-grid{max-width:max(260px,min(560px,calc((100vh - 290px) * 360 / 477)))}
}
