/* Life: the birth entry above the cards, and the line drawings the live cards are made of */
.entry { margin: 0 0 28px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 18px }
:is(.entry, .birthbar) form { display: flex; flex-direction: column; gap: 12px }
:is(.entry, .birthbar) .fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 2fr); gap: 10px }
:is(.entry, .birthbar) label { display: flex; flex-direction: column; gap: 5px; font: 500 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--soft) }
:is(.entry, .birthbar) abbr { text-decoration: none; cursor: help }
:is(.entry, .birthbar) label.check { flex-direction: row; align-items: center; gap: 8px; text-transform: none; letter-spacing: 0; font: 500 14px/1.2 var(--sans); color: var(--ink) }
:is(.entry, .birthbar) :is(input:not([type="checkbox"]), select) { width: 100%; min-height: 38px; padding: 7px 10px; box-sizing: border-box; border: 1px solid var(--line); border-radius: 10px; background: var(--wash); color: var(--ink); font: 500 15px/1.2 var(--sans); letter-spacing: 0; text-transform: none }
:is(.entry, .birthbar) :is(input, select, button):focus-visible { outline: 2px solid var(--ink); outline-offset: 1px }
:is(.entry, .birthbar) input { caret-color: var(--ink) }
:is(.entry, .birthbar) input::placeholder { color: var(--soft); opacity: 1 }
/* the place, with the cities that match what is typed listed under it */
:is(.entry, .birthbar) .pob { position: relative; min-width: 0 }
:is(.entry, .birthbar) .suggest { position: absolute; z-index: 5; top: calc(100% + 6px); left: 0; right: 0; margin: 0; padding: 6px; list-style: none; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); box-shadow: 0 12px 32px rgb(0 0 0 / .45) }
:is(.entry, .birthbar) .suggest li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 10px; border-radius: 8px; font-size: 15px; cursor: pointer }
:is(.entry, .birthbar) .suggest li span { font-size: 13px; color: var(--soft) }
:is(.entry, .birthbar) .suggest li:hover, :is(.entry, .birthbar) .suggest li[aria-selected="true"] { background: var(--wash2) }
:is(.entry, .birthbar) input:disabled { opacity: .45 }
:is(.entry, .birthbar) .row { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center }
:is(.entry, .birthbar) .link { padding: 0; border: 0; background: none; font: 500 14px var(--sans); color: var(--soft); text-decoration: underline; text-underline-offset: 3px; cursor: pointer }
:is(.entry, .birthbar) .link:hover { color: var(--ink) }
:is(.entry, .birthbar) .go { min-height: 38px; padding: 8px 18px; border: 0; border-radius: 999px; background: var(--ink); color: var(--bg); font: 700 15px var(--sans); cursor: pointer }
:is(.entry, .birthbar) .go:hover { opacity: .88 }
:is(.entry, .birthbar) .chip, .pickmap .chip { min-height: 30px; padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; background: none; color: var(--soft); font: 400 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; cursor: pointer; transition: color .15s, border-color .15s }
:is(.entry, .birthbar) .chip:hover, .pickmap .chip:hover { color: var(--ink); border-color: var(--soft) }
:is(.entry, .birthbar) .note { margin: 0; font-size: 13px; color: var(--soft) }
:is(.entry, .birthbar) .err { margin: 0; font-size: 14px; font-weight: 600 }
:is(.entry, .birthbar) .warn { margin: 0; font-size: 13px; line-height: 1.4; color: var(--soft); border-left: 2px solid var(--ink); padding-left: 10px }
.entry-set { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px }
.entry-set .note { flex: 1 1 100% }
.entry-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin: 0; flex: 1 1 auto }
.entry-line b { font: 500 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--soft) }
.entry-line span { font-size: 17px; font-weight: 600; letter-spacing: -.01em }
/* compact: the same thing in one row, for the top of a reading page */
.birthbar { max-width: 1240px; margin: 18px auto 0; padding: 0 24px; box-sizing: border-box }
.birthbar > * { padding: 10px 14px; border: 1px solid var(--line); border-radius: 14px }
.birthbar .entry-line span { font-size: 15px }

