/* TaraLumi web: the site shell (header, search palette, brand mark, footer, starfield), layout helpers, and the
   classes the existing pages use, restyled in the Nocturne look. Tokens, fonts and components live in nocturne.css,
   which every page links first. Colours here are tokens only, so both themes work (see the contrast note there).

   THE SHELL IS STAMPED, NOT HAND-EDITED. The <head> links, header and footer of every hand-written page sit between
   markers (<!--tl:head-->, <!--tl:header ...-->, <!--tl:footer ...-->) and are written by tools/site/stamp.mjs from
   the one copy in tools/site/shell.mjs. After changing the shell, or adding a page, run from the repository root:
       node tools/site/stamp.mjs
   The generated sign outlook pages use the same shell (tools/outlooks/build.ts; cd api && npm run outlooks). */

/* ---- Layout ---- */
.wrap { width: 100%; max-width: calc(var(--container) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
main { display: flex; flex-direction: column; gap: var(--section-pad); padding-top: var(--section-pad); padding-bottom: calc(var(--section-pad) + 16px); position: relative; }
.section { padding-block: var(--section-pad); }
.hero { display: flex; flex-direction: column; gap: 20px; padding-top: var(--hero-pad); padding-bottom: 12px; }
.stack { display: flex; flex-direction: column; gap: var(--gap, 16px); min-width: 0; }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--gap, 10px); }
[data-gap="4"] { --gap: 4px; }
[data-gap="6"] { --gap: 6px; }
[data-gap="8"] { --gap: 8px; }
[data-gap="10"] { --gap: 10px; }
[data-gap="12"] { --gap: 12px; }
[data-gap="14"] { --gap: 14px; }
[data-gap="16"] { --gap: 16px; }
[data-gap="20"] { --gap: 20px; }
[data-gap="24"] { --gap: 24px; }
[data-gap="32"] { --gap: 32px; }
[data-gap="48"] { --gap: 48px; }
/* Two columns that stack below about 760px. */
.split { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: var(--gap-split); align-items: start; }
.split.even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 760px) { .split, .split.even { grid-template-columns: minmax(0, 1fr); } }
/* Card grids: auto-fit, 8px apart (6px dense). */
.cards, .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: var(--gap-grid); }
.grid-dense { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr)); gap: var(--gap-grid-dense); }
.measure { max-width: 68ch; }
.center { text-align: center; }
.muted { color: var(--text-meta); }
.small { font-size: var(--fs-small); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -64px; z-index: 60; padding: 10px 14px; border-radius: var(--radius-md); background: var(--color-surface); color: var(--text-strong); box-shadow: var(--shadow-md); }
.skip:focus { top: 12px; }
html[data-mode="vedic"] [data-show="western"], html[data-mode="western"] [data-show="vedic"] { display: none !important; }

/* Entrance: [data-reveal] fades and rises once in view; [data-stagger] does it child by child (site.js). */
.reveal-pending { opacity: 0; transform: translateY(14px); }
.reveal-in { opacity: 1; transform: none; transition: opacity 0.48s var(--ease), transform 0.48s var(--ease); }
@media (prefers-reduced-motion: reduce) { .reveal-pending { opacity: 1; transform: none; } .reveal-in { transition: none; } }

/* The page itself is the night ground now; the old .night band only groups elements. */
body > .night { display: contents; }

/* ---- Starfield (assets/js/starfield.js): fixed, behind everything; the light theme shows its shooting stars only. ---- */
.starfield { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }

/* ---- Header ---- */
.site-header { position: sticky; top: 0; z-index: 30; background: var(--header-bg); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.site-header::after { content: ""; display: block; height: 1px; background: var(--rule-divider); }
.header-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; padding-block: 12px; }
.brand { display: inline-flex; align-items: center; gap: 9px; margin-right: auto; color: var(--text-strong); text-decoration: none; font: 400 19px/1 var(--font-heading); letter-spacing: -0.02em; }
.brand:hover { color: var(--text-strong); }
.wordmark { white-space: nowrap; }
.wordmark .dotless { position: relative; display: inline-block; line-height: 1; }
.wordmark .wm-star { position: absolute; left: calc(50% - 0.19em); top: -0.2em; width: 0.38em; height: 0.38em; overflow: visible; fill: var(--color-accent-300); }
.header-tools { display: flex; align-items: center; gap: 10px; }
.search-btn { gap: 8px; min-height: 36px; padding: 6px 12px; font-weight: 400; }
.search-btn .icon { width: 15px; height: 15px; }
.search-key { font: 400 11px/1 var(--font-body); color: var(--text-faint); }
.city-btn { min-height: 36px; padding: 6px 12px; font-weight: 400; max-width: 16em; }
.city-btn .city-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.header-tools .seg > button { min-height: 34px; padding: 5px 12px; }
/* Light / dark: shows the theme it switches to (assets/js/theme.js, site.js). */
.theme-btn { width: 36px; min-height: 36px; padding: 0; }
.theme-btn .icon { width: 16px; height: 16px; }
:root[data-theme="light"] .theme-btn .to-light, :root:not([data-theme="light"]) .theme-btn .to-dark { display: none; }
.header-tools .tag { align-self: center; }
.site-nav { order: 9; flex: 1 1 100%; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px; font-size: 14px; }
.site-nav a { color: var(--text-strong); text-decoration: none; padding-block: 2px; white-space: nowrap; transition: color var(--dur) var(--ease); }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--color-accent); }
/* Readings stands apart from the free tools: last in the row, outlined in the accent. On phones the row scrolls, so
   it stays pinned at the right edge, over the links that scroll under it. */
