/* Ristewale Horoscope 3.9.11 — mobile reading comfort and theme contrast.
   Only presentation rules. All astrology calculations and content stay unchanged. */

/* 1. The entire homepage card is a link: do not let theme underline
   rules turn every sentence into a link treatment. */
.rwhw.rwhw-hub a.rwhw-hub-card,
.rwhw.rwhw-hub a.rwhw-hub-card:hover,
.rwhw.rwhw-hub a.rwhw-hub-card:focus-visible,
.rwhw.rwhw-hub a.rwhw-hub-card :is(h2,p,small,b,i,span) {
  text-decoration: none !important;
  text-decoration-line: none !important;
}
.rwhw.rwhw-hub a.rwhw-hub-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 310px;
  padding: clamp(24px,3.5vw,36px) !important;
  color: var(--text-primary);
}
.rwhw.rwhw-hub .rwhw-hub-icon {flex: 0 0 auto;margin-bottom:clamp(20px,3vw,27px)}
.rwhw.rwhw-hub .rwhw-hub-card h2 {font-size:clamp(29px,3.8vw,36px);line-height:1.16;margin:10px 0 15px}
.rwhw.rwhw-hub .rwhw-hub-card p {margin:0;color:var(--text-secondary);line-height:1.72;max-width:47ch}
.rwhw.rwhw-hub .rwhw-hub-card > b {
  position: static !important;left:auto !important;bottom:auto !important;
  display:inline-flex;align-items:center;gap:9px;
  margin-top:auto;padding-top:22px;line-height:1.5;
  color:var(--accent);text-decoration:none !important;
}
.rwhw.rwhw-hub .rwhw-hub-card > b i {margin:0;transition:transform .22s ease}
.rwhw.rwhw-hub .rwhw-hub-card:hover > b i {transform:translateX(4px)}
.rwhw.rwhw-hub .rwhw-hub-card:focus-visible{outline:3px solid var(--accent)!important;outline-offset:4px}

/* 2. Restore comfortable breathing room in every recurring reading card.
   The original full-page `article` selector is also corrected at its source. */
body.rwhw-fullpage .rwhw :is(
  .rwhw-key-theme-grid article,.rwhw-atglance-grid article,
  .rwhw-transit-reading-grid article,.rwhw-transit-focus-grid article,
  .rwhw-dasha-now-grid article,.rwhw-focus-houses article,
  .rwhw-panchanga-grid article,.rwhw-karaka-grid article,
  .rwhw-tech-grid article,.rwhw-deep-summary-grid article,
  .rwhw-saved-card,.rwhw-premium-chapter
){margin-top:revert-layer;margin-bottom:revert-layer}
.rwhw .rwhw-key-theme-grid article {padding:22px 24px !important;min-height:0}
.rwhw .rwhw-key-theme-grid article > span {margin-bottom:13px}
.rwhw .rwhw-key-theme-grid article > b {line-height:1.4;margin-bottom:8px}
.rwhw .rwhw-key-theme-grid article > small {margin-top:6px;line-height:1.65}
.rwhw .rwhw-transit-reading-grid article {padding:clamp(22px,3vw,28px) !important}
.rwhw .rwhw-transit-reading-grid h4 {line-height:1.35;margin:0 0 14px}
.rwhw .rwhw-transit-reading-grid p {line-height:1.8;margin:0 0 12px}
.rwhw .rwhw-placement-reading {padding:clamp(22px,3vw,30px) !important}
.rwhw .rwhw-placement-reading header {padding:0 0 18px;margin:0 0 20px}
.rwhw .rwhw-placement-reading h4 {margin:25px 0 10px;line-height:1.4}
.rwhw .rwhw-placement-reading p {line-height:1.85;margin:10px 0 19px}
.rwhw .rwhw-placement-connection {padding-left:clamp(17px,3vw,23px)}
.rwhw .rwhw-section-copy {padding-inline:clamp(4px,2vw,12px)}
.rwhw .rwhw-simple-heading {margin-bottom:24px}
.rwhw .rwhw-simple-heading h2 {line-height:1.25}
.rwhw :is(.rwhw-long-reading,.rwhw-premium-reading,.rwhw-dasha-selected){padding:clamp(22px,3vw,29px)!important}
.rwhw .rwhw-readable-copy p {line-height:1.85}