/* the landing: the entry fills the first screen, the readings wait under it. The cards keep their order on the page,
so the tab order is the order you see; a card left alone on the last row takes the whole row */
.life { padding-top: 0 }
.life .hero { position: relative; min-height: calc(100svh - 63px); display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 40px 0 112px; box-sizing: border-box }
.hero-in { width: min(100%, 780px); display: flex; flex-direction: column; gap: 30px }
.life .hero h1 { margin: 0; font-size: clamp(48px, 8vw, 92px); font-weight: 800; line-height: .95; letter-spacing: -.045em }
/* on the landing the fields stand on their own: no panel round them, no fill in them, the name over each in small capitals */
.life .entry { margin: 0; padding: 0; border: 0; border-radius: 0 }
.life .entry form { gap: 16px }
.life .entry .fields { gap: 14px }
.life .entry label { gap: 9px }
.life .entry :is(input:not([type="checkbox"]), select) { min-height: 52px; padding: 10px 14px; border-radius: 12px; background: none; font: 500 18px/1.2 var(--sans); transition: border-color .15s }
.life .entry input:not([type="checkbox"]):hover { border-color: var(--soft) }
.life .entry input:not([type="checkbox"]):focus { border-color: var(--ink); outline: none }
.life .entry input::placeholder { font: 500 15px/1 var(--mono); letter-spacing: .1em }
.life .entry input:focus::placeholder { font: 500 18px/1.2 var(--sans); letter-spacing: 0; opacity: .5 }
.life .entry .go { min-height: 46px; padding: 10px 26px; font-size: 16px }
.life .entry .entry-set { gap: 16px 18px }
.life .entry .entry-line { flex-direction: column; align-items: flex-start; gap: 10px }
.life .entry .entry-line span { font-size: clamp(22px, 3vw, 30px); font-weight: 800; letter-spacing: -.025em; line-height: 1.15 }
.life .cue { position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px 10px 18px; border-radius: 999px; color: var(--ink); font: 600 15px var(--sans); text-decoration: none; white-space: nowrap; cursor: pointer; transition: background .15s, color .15s, opacity .2s }
.life .cue { background: none; border: 1px solid var(--ink) }
/* until all three fields are good there is nowhere yet to go */
.life .cue:disabled { opacity: .35; cursor: default }
.life .cue svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round }
.life .cue:not(:disabled):hover { background: var(--wash2) }
.life .cue:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px }
.readings { padding-top: 36px; scroll-margin-top: 8px }
.readings-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin: 0 0 22px }
.readings h2 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -.02em; scroll-margin-top: 24px }
/* the three ways to see them: small pills, the one showing filled */
.views { display: flex; gap: 6px }
.views button { min-height: 28px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: none; color: var(--soft); font: 400 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; cursor: pointer; transition: color .15s, border-color .15s, background .15s }
.views button:hover { color: var(--ink); border-color: var(--soft) }
.views button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg) }
.views button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px }
/* what each reading says, in a line: only in the list and the glance */
.world .gist { display: none; font: 500 13px/1.4 var(--mono); font-style: normal; color: var(--ink) }
.readings:is([data-view="list"], [data-view="glance"]) .world .gist { display: block }
.world .gist:empty { display: none !important }
/* the list: one line per reading, its name, what it is and what it says, to scroll and pick from */
.readings[data-view="list"] .worlds { grid-template-columns: minmax(0, 1fr); gap: 0; border-top: 1px solid var(--line) }
.readings[data-view="list"] .world .screen { aspect-ratio: auto; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: none; transition: background .2s }
.readings[data-view="list"] .world :is(.live, video, img) { display: none }
.readings[data-view="list"] .world .lab { position: static; display: grid; grid-template-columns: minmax(0, 11em) minmax(0, 1fr) minmax(0, 1fr); align-items: baseline; gap: 6px 24px; padding: 22px 130px 22px 4px; background: none }
.readings[data-view="list"] .world .lab span { max-width: none }
.readings[data-view="list"] .world .go { top: 50%; bottom: auto; transform: translateY(-50%) }
.readings[data-view="list"] .world a:hover .screen, .readings[data-view="list"] .world a:focus-visible .screen { transform: none; background: var(--wash) }
/* at a glance: a small picture of each, with what it says under it, three to a row */
.readings[data-view="glance"] .worlds { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px }
.readings[data-view="glance"] .worlds > .world { grid-column: auto }
.readings[data-view="glance"] .world .screen { display: flex; flex-direction: column; aspect-ratio: auto; height: 100%; box-sizing: border-box; border-radius: 18px }
.readings[data-view="glance"] .world :is(.live, video, img) { position: relative; inset: auto; order: -1; flex: none; width: 100%; height: auto; aspect-ratio: 4 / 3; box-sizing: border-box; border-bottom: 1px solid var(--line) }
.readings[data-view="glance"] .world .live { padding: 16px }
.readings[data-view="glance"] .world .live .cap, .readings[data-view="glance"] .world .go { display: none }
.readings[data-view="glance"] .world .lab { position: static; flex: 1; gap: 8px; padding: 16px 18px 18px; background: none }
.readings[data-view="glance"] .world .lab span { max-width: none; font-size: 14px; font-weight: 500; color: var(--soft) }
.readings h2:focus { outline: none }
.readings h2:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: 4px }
.readings[data-view="grid"] .worlds > .world:last-child:nth-child(even) { grid-column: 1 / -1 }
.readings[data-view="grid"] .worlds > .world:last-child:nth-child(even) .screen { aspect-ratio: 2 / 1 }