.site-nav a[href="/readings/"] { margin-left: auto; padding: 3px 12px; border-radius: 999px; color: var(--text-accent); box-shadow: inset 0 0 0 1px var(--color-accent-700); }
.site-nav a[href="/readings/"]:hover, .site-nav a[href="/readings/"][aria-current="page"] { color: var(--text-strong); background: var(--fill-selected); box-shadow: var(--ring-selected); }
.city-panel { padding-bottom: 16px; }
.city-field { max-width: 420px; }
@media (max-width: 720px) {
  .site-nav { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(-1 * var(--gutter)); padding: 0 var(--gutter) 2px; }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav a[href="/readings/"] { position: sticky; right: 0; flex: none; background: var(--color-bg); }
  .site-nav a[href="/readings/"]:hover, .site-nav a[href="/readings/"][aria-current="page"] { background: linear-gradient(var(--fill-selected), var(--fill-selected)), var(--color-bg); }
  .site-nav a[href="/readings/"]::before { content: ""; position: absolute; right: 100%; top: 0; bottom: 0; width: 28px; background: linear-gradient(to right, transparent, var(--color-bg)); pointer-events: none; }
  .site-nav a[href="/readings/"]::after { content: ""; position: absolute; left: 100%; top: -4px; bottom: -4px; width: calc(var(--gutter) + 1px); background: var(--color-bg); pointer-events: none; }
  .search-btn .search-label, .search-btn .search-key { display: none; }
  .search-btn { width: 36px; padding: 0; }
  .header-tools { gap: 8px; }
  .city-btn { max-width: 9em; }
}
/* Phones: one row for the brand and the tools. The city button keeps only its pin (the page shows the city). */
@media (max-width: 520px) {
  .header-bar { column-gap: 12px; }
  .brand { font-size: 17px; gap: 7px; }
  .header-tools { gap: 6px; }
  .city-btn { width: 36px; padding: 0; }
  .city-btn .city-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .header-tools .seg > button, .header-tools .seg > a { min-height: 34px; padding-inline: 9px; font-size: 12.5px; }
  .header-tools .tag { padding-inline: 8px; }
  .vo-from { display: none; } /* "Vedic astrology" on phones */
}
@media (max-width: 360px) { .wordmark { display: none; } }

/* ---- Brand mark (assets/js/mark.js). The span holds a static SVG at rest until the script takes over. ---- */
.tl-mark { display: inline-block; flex: none; width: 30px; height: 30px; color: var(--mark-ink); line-height: 0; }
.tl-mark svg { display: block; width: 100%; height: 100%; overflow: visible; }
.tl-mark[data-size="18"] { width: 18px; height: 18px; }
.tl-mark[data-size="44"] { width: 44px; height: 44px; }
.tl-mark[data-size="64"] { width: 64px; height: 64px; }
.tl-mark[data-size="88"] { width: 88px; height: 88px; }
.tl-mark[data-size="160"] { width: 160px; height: 160px; }
.tl-mark[data-size="320"] { width: min(320px, 70vw); height: min(320px, 70vw); }
.app-tile { display: grid; place-items: center; width: 112px; height: 112px; border-radius: 26px; background: radial-gradient(110px 90px at 72% 8%, var(--color-section-ghost), transparent 78%), var(--color-section); box-shadow: var(--shadow-md); }

/* ---- Search palette (assets/js/search.js) ---- */
dialog.search-dialog { width: min(580px, calc(100% - 32px)); margin: 12vh auto auto; padding: 0; gap: 0; overflow: hidden; }
.search-top { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.search-top .icon { width: 20px; height: 20px; }
.search-input { flex: 1; min-width: 0; padding: 4px 0; border: 0; background: none; color: var(--text-strong); font: 400 17px/1.3 var(--font-body); caret-color: var(--color-accent); }
.search-input:focus-visible { outline: none; }
.search-input::placeholder { color: var(--text-faint); }
.search-input::-webkit-search-cancel-button { display: none; }
.search-sep { height: 1px; background: var(--color-divider); }
.search-results { list-style: none; margin: 0; max-height: 52vh; overflow: auto; padding: 6px; }
.search-results a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius-md); color: var(--text-strong); text-decoration: none; }
.search-results a:hover, .search-results a.is-active, .search-results a:focus-visible { background: var(--fill-selected); outline-offset: -2px; }
.search-results .icon { width: 18px; height: 18px; }
.search-results .r-label { flex: 1; min-width: 0; font-size: 15px; }
.search-results .r-kind { font-size: 12px; color: var(--text-meta); }
.search-empty { padding: 16px 12px; font-size: 14px; color: var(--text-meta); }

/* ---- Footer ---- */
.site-footer { position: relative; margin-top: 0; }
.footer-band { background: var(--section-glow), var(--color-section); color: var(--text-strong); }
.footer-band-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 32px clamp(32px, 6vw, 88px); padding-block: clamp(40px, 5vw, 64px); }
.footer-band .kicker { color: var(--color-accent-200); }
.footer-note { margin-top: 12px; font-size: 18px; line-height: 1.5; color: var(--text-strong); }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 40px; padding-block: 36px 48px; font-size: 13px; line-height: 1.6; color: var(--text-meta); }
.footer-copy { flex: 1 1 360px; max-width: 62ch; display: flex; flex-direction: column; gap: 6px; }
.footer-lead { color: var(--text-strong); font-size: 14px; }
.footer-base a { text-decoration: none; }

