/* My charts: the list (charts.html) and the person page (chart.html).
   Dark under the site's rotating sky; chunky Archivo for what matters, small
   quiet text for the explaining. Colours and faces are tokens. */
@import "chart-form.css";
@import "kundali.css";
* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--black); }
body {
  min-height: 100svh; overflow-x: hidden; color: var(--bone);
  font-family: var(--font-panel); -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(ellipse at 50% 0%, oklch(0.13 0.03 280 / 0.7), transparent 60%),
    radial-gradient(ellipse at 50% 40%, var(--bg-1), var(--bg-2) 55%, var(--bg-3));
  background-attachment: fixed;
}
a { color: inherit; text-decoration: none; }

/* the site's sky: the Learn pages' star backdrop (starfield.js), fixed behind everything */
.sky-back { position: fixed; inset: 0; z-index: 0; width: 100%; height: 100%; display: block; pointer-events: none; }

.mc-wrap { position: relative; z-index: 1; max-width: 1360px; margin: 0 auto; padding: 104px var(--page-pad-x) 120px; }

/* type roles */
.mc-head {   /* section headings: wide chunky Archivo in title case */
  font-family: var(--font-panel); font-weight: 700; font-size: clamp(34px, 4.4vw, 64px); line-height: 0.95; letter-spacing: -0.035em;
}
.mc-title {   /* the list page title: the wordmark face, as the names below it */
  font-family: var(--serif); font-weight: 400; font-size: clamp(48px, 5.6vw, 84px); line-height: 1; letter-spacing: -0.01em;
  color: var(--coral);   /* one colour for the whole title: the Learn titles' coral */
}
.mc-title em { font-style: normal; }
.mc-small { font-family: var(--font-prose); font-weight: 300; font-size: 17px; line-height: 1.55; color: var(--bone-dim); max-width: 52ch; }

.mc-link { border-bottom: 1px solid rgb(var(--bone-rgb) / 0.25); transition: border-color 0.2s; }
.mc-link:hover { border-color: var(--coral); }

/* the house word-roll: text rises into a clipped window */
.roll { display: block; overflow: hidden; padding-bottom: 0.04em; }
.roll > span { display: block; transform: translateY(108%); transition: transform 0.8s cubic-bezier(0.22, 1, 0.3, 1); }
.roll.in > span { transform: none; }
@media (prefers-reduced-motion: reduce) { .roll > span { transform: none; transition: none; } }

/* ---------- list page ---------- */
.mc-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.mc-top .mc-small { margin-top: 10px; font-size: 15px; }
.mc-count { font-family: var(--font-panel); font-weight: 700; color: var(--coral); }

.mc-locked {
  margin-top: 28px; padding: 28px 32px; border: 1px solid rgb(var(--coral-rgb) / 0.5); border-radius: var(--r-card);
  display: grid; gap: 10px; background: rgb(var(--black-rgb) / 0.6);
}
.mc-locked .mc-head { font-size: clamp(26px, 2.8vw, 40px); }
.mc-locked[hidden] { display: none; }

/* the list: one row per person */
.mc-cols, .mc-row {
  display: grid; align-items: center; gap: 20px;
  grid-template-columns: minmax(260px, 2.1fr) 1fr 0.55fr minmax(160px, 1.7fr) 0.65fr 0.85fr 64px;
}
.mc-cols { margin-top: 32px; padding: 0 24px 10px; }
/* v1 has no reports (charts.js sets .no-reports): the Report column goes and the others close up */
@media (min-width: 981px) {   /* the wide table only: under 981px the rows are two columns of their own */
  .no-reports .mc-cols, .no-reports .mc-row { grid-template-columns: minmax(260px, 2.1fr) 1fr 0.55fr minmax(160px, 1.7fr) 0.65fr 64px; }
}
.no-reports .mc-cols .col-report, .no-reports .mc-row .report { display: none; }
/* a ledger, as on the karak lists: rows touch, square edges, dashed rules;
   black by default, the rashi's colour comes up on hover */