/* the live cards: line drawings on the card's screen, under its label */
.world .live { position: absolute; inset: 0; display: grid; place-items: center; padding: 84px 20px 20px; color: var(--ink) }
.world.wide .live { padding-top: 70px }
.world .live svg { width: auto; height: 100%; max-width: 100%; aspect-ratio: 1; display: block }
.world .live .cap { position: absolute; left: 22px; right: 112px; bottom: 18px; margin: 0; font: 400 12px/1.3 var(--mono); color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
/* the maya card: the 260 days beside the day's number and sign; the ayurveda card: the ring, its mansion in the middle */
.tz-card { height: 100%; min-height: 0; display: flex; align-items: center; justify-content: center; gap: 22px }
.world .live .tz-card svg { aspect-ratio: 13 / 20 }
.world .live[data-card="maya"] { padding-bottom: 48px }
.tz-card .tzolkin rect.on { stroke-width: 2.5px }
.nk-card { height: 100%; min-height: 0; aspect-ratio: 1; max-width: 100%; display: grid; place-items: center }
.nk-card > * { grid-area: 1 / 1 }
:is(.tz-card, .nk-card) p { margin: 0; display: flex; flex-direction: column; gap: 6px }
.nk-card p { text-align: center }
:is(.tz-card, .nk-card) b { font-size: 30px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1 }
.nk-card b { font-size: 20px; letter-spacing: 0 }
:is(.tz-card, .nk-card) span { font: 400 12px/1.2 var(--mono); color: var(--soft) }
/* the calendars card: the day as /calendars names it, the Long Count in Maya numerals, then Egypt and India */
.cl-card { height: 100%; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center }
.cl-day { margin: 0; display: flex; flex-direction: column; gap: 6px }
.cl-day b { font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.05 }
.cl-day span { font: 400 12px/1.2 var(--mono); color: var(--soft) }
.cl-stela { display: flex; gap: 6px }
.cl-stela figure { margin: 0; width: 50px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 0 6px; border: 1px solid var(--line); border-radius: 10px }
.world .live .cl-stela svg { width: 30px; height: 30px; aspect-ratio: auto; fill: var(--ink); stroke: var(--ink) }
.cl-stela figcaption { font: 500 11px/1 var(--mono); color: var(--soft) }
.cl-rows { margin: 0; display: grid; grid-template-columns: max-content max-content; gap: 6px 14px; text-align: left }
.cl-rows dt { font: 500 11px/1.5 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--soft) }
.cl-rows dd { margin: 0; font-size: 14px; font-weight: 600 }
/* a narrow card is too short for all three counts, so it keeps the day and the stela and leaves the rest to /calendars */
.world .live[data-card="cal"] { container-type: inline-size }
@container (max-width: 420px) {
  .cl-card { gap: 10px }
  .cl-day b { font-size: 20px }
  .cl-rows { display: none }
  .cl-stela { gap: 5px }
  .cl-stela figure { width: 42px; padding: 6px 0 5px }
  .world .live .cl-stela svg { width: 24px; height: 24px }
}
.world.soon .screen { cursor: default }
.world.soon .live { color: var(--soft) }
.world.soon .go { color: var(--soft) }
.world img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover }
:root[data-theme="light"] .world img { filter: url(#chalk) }

.rings line, .rings circle { fill: none; stroke: currentColor; stroke-width: 1px; vector-effect: non-scaling-stroke }
.rings .r-rim { opacity: .55 }
.rings .r-tick { opacity: .5 }
.rings text { font: 400 13px/1 var(--sans); text-anchor: middle; dominant-baseline: central }
.rings .r-sign { fill: var(--soft) }
.rings .r-body text { fill: var(--ink); font-size: 15px }
.rings .r-body line { opacity: .7 }
.rings.ticks line { opacity: .6 }
.hexagram { display: block; width: 100%; height: auto; color: var(--ink) }
.hexagram line { fill: none; stroke: currentColor; stroke-width: 2px; stroke-linecap: butt; vector-effect: non-scaling-stroke }
.hexagram .hx-row.on line { stroke-width: 4px }

.pickmap { padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--bg); color: var(--ink); max-width: calc(100vw - 32px); box-sizing: border-box }
.pickmap::backdrop { background: color-mix(in srgb, var(--charcoal) 45%, transparent) }
.pickmap .pm-head { display: flex; flex-direction: column; gap: 6px; margin: 0 0 12px; max-width: 360px }
.pickmap .pm-head b { font: 500 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--soft) }
.pickmap .pm-head span { font-size: 15px; line-height: 1.4 }
.pickmap canvas { display: block; max-width: 100%; height: auto !important; aspect-ratio: 1; cursor: crosshair; touch-action: none }
.pickmap .pm-at { margin: 8px 0; font-size: 13px; color: var(--soft) }
.pickmap .pm-at:empty { display: none }
.pickmap .row { display: flex; justify-content: flex-end; margin-top: 8px }

