/* ═══════════════════════════════════════════════════════════════════════
   Horā होरा — Daily Supervisory Dashboard (signed-in home hero)
   Native reimplementation of the Claude-Design mockup ("Vedic Hora
   Dashboard.dc.html").

   Presentation invariants — changing any of these breaks the design:
     · panels are TRANSLUCENT glass; the drifting ground must tint through
     · bar/column size always encodes a real value
     · three data colours only — green / amber / red — banded by value
     · every card ends with a read line + CTA, baseline-aligned by margin-top:auto
   ═══════════════════════════════════════════════════════════════════════ */

.vhd {
  --rag-g: #2e8060; --rag-g-t: rgba(46,128,96,.14);
  --rag-a: #bd8420; --rag-a-t: rgba(189,132,32,.16);
  --rag-r: #b8483a; --rag-r-t: rgba(184,72,58,.14);
  --vhd-ink: var(--color-text, #1b2635);
  --vhd-accent: var(--color-accent, #a4581f);
  --vhd-hair: rgba(27,38,53,.10);
  --vhd-hair-soft: rgba(27,38,53,.08);
  --vhd-track: rgba(27,38,53,.09);
  position: relative;
  display: flex; flex-direction: column; gap: 16px;
  margin: 0 0 34px;
  isolation: isolate;
}
.vhd .num { font-variant-numeric: tabular-nums; }
.vhd .dev { opacity: .5; font-weight: 400; margin-left: .35em; }

/* ── Liquid ground ──────────────────────────────────────────────────────
   Bigger, tighter, more opaque than before: at 46% / blur(46px) / .55 the
   blobs were invisible behind the cards and every panel read as flat white. */
.vhd-ground { position: absolute; inset: -60px -28px; z-index: -1; overflow: hidden; border-radius: 32px; pointer-events: none; }
.vhd-blob { position: absolute; width: 62%; padding-top: 62%; border-radius: 50%; filter: blur(30px); opacity: .8; }
.vhd-blob-1 { top: -14%; left: -10%; background: radial-gradient(circle, rgba(255,203,166,.85), transparent 68%); animation: vhd-drift 23s ease-in-out infinite; }
.vhd-blob-2 { top: -6%; right: -12%; background: radial-gradient(circle, rgba(186,196,255,.8), transparent 68%); animation: vhd-drift 27s ease-in-out infinite reverse; }
.vhd-blob-3 { bottom: -22%; left: 16%; background: radial-gradient(circle, rgba(168,231,238,.8), transparent 68%); animation: vhd-drift 31s ease-in-out infinite; }
.vhd-blob-4 { bottom: -14%; right: 6%; background: radial-gradient(circle, rgba(255,214,232,.7), transparent 68%); animation: vhd-drift 19s ease-in-out infinite reverse; }
@keyframes vhd-drift { 0%, 100% { transform: translate3d(0,0,0) scale(1); } 50% { transform: translate3d(3%, -4%, 0) scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .vhd-blob { animation: none !important; } }

/* ── Glass surface ──────────────────────────────────────────────────────
   Fill lowered (was .8→.38) so the ground genuinely tints the cards. The
   inset highlight is what makes an edge read as glass — never remove it. */
.vhd .glass {
  position: relative;
  background: linear-gradient(150deg, rgba(255,255,255,.74), rgba(255,255,255,.32));
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  border: 1px solid rgba(255,255,255,.8);
  box-shadow: 0 10px 30px rgba(31,50,80,.10), inset 0 1px 0 rgba(255,255,255,.92);
  border-radius: 18px;
  overflow: hidden;
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .vhd .glass { background: linear-gradient(150deg, rgba(255,255,255,.96), rgba(255,255,255,.88)); }
}
.vhd-sheen::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background: linear-gradient(115deg, transparent 38%, rgba(255,255,255,.55) 48%, transparent 60%);
  transform: translateX(-120%) skewX(-18deg);
  animation: vhd-sheen 9s ease-in-out infinite;
}
@keyframes vhd-sheen { 0% { transform: translateX(-120%) skewX(-18deg); } 55%, 100% { transform: translateX(320%) skewX(-18deg); } }
@media (prefers-reduced-motion: reduce) { .vhd-sheen::before { animation: none !important; content: none; } }

/* ── Shared bar primitive ───────────────────────────────────────────── */
.vhd-bar-track { position: relative; display: block; height: 7px; border-radius: 999px; background: var(--vhd-track); overflow: hidden; }
.vhd-bar-tall { height: 8px; }
.vhd-bar-fill { display: block; height: 100%; border-radius: 999px; }
.vhd-bar-fill.rag-g { background: linear-gradient(90deg,#4fb489,#2e8060); box-shadow: 0 1px 4px rgba(46,128,96,.4); }
.vhd-bar-fill.rag-a { background: linear-gradient(90deg,#e8b451,#bd8420); box-shadow: 0 1px 4px rgba(189,132,32,.4); }
.vhd-bar-fill.rag-r { background: linear-gradient(90deg,#e0705f,#b8483a); box-shadow: 0 1px 4px rgba(184,72,58,.4); }
.rag-g-bg { background: linear-gradient(90deg,#4fb489,#2e8060); }
.rag-a-bg { background: linear-gradient(90deg,#e8b451,#bd8420); }
.rag-r-bg { background: linear-gradient(90deg,#e0705f,#b8483a); }
.rag-n-bg { background: linear-gradient(90deg,#7f8fa6,#24384f); }
.rag-g-text { color: var(--rag-g); }
.rag-a-text { color: var(--rag-a); }
.rag-r-text { color: var(--rag-r); }

/* three positioned bands over one track (Rāhu KPI) */
.vhd-bands > i { position: absolute; top: 0; height: 100%; width: 7%; display: block; }

/* ── Pills / tags ───────────────────────────────────────────────────── */
.vhd-pill { font-size: .76rem; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--vhd-hair); background: rgba(255,255,255,.5); }
.vhd-pill-ghost { color: rgba(27,38,53,.65); }
.vhd-pill.rag-g { background: var(--rag-g-t); color: var(--rag-g); border-color: rgba(46,128,96,.35); }
.vhd-pill.rag-a { background: var(--rag-a-t); color: var(--rag-a); border-color: rgba(189,132,32,.35); }
.vhd-pill.rag-r { background: var(--rag-r-t); color: var(--rag-r); border-color: rgba(184,72,58,.35); }
.vhd .tag {
  display: inline-block; font-size: .66rem; font-weight: 700; letter-spacing: .05em;
  padding: 3px 9px; border-radius: 999px; text-transform: uppercase; white-space: nowrap;
  background: rgba(36,56,79,.08); color: rgba(27,38,53,.66);
}
.vhd .tag.rag-g { background: var(--rag-g-t); color: var(--rag-g); }
.vhd .tag.rag-a { background: var(--rag-a-t); color: var(--rag-a); }
.vhd .tag.rag-r { background: var(--rag-r-t); color: var(--rag-r); }

/* ── Topbar ─────────────────────────────────────────────────────────── */
.vhd-top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 14px 18px; }
.vhd-top-l { display: flex; align-items: center; gap: 12px; }
.vhd-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 50%; flex: none;
  background: linear-gradient(145deg, #4a6b95, #24384f); color: #fff; font-weight: 700;
  box-shadow: 0 6px 16px rgba(36,56,79,.32), inset 0 1px 0 rgba(255,255,255,.4);
}
.vhd-hello { margin: 0; font-weight: 600; font-size: 1.06rem; color: var(--vhd-ink); }
.vhd-meta { margin: 0; font-size: .82rem; color: rgba(27,38,53,.6); }
.vhd-top-r { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.vhd-top-stat { text-align: right; line-height: 1.35; }
.vhd-top-stat-l { display: block; font-size: .64rem; letter-spacing: .1em; text-transform: uppercase; color: rgba(27,38,53,.5); }
.vhd-top-stat-v { display: block; font-size: .86rem; color: var(--vhd-ink); }
.vhd-clock { font-weight: 700; font-size: 1.15rem; color: var(--vhd-ink); }

/* ── Greeting card ──────────────────────────────────────────────────── */
.vhd-greet { display: grid; grid-template-columns: 1fr minmax(200px, 260px); gap: 24px; padding: 22px 26px; }
.vhd-greet-main { position: relative; z-index: 2; }
.vhd-greet-kicker { margin: 0 0 8px; display: flex; align-items: center; gap: 10px; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--vhd-accent); font-weight: 600; }
.vhd-greet-title { margin: 0 0 10px; font-size: 1.45rem; line-height: 1.24; color: var(--vhd-ink); max-width: 30ch; }
.vhd-greet-body { margin: 0 0 14px; color: rgba(27,38,53,.74); max-width: 62ch; line-height: 1.6; }
.vhd-greet-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.vhd-cta {
  display: inline-block; padding: 10px 20px; border-radius: 11px;
  background: linear-gradient(140deg, rgba(255,255,255,.92), rgba(255,255,255,.55));
  border: 1px solid rgba(255,255,255,.85);
  color: var(--vhd-accent); text-decoration: none; font-weight: 600; font-size: .88rem;
  box-shadow: 0 6px 18px rgba(164,88,31,.2);
  transition: transform .14s ease, box-shadow .14s ease;
}
.vhd-cta:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(164,88,31,.28); }
.vhd-source { font-size: .74rem; color: rgba(27,38,53,.5); }
.vhd-onething { position: relative; z-index: 2; border-left: 1px solid var(--vhd-hair); padding-left: 22px; display: flex; flex-direction: column; justify-content: center; gap: 7px; }
.vhd-onething-label { margin: 0; font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: rgba(27,38,53,.5); }
.vhd-onething-val { margin: 0; font-weight: 700; font-size: 1.05rem; line-height: 1.3; color: var(--vhd-ink); }
.vhd-onething-window { margin: 0; font-size: .8rem; color: rgba(27,38,53,.6); }
.vhd-onething-bar { margin-top: 2px; height: 8px; }
@media (max-width: 760px) { .vhd-greet { grid-template-columns: 1fr; } .vhd-onething { border-left: none; border-top: 1px solid var(--vhd-hair); padding-left: 0; padding-top: 14px; } }

/* ── KPI row — donut + three metric cards ───────────────────────────── */
.vhd-kpis { display: grid; grid-template-columns: minmax(280px, 1.1fr) repeat(3, minmax(180px, 1fr)); gap: 14px; }
@media (max-width: 1100px) { .vhd-kpis { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px)  { .vhd-kpis { grid-template-columns: 1fr; } }

.vhd-kpi { padding: 16px 18px; display: flex; flex-direction: column; gap: 9px; justify-content: center; }
.vhd-kpi-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.vhd-kpi-label { font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: rgba(27,38,53,.55); }
.vhd-kpi-note { display: block; font-size: .7rem; letter-spacing: normal; text-transform: none; color: rgba(27,38,53,.5); margin-top: 2px; }
.vhd-kpi-big { font-weight: 700; font-size: 1.5rem; line-height: 1.05; color: var(--vhd-ink); }
.vhd-kpi-cap { font-size: .76rem; color: rgba(27,38,53,.6); }

.vhd-kpi-gauge { flex-direction: row; align-items: center; gap: 16px; padding: 16px; }
.vhd-donut { width: 112px; height: 112px; flex: none; filter: drop-shadow(0 4px 10px rgba(31,50,80,.15)); }
.vhd-donut-num { font-size: 40px; font-weight: 700; fill: var(--vhd-ink); }
.vhd-gauge-side { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.vhd-gauge-verdict { margin: 0 0 4px; font-size: 1.08rem; font-weight: 700; line-height: 1.2; color: var(--vhd-ink); }
.vhd-legend { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 3px; font-size: .76rem; color: rgba(27,38,53,.7); }
.vhd-legend li { display: flex; align-items: center; gap: 7px; }

.vhd-dot, .vhd-legend i { flex: none; display: block; width: 8px; height: 8px; border-radius: 50%; }
.vhd-dot.rag-g, .vhd-legend i.rag-g { background: var(--rag-g); }
.vhd-dot.rag-a, .vhd-legend i.rag-a { background: var(--rag-a); }
.vhd-dot.rag-r, .vhd-legend i.rag-r { background: var(--rag-r); }

/* ── Horā-cakra ─────────────────────────────────────────────────────── */
.vhd-hora { padding: 18px 22px 16px; }
.vhd-hora-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 14px; margin-bottom: 4px; }
.vhd-hora-head h3 { margin: 0; font-size: 1.02rem; color: var(--vhd-ink); }
.vhd-hora-now { margin: 0; font-size: .82rem; color: rgba(27,38,53,.65); min-height: 1.2em; }
.vhd-hora-legend { margin: 0 0 0 auto; padding: 0; list-style: none; display: flex; gap: 14px; font-size: .62rem; letter-spacing: .07em; text-transform: uppercase; color: rgba(27,38,53,.6); }
.vhd-hora-legend li { display: flex; align-items: center; gap: 5px; }
.vhd-hora-legend i { display: block; width: 9px; height: 9px; border-radius: 3px; }

.vhd-hora-chart { position: relative; }
/* Reserved band for the "Now" caption. A margin would collapse and the
   caption would collide with the heading. */
.vhd-hora-gutter { height: 22px; }
.vhd-hora-bars { display: flex; align-items: flex-end; height: 112px; gap: 3px; }
.vhd-hora-bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; min-width: 0; }
.vhd-hora-score { font-size: .58rem; color: rgba(27,38,53,.5); }
/* HEIGHT carries the score — equal-height chips are the classic mis-build. */
.vhd-hora-bar { display: block; width: 100%; border-radius: 6px 6px 3px 3px; }
.vhd-hora-bar-col.vhd-hora-now .vhd-hora-bar { outline: 2px solid var(--vhd-accent); outline-offset: 2px; }

.vhd-hora-foot { display: flex; gap: 3px; margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--vhd-hair); }
.vhd-hora-foot-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 0; }
.vhd-hora-abbr { font-size: .68rem; font-weight: 700; color: var(--vhd-ink); }
.vhd-hora-foot-col.is-night .vhd-hora-abbr { color: rgba(27,38,53,.45); font-weight: 400; }
.vhd-hora-time { font-size: .54rem; color: rgba(27,38,53,.42); white-space: nowrap; }

.vhd-hora-marker {
  position: absolute; top: 24px; bottom: 32px; left: 0; width: 2px;
  background: linear-gradient(180deg, #c9761f, rgba(201,118,31,.25));
  pointer-events: none; z-index: 2; transition: left 1s linear;
}
.vhd-hora-marker::before {
  content: ''; position: absolute; top: -5px; left: -4px; width: 10px; height: 10px;
  border-radius: 50%; background: #c9761f; box-shadow: 0 0 0 4px rgba(201,118,31,.18);
}
.vhd-hora-marker-label {
  position: absolute; top: -21px; left: 50%; transform: translateX(-50%);
  font-size: .58rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--vhd-accent); white-space: nowrap;
}
.vhd-hora-cardfoot { display: flex; align-items: center; gap: 16px; margin-top: 14px; padding-top: 11px; border-top: 1px solid var(--vhd-hair-soft); }
.vhd-hora-cardfoot .vhd-card-line { flex: 1; margin: 0; }
@media (max-width: 640px) {
  .vhd-hora-score, .vhd-hora-time { display: none; }
  .vhd-hora-abbr { font-size: .54rem; }
}

/* ── Module grid ────────────────────────────────────────────────────── */
.vhd-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; }
.vhd-card { padding: 16px 18px; display: flex; flex-direction: column; gap: 9px; }
.vhd-card-accent { position: absolute; top: 0; left: 0; right: 0; height: 3px; z-index: 2; }
.vhd-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.vhd-card-head h4 { margin: 0; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: rgba(27,38,53,.6); font-weight: 600; }
.vhd-card-meta { font-size: .7rem; color: rgba(27,38,53,.5); }
.vhd-card-big { margin: 0; font-weight: 700; font-size: 1.4rem; line-height: 1.1; color: var(--vhd-ink); }
.vhd-card-micro { margin: 0; font-size: .74rem; color: rgba(27,38,53,.58); }
.vhd-card-line { margin: 0; font-size: .8rem; line-height: 1.5; color: rgba(27,38,53,.72); }
.vhd-card-rating { display: flex; align-items: center; gap: 9px; margin-top: 4px; }
.vhd-card-rating .vhd-bar-track { flex: 1; }
.vhd-card-rating .vhd-bar-num { font-size: .78rem; font-weight: 600; color: rgba(27,38,53,.65); min-width: 1.4em; text-align: right; }

/* margin-top:auto baseline-aligns every CTA across a row */
.vhd-card-foot { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--vhd-hair-soft); display: flex; flex-direction: column; gap: 7px; }
.vhd-card-cta {
  align-self: flex-start; font-size: .68rem; letter-spacing: .09em; text-transform: uppercase;
  color: var(--vhd-accent); text-decoration: none; font-weight: 600;
  border-bottom: 1px solid rgba(164,88,31,.45); padding-bottom: 2px;
}
.vhd-card-cta:hover { border-bottom-color: var(--vhd-accent); }
.vhd a:focus-visible, .vhd button:focus-visible { outline: 2px solid var(--vhd-accent); outline-offset: 2px; }

/* horizontal label · bar · value rows (life areas, tridoṣa) */
.vhd-bars { display: flex; flex-direction: column; gap: 7px; }
.vhd-bar-row { display: grid; grid-template-columns: 62px 1fr 26px; align-items: center; gap: 9px; font-size: .76rem; }
.vhd-bar-lbl { color: rgba(27,38,53,.68); }
.vhd-bar-num { color: rgba(27,38,53,.6); text-align: right; }

/* vertical graha-bala columns — deliberately a DIFFERENT primitive from the
   rows above, so gochara and life-areas do not read as the same card */
.vhd-grahas { display: flex; align-items: flex-end; gap: 5px; height: 60px; }
.vhd-graha { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 3px; height: 100%; min-width: 0; }
.vhd-graha i { display: block; width: 100%; border-radius: 4px 4px 2px 2px; }
.vhd-graha span { font-size: .62rem; color: rgba(27,38,53,.7); }

/* daśā rows — four columns so neither the level nor the lord truncates */
.vhd-dasa { display: flex; flex-direction: column; gap: 8px; }
.vhd-dasa-row { display: grid; grid-template-columns: 84px 56px 1fr 64px; align-items: center; gap: 8px; font-size: .74rem; }
.vhd-dasa-lvl { color: rgba(27,38,53,.6); }
.vhd-dasa-lord { font-weight: 700; color: var(--vhd-ink); }
.vhd-dasa-ends { color: rgba(27,38,53,.5); text-align: right; }
@media (max-width: 400px) { .vhd-dasa-row { grid-template-columns: 70px 48px 1fr; } .vhd-dasa-ends { display: none; } }

/* manas sparkline */
.vhd-spark { width: 100%; height: 34px; display: block; }

/* phase segments (sāḍhe sātī, śani cycle) */
.vhd-phases { display: flex; gap: 2px; height: 9px; }
.vhd-phases > i { display: block; height: 100%; }
.vhd-phases > i:first-child { border-radius: 5px 0 0 5px; }
.vhd-phases > i:last-child { border-radius: 0 5px 5px 0; }

/* śubha saṅketa */
.vhd-stars { font-size: .9rem; color: var(--rag-g); letter-spacing: 1px; }
.vhd-sanketa-row { display: flex; align-items: center; gap: 8px; }
.vhd-sanketa-swatch { width: 26px; height: 26px; border-radius: 50%; box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 3px 8px rgba(31,50,80,.18); }
.vhd-anka { margin-left: auto; text-align: right; line-height: 1.1; }
.vhd-anka b { display: block; font-size: 1.3rem; color: var(--vhd-ink); }
.vhd-anka em { font-style: normal; font-size: .58rem; letter-spacing: .1em; color: rgba(27,38,53,.5); }

/* ── Windows row ────────────────────────────────────────────────────── */
.vhd-windows { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.vhd-win-col { padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.vhd-win-col h4 { margin: 0; font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; }
.vhd-win-col ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: .82rem; color: rgba(27,38,53,.72); }
.vhd-win-col li { display: flex; align-items: center; gap: 9px; }
.vhd-win-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; }
.vhd-win-dot.rag-g { background: var(--rag-g); box-shadow: 0 0 0 3px rgba(46,128,96,.14); }
.vhd-win-dot.rag-r { background: var(--rag-r); box-shadow: 0 0 0 3px rgba(184,72,58,.14); }
.vhd-win-label { flex: 1; }
.vhd-win-range { color: rgba(27,38,53,.55); }

/* ── Executive summary ──────────────────────────────────────────────── */
.vhd-summary { padding: 18px 20px; }
.vhd-summary h4 { margin: 0 0 10px; font-size: 1.05rem; font-weight: 600; color: var(--vhd-ink); }
.vhd-summary ul { margin: 0; padding: 0; list-style: none; font-size: .84rem; color: rgba(27,38,53,.76); display: flex; flex-direction: column; gap: 9px; }
.vhd-summary li { display: flex; align-items: flex-start; gap: 10px; line-height: 1.5; }
.vhd-summary .vhd-dot { margin-top: 6px; }
.vhd-summary .vhd-dot.rag-g { box-shadow: 0 0 0 3px rgba(46,128,96,.14); }
.vhd-summary .vhd-dot.rag-a { box-shadow: 0 0 0 3px rgba(189,132,32,.14); }
.vhd-summary .vhd-dot.rag-r { box-shadow: 0 0 0 3px rgba(184,72,58,.14); }

.vhd-disclaimer { font-size: .74rem; color: rgba(27,38,53,.5); margin: 0; }
.vhd-disclaimer a { color: rgba(27,38,53,.5); }