.mc-list { display: grid; border-top: 1px dashed rgb(var(--bone-rgb) / 0.28); }
.mc-row {
  --r: var(--bone-mute);
  position: relative; overflow: hidden; min-height: 76px; padding: 14px 24px;
  border-bottom: 1px dashed rgb(var(--bone-rgb) / 0.28);
  background: transparent;
  font-size: 15px; font-weight: 500; color: var(--bone-dim);
}
.mc-row::before {   /* the fill drops from the row's head, as the engine page's aspect list */
  content: ''; position: absolute; inset: 0; z-index: 0; background: color-mix(in oklab, var(--r) 30%, var(--black));
  transform: scaleY(0); transform-origin: 50% 0; transition: transform 0.34s cubic-bezier(0.22, 1, 0.3, 1);
}
.mc-row:focus-visible::before { transform: scaleY(1); }
@media (hover: hover) { .mc-row:hover::before { transform: scaleY(1); } }   /* a tap would leave the fill stuck on */
.mc-row:focus-visible { outline: none; }
.mc-row > :not(.glyph) { position: relative; z-index: 1; }
@media (prefers-reduced-motion: reduce) { .mc-row::before { transition: none; } }
.mc-row .glyph {   /* the rashi as a large watermark behind the row */
  position: absolute; z-index: 1; left: 44%; top: 50%; transform: translate(-50%, -50%); pointer-events: none;
  font-size: 180px; line-height: 1; color: var(--r); opacity: 0; transition: opacity 0.3s;
}
@media (hover: hover) { .mc-row:hover .glyph { opacity: 0.4; } }
.mc-row .name { font-family: var(--serif); font-size: 28px; font-weight: 300; line-height: 1.05; letter-spacing: -0.01em; color: var(--bone); overflow-wrap: anywhere; }   /* same face as the person page name */
.mc-row .place { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-row .report { color: var(--bone-mute); }
.mc-row .rm {
  justify-self: end; position: relative; z-index: 2; font-size: 12px; color: var(--bone-mute);
  background: none; border: 0; cursor: pointer; font-family: var(--font-panel); padding: 6px;
  opacity: 0; transition: opacity 0.2s;
}
.mc-row:hover .rm, .mc-row .rm:focus-visible, .mc-row .rm.sure { opacity: 1; }
.mc-row .rm:hover, .mc-row .rm.sure { color: var(--coral); }
@media (hover: none) { .mc-row .rm { opacity: 1; } }

/* ---------- person page ---------- */
.pc { position: relative; z-index: 1; max-width: 1360px; margin: 0 auto; padding: 96px var(--page-pad-x) 120px; }
.pc-hero { min-height: calc(100svh - 96px); display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); gap: 40px; align-items: start; padding-top: 24px; }
.pc-name { font-family: var(--serif); font-weight: 300; font-size: clamp(44px, 5vw, 76px); line-height: 1; letter-spacing: -0.01em; }   /* the wordmark face: Cormorant Garamond 300 */
.pc-born { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px 22px; list-style: none; font-size: 16px; font-weight: 500; color: var(--bone-dim); }   /* secondary: facts about the birth, not the reading */
.pc-born li { display: inline-flex; align-items: center; gap: 8px; }
.pc-born .ic { display: inline-flex; color: var(--bone-mute); }   /* neutral: birth facts are not the sign */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pc-sub { margin-top: 30px; font-size: 13px; font-weight: 700; color: var(--bone-dim); padding-bottom: 8px; border-bottom: 1px solid rgb(var(--bone-rgb) / 0.22); }

.pc-panchang { margin-top: 28px; display: grid; grid-template-columns: repeat(3, auto); justify-content: start; border: 1px solid rgb(var(--bone-rgb) / 0.16); border-radius: 12px; }
.pc-panchang > div { padding: 10px 16px; display: grid; gap: 4px; border-left: 1px solid rgb(var(--bone-rgb) / 0.16); }
.pc-panchang > div:first-child { border-left: 0; }
.pc-panchang .pada { font-size: 12px; font-weight: 500; color: var(--bone-mute); }
.pc-panchang .v { font-size: 16px; font-weight: 600; color: var(--bone); white-space: nowrap; }