/* a reading, laid out as /calendars lays out each count: the drawing on one side, and on the other a small kicker, a
   headline, a sentence or two, the facts in rows and the rest behind "Read more". The parts below it are smaller
   still: a short heading, a sentence, the thing itself */
.reading { --rule: color-mix(in srgb, var(--ink) 32%, transparent); max-width: 1160px }
.birthbar:has(+ .reading) { max-width: 1160px }
.reading > section { margin: 0; padding: 32px 0; border-top: 1px dotted var(--rule) }
.reading > section:last-of-type { margin-bottom: 32px; border-bottom: 1px dotted var(--rule) }
.reading h2 { margin: 0 0 10px; font-size: 20px; font-weight: 800; letter-spacing: -.015em }
.reading > section > p, .reading .part > p { max-width: 680px; margin: 0 0 10px; font-size: 16px; line-height: 1.55; text-wrap: pretty }
.reading .cap { font: 400 12px/1.3 var(--mono); color: var(--soft) }
.reading .note { font-size: 13px; color: var(--soft) }
.reading .warn { font-size: 13px; line-height: 1.4; color: var(--soft); border-left: 2px solid var(--ink); padding-left: 10px }
.rd { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 40px; align-items: start }
.rd.wide-vis { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) }
.rd-vis { position: sticky; top: calc(var(--bar) * 2); min-width: 0; display: flex; flex-direction: column; gap: 12px }
.rd-vis .diagram { margin: 0 auto; width: 100% }
.rd-vis .cap { margin: 0; text-align: center }
.rd-text { display: flex; flex-direction: column; gap: 16px; min-width: 0 }
.rd-text > * { margin: 0 }
.reading .kicker { margin: 0; font: 500 11px/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--soft) }
.reading .rd-text h2 { margin: -4px 0 0; font-size: clamp(26px, 3vw, 34px); line-height: 1.05; letter-spacing: -.03em; text-wrap: balance }
.reading h2 small { display: block; margin-top: 8px; font: 500 14px/1.35 var(--mono); letter-spacing: .02em; color: var(--soft) }
.reading .lede { font-size: 17px; line-height: 1.5; text-wrap: pretty }
/* the facts in rows, as /calendars has them: the label in mono, the value, and a short soft line under it */
.reading .rows { margin: 0; display: grid; grid-template-columns: max-content minmax(0, 1fr); border-top: 1px solid var(--line) }
.reading .rows dt, .reading .rows dd { margin: 0; padding: 10px 0; border-bottom: 1px solid var(--line) }
.reading .rows dt { padding-right: 18px; font: 500 11px/1.6 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--soft) }
.reading .rows dd { font-size: 15px; line-height: 1.45; font-weight: 600 }
.reading .rows dd p { margin: 2px 0 0; font-size: 14px; font-weight: 400; color: var(--soft); text-wrap: pretty }
/* "Read more": the longer text, folded away until asked for; the chevron turns when it opens */
.reading details.more { margin: 2px 0 0; max-width: 680px }
.reading details.more summary { display: inline-block; cursor: pointer; list-style: none; padding: 4px 0; font: 500 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--soft) }
.reading details.more summary::-webkit-details-marker { display: none }
.reading details.more summary span { display: inline-block; margin-left: 2px; transition: transform .15s }
.reading details.more[open] summary span { transform: rotate(90deg) }
.reading details.more summary:hover { color: var(--ink) }
.reading details.more summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 4px }
.reading details.more p { margin: 10px 0 0; font-size: 15px; line-height: 1.55; color: var(--soft); text-wrap: pretty }
.reading details.more p.note { font-size: 13px }
.reading details.more .rows { margin-top: 12px }
.reading > section > details.more { margin-bottom: 14px }
.reading details.more:has(form) { max-width: 860px }
.reading details.more .rows dd { font-size: 14px; font-weight: 400; color: var(--soft) }
.diagram { max-width: 560px; margin: 8px auto 36px; color: var(--ink) }
.diagram svg { display: block; width: 100%; height: auto }
.scroll { overflow-x: auto; margin: 0 0 10px; border: 1px solid var(--line); border-radius: 14px }
.reading > section > .scroll { max-width: 760px }
table.sky { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums }
table.sky th, table.sky td { padding: 9px 14px; text-align: left; white-space: nowrap; border-top: 1px solid var(--line) }
table.sky thead th { border-top: 0; font: 500 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--soft) }
table.sky tbody th { font-weight: 600 }
table.sky .g { display: inline-block; width: 1.4em; color: var(--soft); font-weight: 400 }
.ts { text-decoration: underline dotted; text-underline-offset: 4px; cursor: help }