/* ---- Headings and section heads ---- */
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 16px; }
.section-head h2 { font-size: clamp(24px, 2.6vw, 32px); }
.section-head .tag { align-self: center; }
.serif-h { font: var(--font-heading-weight) clamp(24px, 2.6vw, 32px)/1.2 var(--font-heading); letter-spacing: -0.03em; color: var(--text-strong); }
h2.label { font: 400 var(--fs-label)/1.3 var(--font-body); letter-spacing: 0.06em; }

/* ---- Panels, rows and notes ---- */
.panel { background: var(--color-surface); box-shadow: var(--shadow-sm); border-radius: var(--radius-lg); padding: clamp(18px, 2.5vw, 28px); min-width: 0; }
.panel.tight { padding: 4px 20px; }
.card .value { font-size: 22px; }
.card .facts { display: flex; flex-direction: column; gap: 4px; font-size: 15px; }
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; background: var(--rule) no-repeat bottom / 100% 1px; color: var(--text-strong); }
.rows li:last-child { background: none; }
.rows .v { font-feature-settings: "tnum" 1; text-align: right; color: var(--text-meta); }
.note { border-radius: var(--radius-md); padding: 12px 14px; font-size: 14px; color: var(--text-body); background: color-mix(in srgb, var(--color-accent-900) 60%, transparent); box-shadow: inset 0 0 0 1px var(--color-accent-800); }
.error { border-radius: var(--radius-md); padding: 12px 14px; font-size: 15px; color: var(--dem-ink); background: var(--dem-bg); }
.hint { font-size: 13px; color: var(--text-meta); }
.readout { font-size: 13px; color: var(--text-meta); }
.method { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px 40px; font-size: 14px; }

/* ---- Forms used by birth-form.js, place-search.js and the tools ---- */
/* Date of birth as day, month and year (birth-form.js): large native controls instead of the browser's small calendar. */
.date-field { margin: 0; padding: 0; border: 0; }
.date-field legend { padding: 0; margin-bottom: 6px; font-size: 13px; color: var(--text-meta); }
.date-parts { display: grid; grid-template-columns: minmax(72px, 0.8fr) minmax(120px, 1.6fr) minmax(84px, 1fr); gap: 10px; }
.time-field { max-width: 220px; }
form .row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.check { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; font-size: 15px; color: var(--text-body); cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--color-accent); }
.boxes { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; border: 0; margin: 0; padding: 0; min-width: 0; }
.boxes legend, .datebox legend { font-size: 14px; font-weight: 500; color: var(--text-strong); padding: 0; margin-bottom: 4px; }
.field input.w2 { width: 4.2em; } .field input.w4 { width: 6em; }
.datebox { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.datebox:disabled { opacity: 0.45; }
.ampm { display: inline-flex; min-height: 44px; overflow: hidden; border: 1px solid var(--color-divider); border-radius: var(--radius-md); }
.ampm button { min-width: 52px; border: 0; background: transparent; color: var(--text-body); cursor: pointer; }
.ampm button + button { border-left: 1px solid var(--color-divider); }
.ampm button[aria-pressed="true"] { color: var(--color-accent); box-shadow: inset 0 0 0 1px var(--color-accent); border-radius: calc(var(--radius-md) - 1px); }
.date-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
/* The old solid buttons become Nocturne outlines. */
.primary, .primary-light, .primary-link {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 20px;
  border: 1px solid var(--color-accent); border-radius: var(--radius-md); background: transparent;
  font: 500 15px/1.2 var(--font-body); color: var(--color-accent); text-decoration: none; cursor: pointer;
  transition: background-color var(--dur) var(--ease);
}
.primary:hover, .primary-light:hover, .primary-link:hover { color: var(--color-accent); background: color-mix(in srgb, var(--color-accent) 12%, transparent); }
.primary:disabled { opacity: 0.45; cursor: default; }
.ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 6px 14px;
  border: 1px solid var(--color-divider); border-radius: var(--radius-md); background: transparent;
  font: 400 14px/1.2 var(--font-body); color: var(--text-body); cursor: pointer;
}
.ghost:hover { background: var(--fill-hover); color: var(--text-strong); }
/* Old-style segmented buttons (birth chart D1/D9/D10 and the like) share .seg from nocturne.css. */
.stack > .seg, .wrap-seg { align-self: flex-start; }
.wrap-seg { flex-wrap: wrap; }
.seg-night { align-self: center; }
/* City and place search: an ARIA combobox */
.suggest { position: absolute; top: 100%; left: 0; right: 0; z-index: 25; margin: 4px 0 0; padding: 4px; list-style: none; background: var(--color-surface); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); max-height: 320px; overflow-y: auto; }
.suggest li { padding: 10px 12px; border-radius: 6px; cursor: pointer; color: var(--text-strong); font-size: 15px; }
.suggest li[aria-selected="true"], .suggest li:hover { background: var(--fill-selected); }
.suggest .where { display: block; font-size: 13px; color: var(--text-meta); }
.place-facts { font-size: 13px; color: var(--text-meta); font-feature-settings: "tnum" 1; }