.pc-star { margin-top: 26px; display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 28px; align-items: center; }
.pc-moon-wrap { position: relative; width: 150px; aspect-ratio: 1; }
.pc-moon-wrap::before {   /* static halo, never animated (canvas paint rule) */
  content: ''; position: absolute; inset: -22%; border-radius: 50%;
  background: radial-gradient(closest-side, rgb(var(--bone-rgb) / 0.12), rgb(var(--bone-rgb) / 0.03) 60%, transparent);
}
.pc-moon { position: relative; width: 100%; height: 100%; display: block; }
.pc-sign { display: block; }
.pc-sign .pre { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 700; color: var(--bone-dim); margin-bottom: 6px; }
.pc-sign .pre .g { font-size: 22px; margin: 0; }
.pc-sign .line { display: flex; align-items: flex-start; gap: 0.16em; font-weight: 700; text-transform: uppercase; font-size: clamp(52px, 6.6vw, 104px); line-height: 0.9; letter-spacing: -0.04em; }
.pc-sign.long .line { font-size: clamp(40px, 4.8vw, 76px); }
.pc-sign .g {   /* the glyph sits on the cap line, a little smaller than the word */
  font-size: 0.56em; line-height: 1; margin-top: 0.3em; color: var(--r); font-weight: 400; letter-spacing: 0;
  font-family: "Noto Sans Symbols 2", "Segoe UI Symbol", var(--font-panel);
}
.pc-sign .word { display: flex; flex-direction: column; min-width: 0; }
.pc-sign { max-width: 100%; }
.pc-sign .line { max-width: 100%; }
.pc-sign .word .roll {   /* the sign in a calligraphic script (--font-script): one capital, a hand-drawn line */
  color: var(--r); font-family: var(--font-script); font-weight: 400; font-style: normal;
  text-transform: none; letter-spacing: 0; font-size: 1.4em; line-height: 1.05; padding: 0 0.2em 0.14em 0.04em;
}
.pc-sign .what { margin-top: 10px; font-size: 15px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--bone-dim); }
.pc-idtab { margin-top: 4px; display: grid; grid-template-columns: auto 1fr; align-items: baseline; column-gap: 24px; }
.pc-idtab > * { padding: 10px 0; border-top: 1px solid rgb(var(--bone-rgb) / 0.12); }
.pc-idtab > :nth-child(-n + 2) { border-top: 0; }
.pc-idtab .mc-label { min-width: 108px; }
.pc-idtab .big { font-weight: 700; font-size: clamp(30px, 3vw, 44px); line-height: 1; letter-spacing: -0.03em; color: var(--bone); }
.pc-idtab .big .g { color: var(--r); margin-right: 0.18em; font-weight: 400; }
.pc-idtab .mid { font-size: 17px; font-weight: 600; color: var(--bone); }
.pc-idtab .mid .sg .g, .pc-table .sg .g { color: var(--r); margin-right: 6px; font-size: 1.15em; }
.pc-idtab .mid .sg { color: color-mix(in oklab, var(--r) 80%, var(--bone)); }
.pc-idtab .mid small { font-weight: 500; color: var(--bone-mute); font-size: 13px; margin-left: 6px; }

.pc-d1 { display: grid; gap: 14px; justify-items: center; }
.pc-d1 .pc-chart { width: 100%; max-width: min(540px, 74vh); }
.pc-legend { text-align: center; line-height: 1.7; }
.pc-legend b { color: var(--bone); font-weight: 700; }

/* the chart's hover card: what you hovered, and one way to go there */
.pc-card {
  position: fixed; display: none; z-index: 60; width: 260px; padding: 16px 18px 18px; border-radius: 14px;
  background: rgb(var(--black-rgb) / 0.96); border: 1px solid rgb(var(--bone-rgb) / 0.22);
  box-shadow: 0 12px 32px rgb(var(--black-rgb) / 0.6); font-family: var(--font-panel); color: var(--bone);
}
.pc-card > b { display: block; font-size: 17px; font-weight: 700; }
.pc-card > .mc-label { display: block; margin-top: 2px; }
.pc-card dl { margin: 12px 0 14px; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 13.5px; }
.pc-card dt { color: var(--bone-mute); font-weight: 500; }
.pc-card dd { margin: 0; font-weight: 600; }
.pc-visit { padding: 8px 16px; }
.pc-visit .arr { transition: transform 0.25s ease; }
.pc-visit:hover .arr { transform: translateX(3px); }
.kundali a:hover .k-sign { fill: var(--coral); }

/* the rashi band: the person's colour and glyph behind their reading */
.pc-sec.pc-band {
  position: relative; overflow: hidden; margin-top: 112px; padding: 56px 48px 60px; border-radius: 22px;
  background: color-mix(in oklab, var(--r) 22%, var(--black));
  border: 1px solid color-mix(in oklab, var(--r) 45%, transparent);
}
.pc-band .glyph {
  position: absolute; right: -2%; top: 50%; transform: translateY(-50%); pointer-events: none;
  font-size: clamp(220px, 28vw, 420px); line-height: 1; color: var(--r); opacity: 0.18;
}
.pc-band > * { position: relative; }
.pc-band .mc-small { color: var(--bone); opacity: 0.85; }
.pc-sec { padding-top: 112px; }
.pc-sec > .mc-head { margin-bottom: 32px; }
.pc-read { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 48px; align-items: start; }
.pc-read .lede { font-family: var(--font-prose); font-weight: 300; font-size: clamp(21px, 1.8vw, 27px); line-height: 1.4; color: var(--bone); }