/* the bodygraph: strokes only, personality solid, design dashed, a faint wash on a defined centre */
.diagram svg.bodygraph { max-width: 480px; margin: 0 auto }
.bodygraph path, .bodygraph line { fill: none; stroke: currentColor; stroke-width: 1px; vector-effect: non-scaling-stroke }
.bodygraph .bg-centre.on { fill: currentColor; fill-opacity: .1 }
/* a channel that may or may not be there, depending on the hour of birth */
.bodygraph .bg-ch.ts { opacity: .4 }
.bodygraph .half.off line { stroke: var(--soft); opacity: .3 }
.bodygraph .half.d line { stroke: currentColor; stroke-dasharray: 3 2 }
.bodygraph .half.pd line + line { stroke-dasharray: 3 2 }
.bodygraph .bg-n { font: 400 8px/1 var(--mono); fill: var(--soft); text-anchor: middle; dominant-baseline: central }
.bodygraph .bg-n.on { fill: var(--ink); font-weight: 600 }
table.rave small { display: block; font: 400 11px/1.3 var(--mono); color: var(--soft) }
table.rave small.edge { color: var(--ink) }
.hd-centres { list-style: none; max-width: 680px; margin: 4px 0 12px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px }
.hd-centres li { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px }
.hd-centres li.on { border-color: var(--ink); background: color-mix(in srgb, currentColor 6%, transparent) }
.hd-centres b { font-size: 15px; font-weight: 600 }
.hd-centres span { font: 400 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--soft) }
.reading .credit { font-size: 13px; color: var(--soft) }

/* Gene Keys: four spheres, each a name, the key and line, a small hexagram and three labelled words */
.gk-spheres { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px }
.gk-spheres li { padding: 16px 18px; border: 1px solid var(--line); border-radius: 18px }
.gk-spheres h3 { margin: 0; font: 500 11px/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--soft) }
.gk-spheres .gk-key { margin: 6px 0 12px; font-size: 20px; font-weight: 800; letter-spacing: -.015em; font-variant-numeric: tabular-nums }
.gk-spheres .hexagram { width: 64px; margin: 0 0 14px }
.gk-words { display: grid; grid-template-columns: max-content 1fr; gap: 6px 12px; margin: 0 }
.gk-words dt { font: 500 11px/1.6 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--soft) }
.gk-words dd { margin: 0; font-size: 15px; font-weight: 600 }