/* 3. Premium actions must wrap with a real gap, never visually collide. */
.rwhw .rwhw-premium-reading :is(a.rwhw-inline-button,button[data-premium-reading],button[data-refresh-membership]) {
  display:inline-flex;align-items:center;justify-content:center;
  position:relative;vertical-align:middle;
  min-height:46px;padding:11px 17px;
  margin:4px 12px 10px 0 !important;
  max-width:100%;line-height:1.4;
  border-radius:10px;text-align:center;
  text-decoration:none !important;white-space:normal;
}
.rwhw .rwhw-premium-reading button[data-refresh-membership]{
  color:var(--accent)!important;background:var(--surface)!important;
  border:1px solid var(--border)!important;
}
.rwhw .rwhw-premium-reading :is(a.rwhw-inline-button,button[data-premium-reading]) {
  color:var(--text-primary)!important;background:var(--surface-secondary)!important;
  border:1px solid var(--border)!important;
}
.rwhw .rwhw-premium-reading .rwhw-premium-result:not(:empty){clear:both;margin-top:18px}

/* 4. The two old blue CTA buttons inherit the site's existing cream/indigo
   palette and never overflow the card. */
.rwhw .rwhw-life-actions {display:flex;flex-wrap:wrap;gap:12px;margin:23px 0 5px;max-width:100%}
.rwhw .rwhw-life-actions > button:not(.rwhw-study-link) {
  display:flex;justify-content:center;align-items:center;text-align:center;
  flex:1 1 230px;width:auto;max-width:100%;min-width:0;
  min-height:54px;margin:0!important;padding:14px 18px!important;
  border-radius:12px!important;border:1px solid var(--border)!important;
  color:var(--text-primary)!important;background:var(--surface-secondary)!important;
  font-weight:650;line-height:1.4;box-shadow:0 3px 12px #0000000a;
}
.rwhw .rwhw-life-actions > button:not(.rwhw-study-link):hover {
  background:color-mix(in srgb,var(--accent) 12%,var(--surface))!important;
  border-color:var(--accent)!important;
}

/* 5. Palette-aware readable cards, links, buttons and form controls. */
.rwhw :is(.rwhw-premium-reading,.rwhw-dasha-level,.rwhw-dasha-selected,
  .rwhw-transit-reading-grid article,.rwhw-placement-reading) {
  background:var(--surface)!important;
  color:var(--text-primary)!important;
  border-color:var(--border)!important;
}
.rwhw .rwhw-premium-reading {--text-primary:inherit;--text-secondary:inherit;background:linear-gradient(135deg,var(--surface),color-mix(in srgb,var(--accent) 5%,var(--surface)))!important}
.rwhw .rwhw-premium-reading :is(h3,h4,p,div,b,strong),
.rwhw .rwhw-placement-reading :is(h3,h4,b,strong),
.rwhw .rwhw-transit-reading-grid :is(h4,b,strong){color:var(--text-primary)!important}
.rwhw .rwhw-premium-reading :is(.rwhw-kicker,small){color:var(--accent-secondary)!important}
.rwhw .rwhw-premium-reading .rwhw-readable-copy p,
.rwhw .rwhw-transit-reading-grid p,
.rwhw .rwhw-placement-reading p,
.rwhw .rwhw-placement-reading header>span:last-child,
.rwhw .rwhw-dasha-selected p,
.rwhw .rwhw-dasha-level small {color:var(--text-secondary)!important}
.rwhw .rwhw-placement-index a,
.rwhw .rwhw-dasha-period-grid button {background:var(--surface-secondary)!important;color:var(--text-primary)!important;border-color:var(--border)!important}
.rwhw .rwhw-dasha-period-grid button.is-selected {background:color-mix(in srgb,var(--accent) 14%,var(--surface))!important;border-color:var(--accent)!important}
.rwhw .rwhw-study-link {color:var(--accent)!important;background:var(--surface)!important;border-color:var(--border)!important;text-decoration:none!important}
.rwhw .rwhw-simple-nav button {line-height:1.45;transition:background-color .3s ease,color .3s ease,border-color .3s ease}
.rwhw .rwhw-simple-nav button.active,
.rwhw .rwhw-simple-nav button[aria-selected="true"]{background:var(--surface-secondary)!important;color:var(--text-primary)!important}
.rwhw :is(input,select,textarea) {color:var(--text-primary);background:var(--surface);border-color:var(--border)}
.rwhw :is(input,textarea)::placeholder {color:var(--text-secondary);opacity:.85}