/* ---- Tables (legacy markup: a table inside .table-wrap) ---- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius-md); background: var(--color-surface); box-shadow: var(--shadow-sm); padding: 4px 8px; }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table-wrap th, .table-wrap td { text-align: left; padding: 10px 12px; white-space: nowrap; }
.table-wrap th { font-weight: 400; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-meta); }
.table-wrap thead tr, .table-wrap tr:has(> th) { background: var(--rule-divider) no-repeat bottom / 100% 1px; }
.table-wrap tbody tr { background: var(--rule) no-repeat bottom / 100% 1px; }
.table-wrap tbody tr:last-child { background: none; }
.table-wrap td { color: var(--text-body); font-feature-settings: "tnum" 1; }
.table-wrap td:first-child { color: var(--text-strong); }
tr.current td { background: var(--fill-selected); color: var(--text-strong); }
tr.group th { background: color-mix(in srgb, var(--color-accent-900) 50%, transparent); }
td.num { font-feature-settings: "tnum" 1; }
.doc td { white-space: normal; }
@media (max-width: 560px) { .table-wrap th, .table-wrap td { padding-inline: 6px; } .table-wrap td:first-child { white-space: normal; } }
/* Wide tables marked "stacks" become one block per row on a phone (labels from data-label, set in format.js). */
@media (max-width: 560px) {
  table.stacks thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table.stacks, table.stacks tbody, table.stacks tr { display: block; }
  table.stacks tr { padding: 12px 6px; }
  table.stacks td { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 3px 0; white-space: normal; text-align: right; }
  table.stacks td::before { content: attr(data-label); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-meta); text-align: left; }
  table.stacks td:first-child { justify-content: flex-start; padding-bottom: 6px; font-size: 16px; font-weight: 500; }
  table.stacks td:first-child::before { content: none; }
  table.stacks td:empty { display: none; }
}

/* ---- Tags used as Calculated / Interpretation labels sit beside headings (nocturne.css styles .tag) ---- */

/* ---- Interpretation: always Newsreader italic ---- */
.reading { font-family: var(--font-interp); font-style: italic; font-size: 19px; line-height: 1.5; color: var(--text-strong); }
.reading p, .reading li { max-width: 68ch; }
.reading h3 { font: var(--font-heading-weight) 20px/1.3 var(--font-heading); font-style: normal; letter-spacing: -0.02em; margin-top: 8px; }
.passage { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px; border-radius: var(--radius-md); background: var(--color-surface); box-shadow: var(--shadow-sm); }
.passage.supportive { background: var(--sup-bg); box-shadow: none; }
.passage.supportive .reading, .passage.supportive .tone { color: var(--sup-ink); }
.passage.demanding { background: var(--dem-bg); box-shadow: none; }
.passage.demanding .reading, .passage.demanding .tone { color: var(--dem-ink); }
.passage .tone { font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; }

/* ---- Long-form pages ---- */
.doc > section { max-width: 760px; }
.doc p, .doc li { font-size: 17px; line-height: 1.65; }
.doc p.small { font-size: 14px; }
.doc-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.doc-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px 24px; }

/* ---- Lists of tools and readings ---- */
.tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); gap: var(--gap-grid); }
.tools a, .tools div { display: flex; flex-direction: column; gap: 4px; min-height: 76px; padding: 16px 18px; border-radius: var(--radius-md); background: var(--color-surface); box-shadow: var(--shadow-sm); text-decoration: none; color: var(--text-body); }
.tools a { transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.tools a:hover { transform: var(--lift); box-shadow: var(--shadow-sm), var(--ring-selected); color: var(--text-body); }
.tools a strong { font-size: 16px; font-weight: 500; color: var(--text-strong); }
.tools div { background: transparent; box-shadow: inset 0 0 0 1px var(--color-divider); color: var(--text-meta); }
.offers a { min-height: 132px; }
.offers a::after { content: "See your calculations \2192"; margin-top: auto; padding-top: 10px; font-size: 13px; color: var(--color-accent); }
.offers .eyebrow { font-size: 11px; }
.readings-band { display: grid; gap: 16px; padding: clamp(20px, 3vw, 32px); border-radius: var(--radius-lg); background: var(--color-surface); box-shadow: var(--shadow-feature); }
.readings-band .tools a { background: color-mix(in srgb, var(--color-bg) 55%, var(--color-surface)); }
.offers-pair { align-items: stretch; }
@media (prefers-reduced-motion: reduce) { .tools a, a.card { transition: none; } .tools a:hover, a.card:hover { transform: none; } }

/* ---- Today and panchang: date line, strips, week ---- */
.dateline { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-accent); }
.dateline time { color: var(--text-accent); }
.strip, .night-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--gap-grid); }
.strip > div, .night-strip > div { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border-radius: var(--radius-md); background: var(--color-surface); box-shadow: var(--shadow-sm); }
.strip .big, .night-strip .big { font: var(--font-heading-weight) 22px/1.25 var(--font-heading); letter-spacing: -0.02em; color: var(--text-strong); font-feature-settings: "tnum" 1; }
.strip-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 520px) { .strip-col { grid-template-columns: minmax(0, 1fr); } }
.week { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: var(--gap-grid-dense); }
.week > div { display: flex; flex-direction: column; gap: 2px; padding: 14px; border-radius: var(--radius-md); background: var(--color-surface); box-shadow: var(--shadow-sm); }
.week > div.today { background: var(--fill-selected); box-shadow: var(--ring-selected); }
.week .d { font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-accent); }
.week .w { font: var(--font-heading-weight) 18px/1.3 var(--font-heading); letter-spacing: -0.02em; color: var(--text-strong); }
.week-col { grid-template-columns: minmax(0, 1fr); }
.week-col > div { flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; }
.hero-visuals { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: var(--gap-split); align-items: center; }
@media (max-width: 860px) { .hero-visuals { grid-template-columns: minmax(0, 1fr); } }
.legend { display: flex; flex-wrap: wrap; gap: 10px 22px; list-style: none; margin: 0; padding: 0; font-size: 13px; color: var(--text-meta); }
.legend .key { display: inline-block; width: 14px; height: 8px; border-radius: 2px; margin-right: 8px; vertical-align: middle; }
.key.rahu { background: var(--dem-ink); }
.key.other { background: color-mix(in srgb, var(--color-neutral-400) 45%, transparent); }
.key.sup { background: var(--sup-bg); box-shadow: inset 0 0 0 1px var(--sup-ink); }
.key.dem { background: var(--dem-bg); box-shadow: inset 0 0 0 1px var(--dem-ink); }
.key.neu { background: var(--color-neutral-800); box-shadow: inset 0 0 0 1px var(--color-neutral-500); }
.key.retro { height: 0; border-top: 2.5px dashed var(--color-accent); }
.legend-paper { color: var(--text-meta); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.chip { display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 7px; border-radius: 999px; background: var(--color-surface); box-shadow: var(--shadow-sm); font-size: 14px; color: var(--text-strong); }
.chip svg { flex: none; }
.chip-r { font-size: 11px; padding: 1px 7px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--color-accent); color: var(--color-accent); }
.chips button.remove { border: 0; background: transparent; color: inherit; cursor: pointer; padding: 0 0 0 6px; font-size: 16px; }
.moon-line { display: inline-flex; align-items: center; gap: 8px; }
.sky-defs { position: absolute; width: 0; height: 0; }