/* planets table: colour carries the reading — planet chip, sign glyph */
.pc-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.pc-table th { text-align: left; font-weight: 500; font-size: 13px; color: var(--bone-mute); padding: 0 16px 12px 0; }
.pc-table td { padding: 12px 16px 12px 0; border-top: 1px solid rgb(var(--bone-rgb) / 0.12); font-size: 16px; font-weight: 500; color: var(--bone-dim); }
.pc-table tr:hover td { background: rgb(var(--bone-rgb) / 0.03); }
.pc-table .chip {
  display: inline-flex; align-items: center; padding: 5px 12px; border-radius: var(--r-pill);
  font-weight: 700; font-size: 15px;
}
.pc-table .chip.asc { border: 1px solid rgb(var(--bone-rgb) / 0.4); color: var(--bone); }
.pc-table .r { font-size: 11px; font-weight: 700; color: var(--coral); margin-left: 6px; }
.pc-table .sg { color: var(--bone); }
.pc-table .sg .g { color: var(--r); margin-right: 6px; font-size: 1.15em; }
.pc-table .h { color: var(--bone); font-weight: 700; }
.pc-table .dig { margin-left: 10px; padding: 3px 9px; border-radius: var(--r-pill); font-size: 12px; font-weight: 700; border: 1px solid currentColor; }
.pc-table .dig-exalted { color: var(--el-earth); }
.pc-table .dig-debilitated { color: var(--coral); }
.pc-table .dig-moolatrikona, .pc-table .dig-own { color: var(--el-air); }
.pc-table .d9 { border-bottom: 1px dashed rgb(var(--bone-rgb) / 0.3); }
.pc-table .d9:hover { border-color: var(--coral); }
html { scroll-behavior: smooth; }
#d9 { scroll-margin-top: 80px; }
.pc-table .pada { color: var(--bone-mute); font-size: 13px; margin-left: 6px; }
.pc-table-wrap { overflow-x: auto; }

.pc-d9 { display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: 56px; align-items: center; }
.pc-tri { margin-top: 24px; display: grid; gap: 8px; font-size: 15px; font-weight: 500; color: var(--bone-dim); }
.pc-tri b { color: var(--bone); }
.pc-foot { padding-top: 96px; }

.pc-empty { min-height: 100svh; display: grid; place-content: center; gap: 24px; padding: 0 var(--page-pad-x); position: relative; z-index: 1; }