/* 6. Smooth palette transition. Static high-contrast text/controls remain legible
   while an independent sky canvas gently dissolves to the new scene. */
.rwhw, .rwhw :is(.rwhw-pane,.rwhw-card,.rwhw-premium-reading,.rwhw-hub-card,
  .rwhw-placement-reading,.rwhw-transit-reading-grid article,.rwhw-key-theme-grid article,
  .rwhw-simple-nav,.rwhw-simple-nav button,.rwhw-theme-toggle,.rwhw-life-actions button,
  .rwhw-dasha-level,.rwhw-dasha-selected,.rwhw-atglance-grid article){
  transition:background-color .65s ease,color .65s ease,border-color .65s ease,box-shadow .3s ease;
}
.rwhw .rwhw-theme-fade {opacity:0;transition:opacity .8s ease-in-out;pointer-events:none!important}
.rwhw .rwhw-nav-scroll-target{display:block;height:0;margin:0;padding:0;overflow:hidden}
.rwhw :is(#rwhw-chart-results,.rwhw-result-tabs) {scroll-margin-top:8px}
.rwhw .rwhw-pane {scroll-margin-top:100px}

@media(max-width:620px){
  .rwhw.rwhw-hub a.rwhw-hub-card {padding:25px 22px !important;min-height:0}
  .rwhw.rwhw-hub .rwhw-hub-icon {margin-bottom:25px}
  .rwhw.rwhw-hub .rwhw-hub-card h2 {font-size:clamp(29px,9vw,36px)}
  .rwhw.rwhw-hub .rwhw-hub-card > b {padding-top:24px}
  .rwhw .rwhw-key-theme-grid article{padding:22px 22px!important;min-height:0}
  .rwhw .rwhw-transit-reading-grid article,
  .rwhw .rwhw-placement-reading{padding:22px 20px!important}
  .rwhw .rwhw-transit-reading-grid h4 {font-size:19px}
  .rwhw .rwhw-placement-reading header h3 {font-size:23px}
  .rwhw .rwhw-premium-reading {padding:22px 19px!important}
  .rwhw .rwhw-premium-reading :is(a.rwhw-inline-button,button[data-premium-reading],button[data-refresh-membership]) {
    display:flex;width:100%;margin:0 0 12px!important;
  }
  .rwhw .rwhw-life-actions {display:grid;grid-template-columns:minmax(0,1fr);gap:12px;padding:0 2px}
  .rwhw .rwhw-life-actions > button:not(.rwhw-study-link){width:100%;min-height:54px;flex-basis:auto}
  .rwhw .rwhw-simple-nav {scroll-margin-top:0}
}
@media(prefers-reduced-motion:reduce){
  .rwhw,.rwhw *,.rwhw *::before,.rwhw *::after{transition:none!important;animation:none!important;scroll-behavior:auto!important}
  .rwhw .rwhw-theme-fade{display:none!important}
}

/* Calculation progress text stays legible inside the night-sky curtain. */
#rwhw-loader.rwhw-light-curtain .rwhw-loader-stage{margin:12px auto 4px;text-align:center;color:#d9c7b5;font:500 13px/1.5 system-ui,sans-serif;letter-spacing:.01em;max-width:90%;overflow-wrap:anywhere}