/* ---- Drawings from sky.js and chart-svg.js (colours are tokens; see those files) ---- */
.day-arc, .sky-wheel { width: 100%; height: auto; display: block; }
.sky-wheel { max-width: 500px; margin: 0 auto; }
.day-arc text, .sky-wheel text, .house-ring text, .ni-night text { font-family: var(--font-body); }
.arc-now { font-size: 15px; font-weight: 500; fill: var(--text-strong); }
.arc-label { font-size: 14px; fill: var(--text-meta); }
@media (max-width: 520px) { .arc-now { font-size: 28px; } .arc-label { font-size: 26px; } }
.wheel-sign text { font: 500 11px var(--font-body); letter-spacing: 1.2px; fill: var(--text-meta); text-anchor: middle; dominant-baseline: middle; }
.wheel-sign text.on { fill: var(--color-accent); }
.wheel-body { font: 500 12px var(--font-body); fill: var(--text-strong); }
.wheel-centre { font: 400 15px var(--font-body); fill: var(--text-meta); }
.wheel-caption { font: 11px var(--font-body); letter-spacing: 1px; fill: var(--text-faint); }
@media (max-width: 520px) { .wheel-sign text { font-size: 15px; } .wheel-body { font-size: 16px; } .wheel-centre { font-size: 19px; } .wheel-caption { font-size: 14px; } }
.wheel-house text { font: 500 12px var(--font-body); fill: var(--text-faint); text-anchor: middle; dominant-baseline: middle; }
.wheel-asc, .ni-asc { font: 600 11px var(--font-body); letter-spacing: 1px; fill: var(--color-accent); text-anchor: middle; dominant-baseline: middle; }
.ni-night { width: 100%; max-width: 460px; height: auto; display: block; margin: 0 auto; }
/* The Western wheel in the night-sky style (chart-svg.js wheel). */
.chart-box svg.wh-night { width: 100%; max-width: 460px; height: auto; display: block; margin: 0 auto; }
.wh-night text { font-family: var(--font-body); }
.wh-night .wh-sign { font-size: 10px; font-weight: 500; letter-spacing: 1px; fill: var(--color-neutral-400); }
.wh-night .wh-house { font-size: 11px; fill: var(--color-neutral-500); }
.wh-night .wh-body { font-size: 11px; font-weight: 500; fill: var(--color-neutral-200); }
/* On a phone the wheel is drawn at about three quarters size, so its words are set larger to read at 11-12px. */
@media (max-width: 520px) { .wh-night .wh-sign { font-size: 14px; letter-spacing: 0.5px; } .wh-night .wh-house { font-size: 15px; } .wh-night .wh-body { font-size: 15px; } .wh-night .ni-asc { font-size: 14px; } }
/* A larger, invisible place to tap round each planet; the outline still follows the planet's own box. */
.pl-hit { fill: transparent; stroke: none; }
/* The night kundli's sign numbers and ASC, larger on a phone, where the chart is drawn at about 0.84 size. */
@media (max-width: 520px) { .ni-night .ni-sign { font-size: 14px; } .ni-night .ni-asc { font-size: 13px; } }
/* The Western birth-chart wheel's sign names and house numbers, larger on a phone. */
@media (max-width: 520px) { .zodiac-wheel .zw-sign { font-size: 11px; letter-spacing: 0.3px; } .zodiac-wheel .zw-house { font-size: 10px; } .zodiac-wheel .zw-body { font-size: 10.5px; } }
/* The controls beside the charts are a comfortable size to tap on a touch screen. */
@media (pointer: coarse) {
  .sn-switch .seg > button, [aria-label="Divisional chart"] > button { min-height: 44px; min-width: 48px; }
  .asp-switch label { min-height: 44px; }
  .bc-howto summary { padding-block: 12px; }
}
.ni-sign { font: 500 12px var(--font-body); fill: var(--text-faint); text-anchor: middle; dominant-baseline: middle; }
.ni-body { font: 500 14px var(--font-body); fill: var(--text-strong); dominant-baseline: middle; }
.house-ring { width: 100%; max-width: 400px; height: auto; display: block; margin: 0 auto; }
/* Reading a kundli (chart-svg.js kundliGuide / houseHits): a house lights with its row in the list. */
.k-hit { fill: var(--color-accent); fill-opacity: 0; transition: fill-opacity var(--dur) var(--ease); }
.k-hit.is-on { fill-opacity: 0.24; stroke: var(--color-accent-300); stroke-width: 2; stroke-linejoin: round; }
.k-guide { margin-top: 20px; text-align: left; }
.k-how { font-size: 14px; line-height: 1.6; color: var(--text-body); }
.k-how strong { color: var(--text-strong); font-weight: 600; }
.k-title { margin-top: 20px; }
.k-list { list-style: none; margin: 8px 0 0; padding: 0; }
.k-row { display: grid; grid-template-columns: 56px 112px minmax(0, 1fr); gap: 10px; align-items: center; padding: 8px 6px; border-radius: var(--radius-sm); background: var(--rule) no-repeat bottom / 100% 1px; transition: background-color var(--dur) var(--ease); }
.k-row.is-on { background-color: var(--fill-hover); }
.k-n { display: flex; flex-direction: column; line-height: 1.2; font-weight: 600; color: var(--text-strong); font-feature-settings: "tnum" 1; }
.k-lagna { font-size: 10px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-accent); }
.k-sign { display: flex; flex-direction: column; line-height: 1.25; font-weight: 500; color: var(--text-strong); }
.k-en { font-size: 12px; font-weight: 400; color: var(--text-meta); }
.k-bodies { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 14px; color: var(--text-body); }
.k-body { display: inline-flex; align-items: center; gap: 6px; }
.k-body .planet { width: 20px; height: 20px; }
.k-r { margin-left: 2px; color: var(--text-accent); text-decoration: none; }
.k-none { font-size: 13px; color: var(--text-faint); }
.k-asp-by { flex-basis: 100%; font-size: 12px; color: var(--text-meta); }
@media (prefers-reduced-motion: reduce) { .k-hit, .k-row { transition: none; } }
/* Planet details (chart-svg.js wirePlanetTips): every planet is a button; its details show in a strip under the
   chart, never over it, so the lit planet, house and aspects stay in view. */