@media (max-width: 980px) {
  .pc-hero, .pc-read, .pc-d9 { grid-template-columns: 1fr; }
  .pc-panchang { grid-template-columns: repeat(3, auto); }
  .mc-cols { display: none; }
  .mc-locked { margin-bottom: 24px; }   /* the column heads are gone here, so the note would touch the list's top line */
  .mc-row { grid-template-columns: 1fr 1fr; gap: 6px 16px; }
  .mc-row .name { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  :root { --page-pad-x: 16px; }
  .pc-band { padding: 36px 20px; }
  .pc-star { grid-template-columns: 96px 1fr; gap: 16px; }
  .pc-moon-wrap { width: 96px; }
  .pc-panchang { grid-template-columns: repeat(2, auto); }
}

/* report status (report-ui.js): person page + the My Charts Report cell */
/* the chart page's report button, in the top bar (report-ui.js): a plain white
   pill; on hover the holo sheen of components/ui/holo-card.tsx washes over it
   (the pastel film, then one bright streak sliding across). While the report is
   being made it is an outline the progress fills from the left. */
.gtop .gtop-report { color: var(--ink); }   /* over the bar's own .gtop button colour */
.gtop-report { position: relative; overflow: hidden; isolation: isolate; cursor: pointer; border: 1px solid var(--bone); border-radius: var(--r-pill);
  background: var(--bone); color: var(--ink); padding: 8px 16px;
  font-family: var(--font-panel); font-weight: var(--role-button-weight); font-size: 12px; letter-spacing: var(--role-panel-track);
  transition: background-color .25s ease, color .25s ease, border-color .25s ease; }
.gtop-report::before, .gtop-report::after { content: ""; position: absolute; inset: -40%; pointer-events: none; }
.gtop-report::before { background: var(--holo-film); background-size: 300% 300%; background-position: 0% 50%; mix-blend-mode: multiply;
  opacity: 0; transition: opacity .35s ease, background-position 1.4s cubic-bezier(.22, 1, .3, 1); }
.gtop-report::after { background: var(--holo-streak); transform: translateX(-70%); transition: transform .9s cubic-bezier(.22, 1, .3, 1); }
@media (hover: hover) {   /* a tap would leave the sheen stuck on */
  .gtop-report:not(.busy):hover::before { opacity: .9; background-position: 100% 50%; }
  .gtop-report:not(.busy):hover::after { transform: translateX(70%); }
}
@media (prefers-reduced-motion: reduce) { .gtop-report::before, .gtop-report::after { transition: opacity .2s ease; } .gtop-report::after { display: none; } }
.gtop-report .t { position: relative; z-index: 1; }
.gtop-report .fill { position: absolute; inset: 0 auto 0 0; width: 0; background: rgb(var(--coral-rgb) / 0.42); transition: width .6s cubic-bezier(.22, 1, .3, 1); }
.gtop .gtop-report.busy { color: var(--bone); }
.gtop-report.busy { background: transparent; border-color: rgb(var(--bone-rgb) / 0.45); cursor: default; }
.gtop-report.busy::before, .gtop-report.busy::after { display: none; }
.gtop-report[disabled] { opacity: .6; }
/* ---- phones (≤600px): the person page and My Charts ---- */
@media (max-width: 600px) {
  /* the report button docks at the bottom centre, in thumb reach (purnika-nav.js's phone layout) */
  .gtop-report { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 46; white-space: nowrap;
    padding: 14px 24px; font-size: 14px; box-shadow: 0 10px 30px rgb(var(--black-rgb) / 0.5); }
  .gtop-report.busy { background: rgb(var(--black-rgb) / 0.92); }
  .pc { padding-bottom: 150px; }
  /* the chart card spreads across the screen under (or above) the part tapped */
  .pc-card { left: 12px; right: 12px; width: auto; }
  /* the planet table as two-line rows: the planet and its sign on the first,
     then house, degree, nakshatra and D9 under them — all six, no side-scroll */
  .pc-table thead { display: none; }
  .pc-table, .pc-table tbody { display: block; }
  .pc-table tr { display: flex; flex-wrap: wrap; align-items: center; column-gap: 14px; row-gap: 8px;
    padding: 14px 0; border-top: 1px solid rgb(var(--bone-rgb) / 0.12); }
  .pc-table tr::before { content: ''; order: 3; flex-basis: 100%; }   /* the line break between the two rows */
  .pc-table td { display: block; padding: 0; border: 0; }
  .pc-table td:nth-child(1) { order: 1; }
  .pc-table td:nth-child(3) { order: 2; margin-left: auto; text-align: right; }
  .pc-table td:nth-child(2), .pc-table td:nth-child(4), .pc-table td:nth-child(5), .pc-table td:nth-child(6) { order: 4; font-size: 14px; color: var(--bone-dim); }
  .pc-table td[data-label]::before { content: attr(data-label) " "; color: var(--bone-mute); font-weight: 500; }
  .pc-table .h { font-weight: 600; }
  .pc-table .dig { margin-left: 8px; }
  .pc-table tr:hover td { background: none; }
  .pc-table .chip, .pc-table .sg { position: relative; }
  .pc-table .chip::after { content: ''; position: absolute; inset: -9px -2px; }   /* a 44px tap on a 26px chip */
  .pc-table .sg:not(.d9)::after { content: ''; position: absolute; inset: -14px -4px; }   /* and on a 17px sign link */
  .pc-table .sg.d9 { position: static; pointer-events: none; border-bottom: 0; }   /* the jump to the D9 below: plain text here, it would crowd the sign link above it */
  .pc-card .ds-pill { min-height: 44px; }
  .pc-idtab .sg, .pc-idtab .mc-link { position: relative; }
  .pc-idtab .sg::after, .pc-idtab .mc-link::after { content: ''; position: absolute; inset: -13px -4px; }   /* the Lagna and lord links: a 44px tap */
  .mc-btn { min-height: 44px; }
  /* My Charts rows: the report action and Remove get a full finger's tap */
  .rc-btn { min-height: 44px; padding: 10px 16px; font-size: 13px; }
  .mc-row .rm { min-height: 44px; padding: 0 10px; font-size: 13px; }
}
.rc-btn { padding: 6px 14px; font-size: 12.5px; position: relative; z-index: 2; }
.rc-state { font-size: 13px; color: var(--bone-dim); } .rc-state.live { color: var(--coral); }
.mc-muted { color: var(--bone-mute); }
