/* The reading card. Same surface as the header panel, so the two read as one
   set: hairline border, 16px radius, Inter Tight titles, small tracked
   labels in muted ink, gold reserved for the lettering. */
:root, [data-theme="light"] { --soft: #5f80cc; --hard: #c46677; --skel: #ebe7e1; --hover: #f2efea; }
[data-theme="dark"] { --soft: #b2c7ec; --hard: #e5abb4; --skel: #262626; --hover: #1c1c1c; }

.card { background: var(--panel); border: 1px solid var(--panel-border); border-radius: 16px;
  padding: 14px 18px 18px; color: var(--ink); }
.card:empty { display: none; }
.card-h { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px;
  padding-bottom: 12px; border-bottom: 1px solid var(--rule); }
.card-h.plain { grid-template-columns: 1fr; }
.icons { display: flex; align-items: center; gap: 3px; }
.orb-ic { width: 28px; height: 28px; display: block; }
.ang-ic { display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--panel-border); background: var(--hover);
  color: var(--muted); font: 600 10px/1 Inter, system-ui, sans-serif; letter-spacing: .04em; }
.asym { width: 17px; height: 17px; fill: none; stroke: var(--muted); stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; }
.asym.soft { stroke: var(--soft); } .asym.hard { stroke: var(--hard); }
.asym-txt { width: 17px; text-align: center; font-family: "Inter Tight", Inter, sans-serif; font-size: 12px; font-weight: 600; color: var(--muted); }
.titles h2 { font-family: "Inter Tight", Inter, system-ui, sans-serif; font-size: 21px; font-weight: 600;
  letter-spacing: -0.018em; line-height: 1.15; }
.titles .sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.x { width: 32px; height: 32px; border: 0; background: none; border-radius: 50%; cursor: pointer; display: grid; place-items: center; }
.x svg { width: 15px; height: 15px; stroke: var(--muted); stroke-width: 1.6; stroke-linecap: round; }
.x:hover { background: var(--hover); }
.x:focus-visible, .asps button:focus-visible, .placements button:focus-visible { outline: 2px solid var(--soft); outline-offset: 2px; }

.facts { margin: 12px 0 0; display: grid; gap: 7px; }
.f { display: grid; grid-template-columns: 96px 1fr; gap: 10px; align-items: baseline; }
.f dt { font-size: 10.5px; font-weight: 500; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.f dd { margin: 0; font-size: 14px; line-height: 1.4; }

.asps { list-style: none; padding: 0; margin: 14px 0 0; border-top: 1px solid var(--rule); }
.asps button { width: 100%; display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 8px;
  padding: 8px 2px; background: none; border: 0; border-bottom: 1px solid var(--rule); color: var(--ink);
  font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.asps button:hover { background: var(--hover); }
.asps em { font-style: normal; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }

/* Interpretation is not written yet. A skeleton holds its place; nothing is
   invented to fill it. */
.reading { margin-top: 16px; display: grid; gap: 9px; }
.reading i { display: block; height: 9px; border-radius: 5px; background: var(--skel); }

.placements { list-style: none; padding: 0; margin: 6px 0 0; }
.placements button { width: 100%; display: grid; grid-template-columns: 26px 76px 1fr 26px; align-items: center; gap: 10px;
  padding: 6px 2px; background: none; border: 0; border-bottom: 1px solid var(--rule); color: var(--ink);
  font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.placements .orb-ic { width: 24px; height: 24px; }
.placements .w { color: var(--muted); font-variant-numeric: tabular-nums; }
.placements .h { color: var(--muted); font-size: 12px; text-align: right; font-variant-numeric: tabular-nums; }
.placements button:hover { background: var(--hover); }

/* Balance dashboard: three rings, lifted from the reference recording. */
.rings { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 14px -6px 0; }
/* The dashboard's title is centred, like the reference sheet's, and on a
   phone it is also a handle for the pull-up panel (pull.js). */
.dash-h { text-align: center; border-bottom: 0; position: relative; }
.dash-h::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 34%; transform: translateX(-50%); border-bottom: 1px solid var(--rule); }
.narrative .reading { margin-top: 14px; }
.list-h h2 { font-size: 15px; letter-spacing: -0.005em; }
.placements .rx { margin-left: 5px; color: var(--hard); font: 600 11px/1 Inter, system-ui, sans-serif; text-decoration: none; }
.ring { margin: 0; }
.ring svg { width: 100%; height: auto; display: block; overflow: visible; }
.ring-edge { fill: none; stroke: var(--panel-border); stroke-width: .7; }
.ring-label { fill: var(--muted); font: 500 10.5px Inter, system-ui, sans-serif; }

/* House cards */
.house-ic { font: 600 12px/1 Inter, system-ui, sans-serif; color: var(--ink); }
.occ { margin-top: 14px; }
.occ h4, .asps-h { font-size: 10.5px; font-weight: 500; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.asps-h { margin-top: 16px; }
.asps-h + .asps { margin-top: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px; border: 1px solid var(--panel-border);
  border-radius: 999px; background: none; color: var(--ink); font: inherit; font-size: 13px; cursor: pointer; }
.chip .orb-ic { width: 22px; height: 22px; }
.chip:hover { background: var(--hover); }
.chip:focus-visible { outline: 2px solid var(--soft); outline-offset: 2px; }
.occ .none { margin: 0; font-size: 14px; color: var(--muted); }
.rulers { margin: 10px 0 4px; }
.rulers .f { grid-template-columns: 114px 1fr; }  /* values line up with the degrees below */

/* source attribution inside a fact */
.facts .src { display: block; margin-top: 4px; font-size: 11.5px; color: var(--muted); font-style: italic; }

/* Show / hide a planet's aspects */
.fold { margin-top: 14px; }
.fold-t { display: inline-flex; align-items: center; gap: 7px; padding: 6px 0; border: 0; background: none; cursor: pointer;
  color: var(--muted); font: 500 10.5px/1 Inter, system-ui, sans-serif; letter-spacing: .09em; text-transform: uppercase; }
.fold-t em { font-style: normal; font-variant-numeric: tabular-nums; letter-spacing: 0; }
.fold-t svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
  transition: transform .4s cubic-bezier(.2,.85,.2,1); }
.fold-t .hide, .fold.open .fold-t .show { display: none; }
.fold.open .fold-t .hide { display: inline; }
.fold.open .fold-t svg { transform: rotate(180deg); }
.fold-t:hover { color: var(--ink); }
.fold-t:focus-visible { outline: 2px solid var(--soft); outline-offset: 2px; border-radius: 4px; }
.fold-b { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .4s cubic-bezier(.2,.85,.2,1); }
.fold-b > div { min-height: 0; overflow: hidden; visibility: hidden; transition: visibility 0s .4s; }
.fold.open .fold-b { grid-template-rows: 1fr; }
.fold.open .fold-b > div { visibility: visible; transition: visibility 0s; }
.fold .asps { margin-top: 6px; }
@media (prefers-reduced-motion: reduce) { .fold-b, .fold-t svg { transition: none; } }

/* Interpretation text (READINGS) */
.reading-t { margin-top: 16px; }
/* Full panel width, set ragged-right with hyphenation: justified text on a
   phone-width column opened wide gaps between words. */
.reading-t p, .top p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--ink); text-wrap: pretty;
  text-align: left; -webkit-hyphens: auto; hyphens: auto; hyphenate-limit-chars: 8 4 3; }

/* back to the top of the reading */
.totop-wrap { position: sticky; bottom: 0; height: 0; display: flex; justify-content: flex-end; pointer-events: none; z-index: 3; }
.totop { pointer-events: none; position: relative; top: -58px; right: 2px; width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center; padding: 0; cursor: pointer; color: var(--ink);
  background: var(--panel); border: 1px solid var(--panel-border); box-shadow: 0 4px 14px rgba(0,0,0,.08);
  opacity: 0; transform: translateY(8px); transition: opacity .35s cubic-bezier(.2,.85,.2,1), transform .35s cubic-bezier(.2,.85,.2,1); }
.totop.on { opacity: 1; transform: none; pointer-events: auto; }
.totop svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.totop:focus-visible { outline: 2px solid var(--muted); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .totop { transition: none; } }
.reading-t p + p, .top p + p { margin-top: 10px; }
.narrative .reading-t { margin-top: 16px; }
.top-h { margin: 20px 0 0; padding-top: 14px; border-top: 1px solid var(--rule);
  font-size: 10.5px; font-weight: 500; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.top { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 14px; }
.top li { display: grid; grid-template-columns: 22px 1fr; gap: 6px; align-items: baseline; }
.top-n { font: 500 12px/1.2 "Inter Tight", Inter, system-ui, sans-serif; color: var(--muted); font-variant-numeric: tabular-nums; }
.top-t { display: block; margin: 0 0 3px; padding: 0; border: 0; background: none; text-align: left; color: var(--ink);
  font: 600 15px/1.25 "Inter Tight", Inter, system-ui, sans-serif; letter-spacing: -0.005em; }
button.top-t { cursor: pointer; }
button.top-t:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--muted); }
button.top-t:focus-visible { outline: 2px solid var(--soft); outline-offset: 2px; border-radius: 3px; }