.pl { cursor: pointer; outline: none; }
.pl-pad { fill: transparent; stroke: none; }
.pl:hover .pl-pad, .pl:focus-visible .pl-pad, .pl.is-open .pl-pad { stroke: var(--color-accent-300); stroke-width: 1.5; }
.pl-tip { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 2px 10px; max-width: 460px; min-height: 58px; margin: 10px auto 0; padding: 8px 12px; border: 1px solid var(--color-accent-600); border-radius: var(--radius-sm); background: var(--color-surface); font: 400 13px/1.45 var(--font-body); color: var(--text-body); text-align: center; }
.pl-tip.is-empty { border-style: dashed; border-color: var(--color-divider); color: var(--text-faint); }
.pl-tip strong { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; color: var(--text-strong); }
.pl-tip strong .planet { width: 20px; height: 20px; flex: none; }
/* Aspect lines: hidden until "Show aspects" is on or their planet is open; the open planet's lines stand out. */
.asp-line { display: none; pointer-events: none; }
.asp-lines .asp-line { stroke: var(--color-accent-300); stroke-width: 1.4; stroke-linecap: round; }
.show-aspects .asp-line, .asp-line.is-lit { display: inline; }
/* The kundli's arrows fade as a whole (opacity), so their start dots and heads fade with them. */
.show-aspects .asp-lines .asp-line { opacity: 0.6; }
.asp-lines .asp-line.is-lit { opacity: 1; stroke-width: 2; }
.show-aspects.has-lit .asp-line:not(.is-lit) { stroke-opacity: 0.12; }
.show-aspects.has-lit .asp-lines .asp-line:not(.is-lit) { stroke-opacity: 1; opacity: 0.12; }
.asp-switch { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; text-align: left; }
.asp-switch label { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--text-strong); cursor: pointer; }
.asp-switch input { width: 18px; height: 18px; accent-color: var(--color-accent); }
.asp-note { font-size: 12px; }
.asp-switch[hidden] { display: none; }
.chart-box { display: flex; flex-direction: column; gap: 12px; align-items: center; }
.chart-box svg { width: 100%; max-width: 440px; height: auto; }
.chart-box .lines { fill: none; stroke: var(--text-meta); stroke-width: 1; }
.chart-box .gold { fill: none; stroke: var(--color-accent); stroke-width: 1.5; }
.chart-box text { fill: var(--text-strong); font-family: var(--font-body); }
.chart-box .signno { fill: var(--text-meta); font-size: 12px; }
.chart-box .planet { font-size: 14px; font-weight: 500; }
.chart-box .asc { fill: var(--text-meta); font-size: 12px; font-weight: 500; }
.world { width: 100%; height: auto; display: block; background: var(--color-neutral-900); border-radius: var(--radius-md); }
.world .grid { stroke: var(--color-divider); stroke-width: 0.6; fill: none; }
.world .equator { stroke: color-mix(in srgb, var(--color-text) 28%, transparent); }
.world .city { fill: var(--text-strong); }
.world text { font: 500 9px var(--font-body); fill: var(--text-strong); }
.world .line { fill: none; stroke-width: 1.4; }