/* the Gene Keys card: four key numbers and their gift words, two by two, divided by fine lines */
.gk-card { list-style: none; margin: 0; padding: 0; width: min(100%, 300px); display: grid; grid-template-columns: 1fr 1fr; align-self: center }
.gk-card li { display: flex; flex-direction: column; gap: 6px; padding: 14px 12px; text-align: center }
.gk-card li:nth-child(odd) { border-right: 1px solid var(--line) }
.gk-card li:nth-child(-n+2) { border-bottom: 1px solid var(--line) }
.gk-card b { font-size: 30px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums }
.gk-card span { font: 400 12px/1.2 var(--mono); color: var(--soft) }

/* Maya: the 13 by 20 grid and the calendars wheel side by side, the day marked in both */
.diagram.tz-pair { max-width: 760px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 28px; align-items: center }
.tzolkin rect { stroke: currentColor; stroke-width: 1px; vector-effect: non-scaling-stroke; opacity: .28 }
.tzolkin rect.on { opacity: 1; fill: currentColor; fill-opacity: .1; stroke-width: 1.5px }
.tzolkin text { font: 400 7px/1 var(--mono); fill: var(--soft); text-anchor: middle; dominant-baseline: central }
.tzolkin .tz-s { font-size: 8px; text-anchor: end }
.tzolkin text.on { fill: var(--ink); font-weight: 600 }
.tzwheel { overflow: visible }
.tzwheel text { font: 400 10px/1 var(--mono); fill: var(--soft); dominant-baseline: central }
.tzwheel text.on { fill: var(--ink); font-weight: 600 }
.tzwheel .tz-big { font: 800 16px/1 var(--sans); fill: var(--ink) }
.tzwheel :is(.tz-ln, .tz-lt, .tz-tk, .tz-hand) { fill: none; stroke: currentColor; vector-effect: non-scaling-stroke }
.tzwheel .tz-ln { stroke-width: 1px }
.tzwheel .tz-lt, .tzwheel .tz-tk { stroke-width: 1px; opacity: .35 }
.tzwheel .tz-hand { stroke-width: 1.6px; stroke-linecap: round; stroke-linejoin: round }
.dream .dream-kin { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0 0 12px }
.dream .dream-kin b { font: 500 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--soft) }
.dream .dream-kin span { font-size: 20px; font-weight: 800; letter-spacing: -.015em }

/* Ayurveda: the ring of 27, the prakriti questions and their three bars */
.nakring { overflow: visible }
.nakring :is(path, line, circle) { fill: none; stroke: currentColor; stroke-width: 1px; vector-effect: non-scaling-stroke }
.nakring .nk-seg { opacity: .5 }
.nakring .nk-seg.on { opacity: 1; fill: currentColor; fill-opacity: .1 }
.nakring .nk-hand { stroke-width: 1.6px; stroke-linecap: round }
.nakring text { font: 400 9px/1 var(--mono); fill: var(--soft); dominant-baseline: central }
.nakring .nk-n { text-anchor: middle }
.nakring .nk-name { font: 500 9.5px/1 var(--sans) }
.nakring text.on { fill: var(--ink); font-weight: 700 }
.reading .caveat { margin: 0; font-size: 14px; font-weight: 600 }
#prakriti { display: flex; flex-direction: column; gap: 18px; margin: 18px 0 }
#prakriti fieldset { margin: 0; padding: 14px 0 0; border: 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px }
#prakriti legend { padding: 0 0 10px; float: left; grid-column: 1 / -1; font: 500 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--soft) }
#prakriti label { display: flex; gap: 9px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; font-size: 14px; line-height: 1.35; cursor: pointer; transition: border-color .15s }
#prakriti label:hover { border-color: var(--soft) }
#prakriti label:has(input:checked) { border-color: var(--ink); background: color-mix(in srgb, currentColor 6%, transparent) }
#prakriti input { margin: 2px 0 0; flex: none; accent-color: var(--ink) }
#prakriti input:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px }
#prakriti .pk-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; font: 400 12px/1.3 var(--mono); color: var(--soft) }
.pk-clear { padding: 0; border: 0; background: none; font: 500 14px var(--sans); color: var(--soft); text-decoration: underline; text-underline-offset: 3px; cursor: pointer }
.pk-clear:hover { color: var(--ink) }
.pk-result { margin: 0 0 10px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 18px }
.pk-result p { margin: 8px 0 0; font-size: 15px; line-height: 1.5; color: var(--soft) }
.pk-result .pk-lead { margin-top: 14px; font-size: 17px; font-weight: 700; color: var(--ink) }
.pbars { display: block; width: 100%; max-width: 420px; height: auto; overflow: visible }
.pbars text { font: 500 13px/1 var(--sans); fill: var(--ink); dominant-baseline: central }
.pbars .pb-n { font: 400 12px/1 var(--mono); fill: var(--soft); text-anchor: end }
.pbars line { stroke: currentColor; stroke-width: 1px; opacity: .25; vector-effect: non-scaling-stroke }
.pbars rect { stroke: currentColor; stroke-width: 1px; fill: currentColor; fill-opacity: .1; vector-effect: non-scaling-stroke }