/* The dashboard has no frame of its own; it sits directly on the panel. */
.flow > .card:has(.dash-h) { border: 0; background: none; padding-left: 4px; padding-right: 4px; }

/* Saturn's icon carries its ring in the artwork; scale it so the body matches. */
.orb-ic.ringed { transform: scale(1.8); transform-origin: 50% 50%; }

/* Dashboard panes: Balance, Patterns. They scroll sideways and snap. */
.panes { display: flex; align-items: flex-start; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -4px; }
.panes::-webkit-scrollbar { display: none; }
.pane { flex: 0 0 100%; scroll-snap-align: start; padding: 0 4px; min-width: 0; }
/* The pane labels stay pinned at the top of the reading while a tall pane
   scrolls beneath them. */
.dots { position: sticky; top: 0; z-index: 2; display: flex; justify-content: center; gap: 14px; margin: 4px -10px 0; padding: 9px 10px 8px;
  background: var(--panel); }
.dot { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 4px 2px; cursor: pointer;
  color: var(--muted); font: 500 10.5px/1 Inter, system-ui, sans-serif; letter-spacing: .09em; text-transform: uppercase; }
.dot i { width: 6px; height: 6px; border-radius: 50%; background: var(--panel-border); transition: background .35s cubic-bezier(.2,.85,.2,1), transform .35s cubic-bezier(.2,.85,.2,1); }
.dot.on { color: var(--ink); } .dot.on i { background: var(--ink); transform: scale(1.25); }
.dot:focus-visible { outline: 2px solid var(--soft); outline-offset: 2px; border-radius: 4px; }
.plist { display: grid; gap: 18px; margin-top: 14px; }
.pat + .pat { padding-top: 16px; border-top: 1px solid var(--rule); }
.pat-h { display: grid; grid-template-columns: 84px 1fr; gap: 14px; align-items: start; }
.pfig { width: 84px; height: 84px; display: block; }
.pring { fill: none; stroke: var(--rule); stroke-width: 1; }
.pl { stroke-width: 1.4; stroke-linecap: round; } .pl.soft { stroke: var(--soft); } .pl.hard { stroke: var(--hard); }
.pd { fill: var(--ink); } .pd.with { fill: var(--muted); }
.flow .pat-t { margin: 0; font: 600 16px/1.2 "Inter Tight", Inter, system-ui, sans-serif; letter-spacing: -0.01em; text-transform: none; color: var(--ink); }
.chip .orb-ic.ringed { margin: 0 7px 0 6px; transform: scale(1.6); }
.pat-s { margin: 3px 0 8px; font-size: 12.5px; color: var(--muted); }
.pat .reading-t { margin-top: 12px; }
.pat .fold { margin-top: 10px; }