/* ---- Birth chart and paid-report previews ---- */
.chart-hero, .night.chart-hero { display: flex; flex-direction: column; gap: 24px; padding: clamp(20px, 3vw, 32px); border-radius: var(--radius-lg); background: var(--color-surface); box-shadow: var(--shadow-feature); }
.chart-summary { font: var(--font-heading-weight) clamp(24px, 3.2vw, 36px)/1.25 var(--font-heading); letter-spacing: -0.03em; color: var(--text-strong); max-width: 900px; }
.chart-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
@media (max-width: 860px) { .chart-grid { grid-template-columns: minmax(0, 1fr); } }
.chart-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap-grid); }
@media (max-width: 520px) { .chart-cards { grid-template-columns: minmax(0, 1fr); } }
.chart-hero .card, .compare-card { background: color-mix(in srgb, var(--color-bg) 50%, var(--color-surface)); }
.facts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--gap-grid); }
.planet-cell { display: inline-flex; align-items: center; gap: 8px; }
.dasha-bar { position: relative; display: flex; height: 56px; overflow: hidden; border-radius: var(--radius-md); background: var(--color-surface); box-shadow: var(--shadow-sm); }
.dasha-seg { flex: 0 0 var(--w); min-width: 0; display: flex; flex-direction: column; justify-content: center; padding: 0 6px; font-size: 13px; color: var(--text-strong); overflow: hidden; white-space: nowrap; box-shadow: inset -1px 0 0 var(--line); }
.dasha-seg .yrs { font-size: 11px; color: var(--text-meta); }
.dasha-seg.now { background: var(--fill-selected); box-shadow: inset 0 -3px 0 var(--color-accent); }
.dasha-now { position: absolute; top: 0; bottom: 0; left: var(--x); width: 2px; background: var(--color-accent); }
.score-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.score-big { font: var(--font-heading-weight) clamp(44px, 8vw, 72px)/1 var(--font-heading); letter-spacing: -0.03em; color: var(--text-strong); font-feature-settings: "tnum" 1; }
.score-of { font-size: 20px; color: var(--text-meta); }
.koota-points { display: grid; grid-template-columns: 84px minmax(60px, 140px); align-items: center; gap: 10px; }
.people { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap-grid); }
@media (max-width: 520px) { .people { grid-template-columns: minmax(0, 1fr); } }
.compare { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--gap-grid); }
.compare-card { display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.compare-pair { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 10px; align-items: center; }
.compare-side { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.compare-side strong { font: var(--font-heading-weight) 20px/1.2 var(--font-heading); color: var(--text-strong); }
.compare-arrow { color: var(--color-accent); font-size: 22px; }
.same { color: var(--text-meta); }
.changed { color: var(--color-accent); font-weight: 500; }
.days { list-style: none; margin: 0; padding: 0; }
.days li { display: grid; grid-template-columns: 110px minmax(0, 1fr) 150px; gap: 14px; align-items: center; padding: 12px 0; background: var(--rule) no-repeat bottom / 100% 1px; }
.days .when { font-weight: 500; color: var(--text-strong); }
.days .none { color: var(--text-meta); }
.days details { grid-column: 1 / -1; font-size: 14px; color: var(--text-meta); }
@media (max-width: 600px) { .days li { grid-template-columns: minmax(0, 1fr); gap: 4px; } }
.score-bar { height: 6px; border-radius: 3px; background: var(--color-neutral-800); overflow: hidden; }
.score-bar span { display: block; height: 100%; width: var(--w); background: var(--color-accent); border-radius: 3px; }
.top-rank { font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-accent); }

/* ---- Sign outlooks (tools/outlooks/build.ts) ---- */
.tl-wrap { padding: 12px 16px; border-radius: var(--radius-md); background: var(--color-surface); box-shadow: var(--shadow-sm); }
.tl { width: 100%; height: auto; display: block; }
.tl text { font-family: var(--font-body); }
.tl-tick { font-size: 12px; fill: var(--text-meta); }
.tl-grid { stroke: var(--line); }
.tl-name { font-size: 15px; font-weight: 500; fill: var(--text-strong); }
.tl-bar { stroke-width: 1; }
.tl-bar.neutral { fill: var(--color-neutral-800); stroke: var(--color-neutral-500); } .tl-label.neutral { fill: var(--color-neutral-200); }
.tl-bar.supportive { fill: var(--sup-bg); stroke: var(--sup-ink); } .tl-label.supportive { fill: var(--sup-ink); }
.tl-bar.demanding { fill: var(--dem-bg); stroke: var(--dem-ink); } .tl-label.demanding { fill: var(--dem-ink); }
.tl-label { font-size: 12px; font-weight: 500; }
.tl-retro { stroke: var(--color-accent); stroke-width: 2.5; stroke-dasharray: 5 4; }
.tl-until { font-size: 12px; fill: var(--text-meta); }
.tl-today { stroke: var(--color-accent); stroke-width: 1.5; } .tl-today-label { font-size: 11px; font-weight: 500; fill: var(--color-accent); }
.tl-list { display: none; list-style: none; margin: 0; padding: 0; }
.tl-list li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; background: var(--rule) no-repeat bottom / 100% 1px; font-size: 15px; }
@media (max-width: 700px) { .tl-wrap { display: none; } .tl-list { display: block; } }
.dates { list-style: none; margin: 0; padding: 0; }
.dates li { display: grid; grid-template-columns: 24px 120px minmax(0, 1fr); gap: 12px; align-items: center; padding: 12px 0; background: var(--rule) no-repeat bottom / 100% 1px; }
.dates time { font-weight: 500; color: var(--text-strong); font-feature-settings: "tnum" 1; }
.pager { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 15px; }
.sign-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); gap: var(--gap-grid); }
.sign-tile { display: flex; align-items: center; gap: 14px; padding: 10px 14px 10px 10px; border-radius: var(--radius-md); background: var(--color-surface); box-shadow: var(--shadow-sm); text-decoration: none; color: var(--text-strong); transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.sign-tile:hover { transform: var(--lift); box-shadow: var(--shadow-sm), var(--ring-selected); color: var(--text-strong); }
.sign-tile > span { display: flex; flex-direction: column; line-height: 1.3; }
.sign-tile strong { font-weight: 500; }
.sign-tile em { font-style: normal; font-size: 13px; color: var(--text-accent); }
.sign-tile .el { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-meta); margin-top: 2px; }
.sign-tile .sign-art { flex: none; border-radius: 10px; }
/* The constellation squares were drawn with night-sky literals in the page; repaint them from tokens. */
.sign-art > rect:first-of-type { fill: var(--color-accent-900); }
.sign-art g[stroke] { stroke: var(--color-accent-500); }
.sign-art circle[r="9"] { fill: var(--color-accent-500); }
.sign-art circle:not([r="9"]) { fill: var(--color-accent-200); }
.sign-art radialGradient stop { stop-color: var(--color-accent-700); }
@media (prefers-reduced-motion: reduce) { .sign-tile { transition: none; } .sign-tile:hover { transform: none; } }

