/* Opt-in presentation for the homepage and English/Telugu service directories.
   Literal colours, block fallbacks and wrapping flex layouts work without JS,
   CSS variables, Grid, flex gap, :has(), or a downloaded font. */
body.oj-home-page, body.oj-service-hub-page { background: #fff8e9; color: #362e2b; }
.oj-service-hub-page .oj-page-title { color: #542328; font-size: 2rem; line-height: 1.4; margin: 1.25rem 0 .5rem; }
.oj-page-refresh, .oj-page-refresh * { box-sizing: border-box; }
.oj-page-refresh.main { width: auto; max-width: 1180px; margin: 1.5rem auto; padding: 0 12px; border: 0; color: #362e2b; }
.oj-page-refresh { line-height: 1.8; word-wrap: break-word; overflow-wrap: break-word; }
.oj-page-refresh .row > div { min-width: 0; }
.oj-page-refresh h1, .oj-page-refresh h2, .oj-page-refresh h3 { color: #542328; line-height: 1.45; }
.oj-page-refresh h2 { background: none; border: 0; border-radius: 0; padding: 0; font-size: 1.65rem; font-weight: 700; text-align: left; margin: 0 0 .85rem; }
.oj-page-refresh h3 { background: none; border: 0; padding: 0; font-size: 1.2rem; font-weight: 700; text-align: left; margin: 0 0 .65rem; }
.oj-page-refresh p { text-align: left; line-height: 1.8; }
.oj-page-refresh a { color: #702635; }
.oj-page-refresh a:hover { color: #542328; }
.oj-page-refresh a:focus, .oj-page-refresh summary:focus { outline: 3px solid #17638c; outline-offset: 3px; }
.oj-page-refresh [id] { scroll-margin-top: 90px; }
.oj-page-refresh img { max-width: 100%; }
.oj-page-refresh .oj-badge { display: none !important; }
.oj-page-refresh .text-muted, .oj-page-refresh .small-muted { color: #62584e !important; }
.oj-page-refresh .oj-eyebrow { color: #795019; font-size: .85rem; font-weight: 700; letter-spacing: .06em; margin-bottom: .5rem; text-align: center; }
.oj-page-refresh .oj-paid-label { display: inline-block; padding: .25rem .65rem; border: 1px solid #dcc8a5; border-radius: 5px; background: #fff1d4; color: #702635; font-size: .9rem; font-weight: 700; margin: 1rem 0 0; }

/* Primary actions are ordinary links; no script is needed to reach a tool. */
.oj-page-refresh .oj-hub-welcome { background: #fffdf7; border: 1px solid #dcc8a5; border-top: 3px solid #bd7620; border-radius: 12px; padding: 1.5rem; margin-bottom: 1.25rem; }
.oj-hub-welcome > p { max-width: 850px; color: #62584e; margin-bottom: 1.2rem; }
.oj-page-refresh .oj-quick-grid { display: block; display: flex; flex-wrap: wrap; margin: 0 -6px; }
.oj-page-refresh .oj-quick-link { display: block; position: relative; width: 100%; margin: 6px; padding: 1.15rem 2.25rem 1.15rem 1rem; background: #fff; border: 1px solid #d7bf99; border-radius: 8px; text-decoration: none; transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease; }
.oj-quick-link strong { display: block; font-size: 1.12rem; line-height: 1.5; margin-bottom: .3rem; }
.oj-quick-link span { display: block; color: #62584e; font-size: .9rem; line-height: 1.65; }
.oj-quick-link b { position: absolute; right: .8rem; top: 1.1rem; font-size: 1.2rem; }
.oj-page-refresh .oj-quick-link:hover { background: #fff4de; border-color: #a87735; box-shadow: 0 3px 12px rgba(84,35,40,.08); }
.oj-page-refresh .oj-hub-date { font-size: .86rem; color: #716045; margin: .9rem 0 0; }
.oj-section-nav { border-bottom: 1px solid #dcc8a5; padding: 0 0 1rem; margin: 0 0 2rem; }
.oj-section-nav > span { display: block; font-size: .88rem; color: #62584e; margin-bottom: .35rem; }
.oj-section-nav a { display: inline-block; vertical-align: top; background: #fffdf7; border: 1px solid #dcc8a5; border-radius: 6px; padding: .5rem .8rem; margin: 0 .35rem .5rem 0; min-height: 44px; text-decoration: none; line-height: 1.7; }
.oj-section-nav a:hover { background: #f5e5c9; }

/* Shared service cards; margins replace flex gap for older browsers. */
.oj-page-refresh .service-grid, .oj-page-refresh .oj-en-grid, .oj-page-refresh .tool-grid { display: block; display: flex; flex-wrap: wrap; gap: 0; margin: 0 -8px; }
.oj-page-refresh .service-card, .oj-page-refresh .oj-en-card, .oj-page-refresh .tool-card { display: block; display: flex; flex-direction: column; min-width: 0; width: 100%; min-height: 0; height: auto; margin: 8px; padding: 1.35rem; border: 1px solid #dcc8a5; border-radius: 10px; background: #fffdf9; box-shadow: 0 3px 12px rgba(84,35,40,.04); transition: border-color 160ms ease, box-shadow 160ms ease; }
.oj-page-refresh .service-card:hover, .oj-page-refresh .oj-en-card:hover, .oj-page-refresh .tool-card:hover { transform: none; border-color: #a87735; box-shadow: 0 5px 16px rgba(84,35,40,.09); }
.oj-page-refresh .service-card p, .oj-page-refresh .oj-en-card p, .oj-page-refresh .tool-card p { color: #62584e; font-size: 1rem; margin-bottom: 1rem; flex-grow: 1; }
.oj-page-refresh .service-icon, .oj-page-refresh .oj-en-icon { display: inline-block; display: flex; align-items: center; justify-content: center; flex-shrink: 0; background: #f5e5c9; color: #795019; width: 44px; height: 44px; padding: 8px; border-radius: 50%; margin-bottom: .85rem; font-size: 1.35rem; }
.oj-page-refresh .service-link, .oj-page-refresh .oj-en-link { display: inline-block; min-height: 44px; padding: .5rem 0; color: #702635; font-weight: 700; text-decoration: underline; text-underline-offset: .18em; }
.oj-page-refresh .oj-en-card-featured, .oj-page-refresh .tool-card-daily { border-top: 3px solid #bd7620; background: #fffaf0; }
.oj-page-refresh .oj-en-section, .oj-page-refresh .oj-tool-section { margin: 2.5rem 0; }
.oj-page-refresh .oj-en-heading { max-width: 850px; margin-bottom: 1rem; }
.oj-page-refresh .oj-en-heading p { color: #62584e; }
.oj-page-refresh .tool-card { position: relative; padding: 0; overflow: hidden; }
.oj-page-refresh .tool-card .card-body { padding: 1.4rem; flex-grow: 1; text-align: left; }
.oj-page-refresh .tool-card .card-body > i { color: #94601d !important; font-size: 1.75rem; }
.oj-page-refresh .tool-card .card-footer { padding: .9rem 1.4rem; background: #fbf3e5; border-top: 1px solid #eadbc1; }
.oj-page-refresh .btn-tool { display: inline-block; background: #702635; color: #fff; border: 1px solid #702635; border-radius: 7px; padding: .55rem 1rem; min-height: 44px; text-decoration: none; line-height: 1.7; font-weight: 600; transition: background-color 160ms ease; }
.oj-page-refresh .btn-tool:hover { color: #fff; background: #542328; }
.oj-page-refresh .today-date { font-size: .85rem; color: #716045; margin: 0 0 .5rem; }
.oj-page-refresh .ribbon-today { position: absolute; top: .8rem; right: .8rem; color: #702635; background: #f5e5c9; padding: .15rem .55rem; border-radius: 4px; font-size: .8rem; }

/* Sign selectors retain readable labels and useful touch targets. */
.oj-page-refresh .oj-en-rashi-grid, .oj-page-refresh .rashi-mini-grid { display: block; display: flex; flex-wrap: wrap; margin: 0 -6px 2rem; }
.oj-page-refresh .oj-en-rashi, .oj-page-refresh .rashi-tile { display: block; width: calc(50% - 12px); margin: 6px; padding: .95rem .5rem; border: 1px solid #dcc8a5; border-radius: 8px; background: #fffdf9; text-align: center; text-decoration: none; transition: background-color 160ms ease; }
.oj-page-refresh .oj-en-rashi:hover, .oj-page-refresh .rashi-tile:hover { background: #f5e5c9; transform: none; }
.oj-en-rashi-symbol, .rashi-symbol { display: block; font-size: 1.7rem; color: #94601d; line-height: 1.3; }
.oj-en-rashi-name, .rashi-name { display: block; font-weight: 700; margin-top: .4rem; }
.oj-page-refresh .oj-en-rashi-sanskrit, .oj-page-refresh .rashi-en { display: block; color: #62584e; font-size: .83rem; }
.oj-page-refresh .section-heading { margin: 2.5rem 0 1rem; padding: 0; }

/* Supporting explanations, languages, FAQs and author information. */
.oj-page-refresh .oj-en-method, .oj-page-refresh .method-grid, .oj-page-refresh .info-grid { display: block; display: flex; flex-wrap: wrap; gap: 0; margin: 0 -8px; }
.oj-page-refresh .oj-en-info, .oj-page-refresh .info-box { width: 100%; margin: 8px; border: 1px solid #dcc8a5; border-left: 3px solid #bd7620; border-radius: 8px; background: #fffaf0; padding: 1.1rem; }
.oj-page-refresh .oj-en-notice, .oj-page-refresh .hub-note { margin: 1.5rem 0; padding: 1rem; border-left: 3px solid #bd7620; background: #fff1d4; border-radius: 6px; }
.oj-page-refresh .oj-en-languages, .oj-page-refresh .oj-language-list { display: block; }
.oj-page-refresh .oj-en-language, .oj-page-refresh .oj-language-link { display: inline-block; background: #fffdf9; border: 1px solid #dcc8a5; border-radius: 7px; color: #702635; padding: .55rem .85rem; margin: 0 .3rem .5rem 0; min-height: 44px; text-decoration: none; }
.oj-page-refresh .oj-en-faq details { padding: 1rem 1.2rem; background: #fffdf9; border: 1px solid #dcc8a5; border-radius: 8px; margin-bottom: .8rem; }
.oj-page-refresh summary { padding: .4rem 0; min-height: 44px; cursor: pointer; color: #702635; font-weight: 700; }
.oj-page-refresh .oj-en-faq p { margin: .8rem 0 0; }
.oj-page-refresh .oj-en-author { display: block; padding: 1.3rem; border: 1px solid #dcc8a5; border-radius: 10px; background: #fffaf0; }
.oj-en-author img { width: 88px; height: 88px; border-radius: 50%; border: 2px solid #bd7620; margin-bottom: 1rem; }
.oj-page-refresh .author-bio { flex-wrap: wrap; }
.oj-page-refresh .author-bio .flex-grow-1 { flex-basis: 250px; min-width: 0; }
.oj-page-refresh .related-links { padding: 1.3rem; background: #fffaf0; border: 1px solid #dcc8a5; border-radius: 10px; margin: 2rem 0; }
.oj-page-refresh .related-links ul { padding-left: 1.2rem; margin-bottom: 0; }
.oj-page-refresh .related-links a { display: inline-block; padding: .4rem 0; min-height: 44px; }
.oj-page-refresh .featured-year-block { display: block; padding: 1.5rem; border: 1px solid #dcc8a5; border-top: 3px solid #bd7620; background: #fffaf0; border-radius: 10px; margin: 2rem 0; }
.oj-page-refresh .featured-content { min-width: 0; }
.oj-page-refresh .featured-icon { display: none !important; }
.oj-page-refresh .featured-badge { display: inline-block; padding: .2rem .6rem; color: #702635; background: #f5e5c9; border-radius: 4px; margin-bottom: .75rem; }
.oj-page-refresh .btn-featured { display: inline-block; min-height: 44px; padding: .6rem 1rem; background: #702635; color: #fff; border-radius: 7px; text-decoration: none; }
.oj-page-refresh .btn-featured:hover { background: #542328; color: #fff; transform: none; }
.oj-page-refresh .oj-language-guide { background: #fffdf7; border: 1px solid #dcc8a5; border-radius: 10px; padding: 1.5rem; }

/* Homepage: compact welcome and a consistent palette with the directories. */
.oj-home-page .hero { background: #fffdf7; border: 1px solid #dcc8a5; border-top: 3px solid #bd7620; border-radius: 12px; padding: 2rem; box-shadow: 0 4px 18px rgba(84,35,40,.05); }
.oj-home-page .hero-copy { max-width: 900px; margin: 0 auto; }
.oj-home-page .hero-copy > img { width: 72px; height: 72px; }
.oj-home-page .hero h1 { font-size: 2.2rem; line-height: 1.3; }
.oj-home-page .hero p { text-align: center; }
.oj-home-page .hero-actions { display: block; margin-top: 1.2rem; }
.oj-home-page .oj-button, .oj-home-page .oj-button-outline { display: inline-block; min-height: 44px; margin: .3rem; border: 1px solid #702635; border-radius: 7px; padding: .7rem 1rem; background: #702635; color: #fff; box-shadow: none; transition: background-color 160ms ease, color 160ms ease; }
.oj-home-page .oj-button-outline { color: #702635; background: #fffdf7; }
.oj-home-page .oj-button:hover { background: #542328; color: #fff; transform: none; }
.oj-home-page .oj-button-outline:hover { background: #f5e5c9; color: #542328; transform: none; }
.oj-home-page .section-card { padding: 1.75rem; background: #fffdf9; border: 1px solid #dcc8a5; border-radius: 12px; box-shadow: none; }
.oj-home-page .service-card { background: #fff; }
.oj-home-page .home-latest-link, .oj-home-page .home-latest-all { color: #702635; }
.oj-home-page .home-latest-lang { color: #795019; }
.oj-home-page .rashifal-box { background: #fffaf0; border-color: #dcc8a5; }

/* Browsers without flex layout/feature queries keep a readable single column. */
.oj-page-refresh .oj-quick-link { width: auto; width: calc(100% - 12px); }
.oj-page-refresh .service-card, .oj-page-refresh .oj-en-card, .oj-page-refresh .tool-card,
.oj-page-refresh .oj-en-info, .oj-page-refresh .info-box { width: auto; width: calc(100% - 16px); }
@supports (display: flex) {
@media (min-width: 600px) {
  .oj-page-refresh .oj-quick-link { width: calc(50% - 12px); }
  .oj-page-refresh .service-card, .oj-page-refresh .oj-en-card, .oj-page-refresh .tool-card { width: calc(50% - 16px); }
  .oj-page-refresh .oj-en-info, .oj-page-refresh .info-box { width: calc(50% - 16px); }
  .oj-page-refresh .oj-en-rashi, .oj-page-refresh .rashi-tile { width: calc(33.333333% - 12px); }
}
@media (min-width: 992px) {
  .oj-page-refresh .oj-quick-link { width: calc(25% - 12px); }
  .oj-page-refresh .service-card, .oj-page-refresh .oj-en-card, .oj-page-refresh .tool-card { width: calc(33.333333% - 16px); }
  .oj-page-refresh .oj-en-rashi, .oj-page-refresh .rashi-tile { width: calc(16.666667% - 12px); }
}
}
@media (max-width: 599px) {
  .oj-service-hub-page .oj-page-title { font-size: 1.6rem; }
  .oj-page-refresh.main { margin-top: 1rem; padding: 0 6px; }
  .oj-page-refresh h2 { font-size: 1.4rem; }
  .oj-page-refresh .oj-hub-welcome { padding: 1rem; }
  .oj-page-refresh .oj-quick-link { padding-top: .85rem; padding-bottom: .85rem; }
  .oj-page-refresh .oj-en-section, .oj-page-refresh .oj-tool-section { margin: 2rem 0; }
  .oj-page-refresh .author-bio .flex-grow-1 { margin: 1rem 0 0 !important; }
  .oj-home-page .hero, .oj-home-page .section-card { padding: 1.1rem; }
  .oj-home-page .hero h1 { font-size: 1.8rem; }
  .oj-home-page .hero-actions a { display: block; margin: .65rem 0 0; }
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .oj-page-refresh *, .oj-page-refresh *::before, .oj-page-refresh *::after { transition: none !important; animation: none !important; }
}