/* A stellium's asteroids appear with its planets but are not counted. */
.chip.with { border-style: dashed; color: var(--muted); }
/* Top five: the bodies (and an aspect's symbol) before each title */
.top-ic { display: flex; align-items: center; gap: 3px; margin: 1px 0 6px; flex-wrap: wrap; }
.top-ic .orb-ic { width: 24px; height: 24px; }
.top-ic .orb-ic.ringed { margin: 0 9px; transform: scale(1.6); }
.top-ic .with { display: contents; }
.top-ic .with .orb-ic { opacity: .75; }
.top-ic .asym { width: 16px; height: 16px; margin: 0 2px; }

/* Short facts two to a row, label over value (aspect cards) */
.facts.pair { grid-template-columns: 1fr 1fr; column-gap: 14px; row-gap: 9px; }
.facts.pair .f { grid-template-columns: 1fr; gap: 2px; align-content: start; }
.parc { fill: none; stroke: var(--rule); stroke-width: 6; stroke-linecap: round; }

/* Shape pane */
.shape-h { display: grid; place-items: center; margin-top: 12px; }
.sfig { width: 150px; height: 150px; display: block; overflow: visible; }
.sband { fill: none; stroke: var(--soft); stroke-opacity: .22; stroke-width: 9; stroke-linecap: round; }
.saxis { stroke: var(--rule); stroke-width: .8; stroke-dasharray: 2 2; }
.pd.lead { fill: var(--hard); }
.dots { gap: 10px; }
.dot { letter-spacing: .07em; }
/* sections never grow wider than the reading, whatever a pane holds */
.flow > * { min-width: 0; }
.panes { width: 100%; }
.dots { gap: 8px; }
.dot { font-size: 10px; gap: 5px; }