@media (max-width: 640px) {
  .life .hero { min-height: calc(100svh - 57px); padding: 28px 0 96px }
  .hero-in { gap: 22px }
  .life .cue { bottom: 22px }
  .readings { padding-top: 24px }
  .readings-head { margin-bottom: 16px }
  .readings[data-view="list"] .world .lab { grid-template-columns: minmax(0, 1fr); padding: 16px 104px 16px 2px }
  .readings[data-view="glance"] .worlds { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px }
  .readings[data-view="glance"] .world .lab { padding: 12px 12px 14px }
  .readings[data-view="glance"] .world .lab span { font-size: 13px }
  .readings[data-view="glance"] .world .live { padding: 10px }
  .birthbar { padding: 0 16px; margin-top: 14px }
  table.sky th, table.sky td { padding: 8px; font-size: 13.5px }
  .reading .rows { grid-template-columns: minmax(0, 1fr) }
  .reading .rows dt { padding: 10px 0 0; border-bottom: 0 }
  .reading .rows dd { padding-top: 4px }
  .reading > section { padding: 24px 0 }
  .gk-spheres { gap: 10px }
  .gk-spheres li { padding: 14px 12px }
  .gk-words { gap: 6px 8px }
  .gk-words dd { font-size: 14px; overflow-wrap: anywhere }
  .hd-centres li { flex-direction: column; gap: 4px; padding: 9px 10px }
  .hd-centres b { font-size: 14px }
  :is(.entry, .birthbar) .fields { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) }
  :is(.entry, .birthbar) .fields .pob { grid-column: 1 / -1 }
  .world .live { padding: 96px 16px 34px }
  .world .live .cap { left: 16px; bottom: 12px }
  .world .live[data-card="gk"] { padding-bottom: 66px }
  .gk-card li { padding: 8px 6px; gap: 3px }
  .gk-card b { font-size: 22px }
  .gk-card span { font-size: 11px }
  .tz-card { gap: 14px }
  :is(.tz-card) b { font-size: 22px }
  /* too small a ring to hold the name, so on a phone it sits beside it, as the maya card's does */
  .nk-card { aspect-ratio: auto; display: flex; align-items: center; justify-content: center; gap: 14px }
  .nk-card p { text-align: left }
  .nk-card b { font-size: 17px }
  :is(.tz-card, .nk-card) span { font-size: 11px }
  .diagram.tz-pair { grid-template-columns: minmax(0, 1fr); gap: 20px }
  .diagram.tz-pair .tzolkin { max-width: 300px; margin: 0 auto }
  #prakriti fieldset { grid-template-columns: minmax(0, 1fr) }
  .pk-result { padding: 14px 16px }
}
@media (max-width: 860px) {
  .readings[data-view="grid"] .worlds > .world:last-child:nth-child(even) .screen { aspect-ratio: 4 / 3 }
  .rd, .rd.wide-vis { grid-template-columns: minmax(0, 1fr); gap: 24px }
  .rd-vis { position: static; max-width: 480px; width: 100%; margin: 0 auto }
  /* where the drawing is the reading itself, the headline comes first */
  .rd.text-first .rd-text { order: -1 }
}
/* a tablet keeps the name beside the words; a phone stacks them, so this stops short of the phone */
@media (min-width: 641px) and (max-width: 860px) {
  .readings[data-view="list"] .world .lab { grid-template-columns: minmax(0, 9em) minmax(0, 1fr) }
  .readings[data-view="list"] .world .gist { grid-column: 2 }
}
@media (prefers-reduced-motion: reduce) { .life .cue, .views button, .life .entry input, .reading details.more summary span { transition: none } }