@media (prefers-reduced-motion: no-preference) {
  .fade { animation: fade 300ms var(--ease); }
  @keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
}
.zodiac-wheel .asp-line.is-lit { stroke: var(--color-accent-300); stroke-width: 2; stroke-opacity: 1; }
/* Sign names in the kundli: Sanskrit unless the "Sign names" switch says English (chart-svg.js signNameSwitch). */
.k-sn-en { display: none; }
.sign-names-en .k-sn-en { display: inline; }
.sign-names-en .k-sn-sa { display: none; }
.sn-switch { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 12px; text-align: left; }
.sn-label { font-size: 14px; font-weight: 500; color: var(--text-strong); }
.sn-switch[hidden] { display: none; }

/* ---- A pointer to a written reading beside the free calculation it reads (reading.js nudge()). ---- */
.rd-nudge { display: flex; align-items: center; gap: 14px; margin-top: 16px; padding: 12px 16px; border-radius: var(--radius-md); background: var(--color-surface); box-shadow: inset 0 0 0 1px var(--color-accent-700); color: var(--text-strong); text-decoration: none; transition: background-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.rd-nudge:hover { color: var(--text-strong); background: var(--fill-selected); box-shadow: var(--ring-selected); }
.rd-nudge-planet { flex: none; width: 40px; height: 40px; }
.rd-nudge-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rd-nudge-k { font-size: 12px; letter-spacing: 0.04em; color: var(--text-accent); }
.rd-nudge-t { font-size: 15px; font-weight: 500; }
.rd-nudge-s { font-size: 13.5px; line-height: 1.45; color: var(--text-body); }
.rd-nudge > .icon { flex: none; color: var(--text-accent); }
@media (pointer: coarse) { .rd-nudge { min-height: 56px; } }

/* ---- "Tell me when readings open" (notify.js). ---- */
.notify { display: flex; flex-direction: column; gap: 10px; max-width: 560px; }
.notify-title { margin: 0; font-size: 15px; font-weight: 500; color: var(--text-strong); }
.notify-row { display: flex; flex-wrap: wrap; gap: 8px; }
.notify-row .input { flex: 1 1 220px; min-width: 0; min-height: 44px; }
.notify-row .btn { flex: none; min-height: 44px; }
.notify-news { min-height: 0; font-size: 14px; }
.notify-small { margin: 0; }
.notify-status { margin: 0; font-size: 14px; color: var(--text-body); }
.notify-status:empty { display: none; }
.notify-status.error { padding: 8px 12px; border-radius: var(--radius-md); color: var(--dem-ink); background: var(--dem-bg); }
.notify-done { display: flex; align-items: flex-start; gap: 10px; margin: 0; font-size: 15px; color: var(--text-strong); }
.notify-done .icon { flex: none; margin-top: 2px; color: var(--text-accent); }
[data-notify] { margin-top: 20px; }
