/* =========================================================================
   Omaaa Astrology — application stylesheet
   Temple "mandir jyotish" theme: dark maroon + kumkum red + white, with a
   brass-gold accent and a distinct jewel colour for each of the twelve rashis.
   Self-contained: device-local system + Noto font stacks, no CDN.
   Sections: tokens, fonts, base, layout, header/nav, lang switcher, buttons,
   hero, signs, panchang, tools, features, articles, faq, languages, forms,
   results, horoscope pages, footer, flash, errors, responsive, RTL, rashi.
   ========================================================================= */

:root {
    /* Brand = kumkum red; darks = temple maroon; accent = brass gold. */
    --brand:        #c1121f;
    --brand-dark:   #9a0e18;
    --brand-light:  #e23b47;
    --accent:       #c99a2e;
    --gold:         #c99a2e;
    --gold-soft:    #e7c46b;
    --maroon:       #5a0a14;
    --maroon-2:     #7a1220;
    --ink:          #2a0b10;
    --ink-soft:     #5c4a4d;
    --muted:        #7b6569;
    --line:         #efe0db;
    --bg:           #ffffff;
    --bg-alt:       #fbf2ec;
    --bg-deep:      #3d060e;
    --card:         #ffffff;
    --ok:           #1f9d63;
    --ok-bg:        #e7f7ee;
    --warn:         #b3261e;
    --warn-bg:      #fdeceb;
    --radius:       16px;
    --radius-sm:    10px;
    --shadow:       0 10px 30px rgba(90, 10, 20, .10);
    --shadow-lg:    0 20px 50px rgba(90, 10, 20, .16);
    --wrap:         1140px;
    --gap:          24px;
}

/* ---- Per-script font stacks (device-local, offline-safe) --------------- */
/* --display is a warm serif for headings; it is defined only for Latin, so
   Indian-script pages fall back to their own sans stack via var(--display, var(--font)). */
.font-latin      { --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
                   --display: "Cambria", "Georgia", "Times New Roman", "Noto Serif", serif; }
.font-devanagari { --font: "Noto Sans Devanagari", "Nirmala UI", "Mangal", system-ui, sans-serif; }
.font-bengali    { --font: "Noto Sans Bengali", "Vrinda", "Nirmala UI", system-ui, sans-serif; }
.font-tamil      { --font: "Noto Sans Tamil", "Latha", "Nirmala UI", system-ui, sans-serif; }
.font-telugu     { --font: "Noto Sans Telugu", "Gautami", "Nirmala UI", system-ui, sans-serif; }
.font-gujarati   { --font: "Noto Sans Gujarati", "Shruti", "Nirmala UI", system-ui, sans-serif; }
.font-kannada    { --font: "Noto Sans Kannada", "Tunga", "Nirmala UI", system-ui, sans-serif; }
.font-malayalam  { --font: "Noto Sans Malayalam", "Kartika", "Nirmala UI", system-ui, sans-serif; }
.font-gurmukhi   { --font: "Noto Sans Gurmukhi", "Raavi", "Nirmala UI", system-ui, sans-serif; }
.font-urdu       { --font: "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", "Segoe UI", system-ui, sans-serif; }

/* ---- Base -------------------------------------------------------------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font, system-ui, sans-serif);
    color: var(--ink);
    background: var(--bg);
    line-height: 1.65;
    font-size: 17px;
}
h1, h2, h3, h4 { font-family: var(--display, var(--font)); line-height: 1.25; color: var(--ink); font-weight: 700; margin: 0 0 .5em; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
a { color: var(--brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
ul { margin: 0; padding: 0; list-style: none; }
.muted { color: var(--muted); }

/* ---- Layout ------------------------------------------------------------ */
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.wrap-narrow { max-width: 780px; }
.section { padding: 56px 0; }
.section-tight { padding: 22px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 34px; }
.section-head h2 { font-size: clamp(24px, 3vw, 32px); }
.section-head h2::after { content: ""; display: block; width: 56px; height: 3px; margin: 14px auto 0; border-radius: 2px; background: linear-gradient(90deg, var(--gold), var(--brand)); }
.section-head p { color: var(--ink-soft); margin: 12px 0 0; }
.section-head-row { display: flex; align-items: center; justify-content: space-between; text-align: left; max-width: none; }
.section-head-row h2::after { margin-inline-start: 0; }
.section-more { font-weight: 600; white-space: nowrap; }

/* ---- Skip link --------------------------------------------------------- */
.skip-link {
    position: absolute; left: -999px; top: 0; z-index: 100;
    background: var(--brand); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---- Header + nav ------------------------------------------------------ */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-family: var(--display, var(--font)); font-weight: 800; font-size: 21px; color: var(--maroon); letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.brand-mark { color: var(--gold); font-size: 22px; }
.site-nav { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; }
.site-nav > ul { display: flex; align-items: center; gap: 4px; }
.site-nav a { color: var(--ink-soft); font-weight: 600; padding: 8px 12px; border-radius: 8px; font-size: 15px; }
.site-nav a:hover, .site-nav a[aria-current="page"] { background: var(--bg-alt); color: var(--brand-dark); text-decoration: none; }

.nav-toggle, .nav-toggle-btn { display: none; }
.nav-toggle-btn { cursor: pointer; width: 42px; height: 42px; border-radius: 8px; }
.nav-toggle-btn span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 4px auto; border-radius: 2px; transition: .2s; }

/* ---- Language switcher ------------------------------------------------- */
.lang-switch { position: relative; }
.lang-switch summary {
    list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; font-weight: 600; font-size: 15px;
}
.lang-switch summary::-webkit-details-marker { display: none; }
.lang-switch[open] > summary { border-color: var(--brand); }
.lang-menu {
    position: absolute; inset-inline-end: 0; top: calc(100% + 8px); z-index: 60;
    background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg);
    padding: 8px; min-width: 220px; max-height: 70vh; overflow: auto;
}
.lang-menu a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; color: var(--ink); }
.lang-menu a:hover { background: var(--bg-alt); text-decoration: none; }
.lang-menu .flag { font-size: 18px; }
.lang-menu .en { color: var(--muted); font-size: 13px; margin-inline-start: auto; }

/* ---- Buttons ----------------------------------------------------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 22px; border-radius: 12px; font-weight: 700; font-size: 16px;
    border: 1px solid transparent; cursor: pointer; transition: transform .06s ease, box-shadow .2s;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 8px 20px rgba(193, 18, 31, .3); }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-ghost { background: #fff; color: var(--brand-dark); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand); }
.btn-lg { padding: 15px 30px; font-size: 18px; }
.btn-block { display: flex; width: 100%; }

/* ---- Hero -------------------------------------------------------------- */
.hero {
    position: relative;
    background:
        radial-gradient(1100px 460px at 12% -12%, rgba(201, 154, 46, .28), transparent 60%),
        radial-gradient(900px 520px at 100% 0%, rgba(226, 59, 71, .30), transparent 55%),
        linear-gradient(158deg, #4a0710 0%, #7a1220 52%, #9a0e18 100%);
    color: #fbe9dc; padding: 66px 0 74px;
}
.hero-inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; }
.hero-eyebrow { color: var(--gold-soft); font-weight: 700; font-size: 13px; letter-spacing: 1.4px; margin: 0 0 12px; text-transform: uppercase; }
.hero-title { color: #fff; font-size: clamp(31px, 4.4vw, 52px); margin: 0 0 16px; letter-spacing: -.5px; text-shadow: 0 2px 18px rgba(0, 0, 0, .25); }
.hero-sub { color: #f4d7c7; font-size: clamp(16px, 1.5vw, 19px); max-width: 42ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.hero-picker { background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .20); border-radius: 20px; padding: 22px; box-shadow: 0 18px 44px rgba(40, 4, 10, .34); }
.hero-picker-head { color: #fff; font-size: 15px; letter-spacing: .3px; margin: 0 0 14px; }
.sign-chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.sign-chip {
    display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 11px 6px 9px;
    background: #fff; border: 1px solid rgba(255, 255, 255, .7);
    border-bottom: 3px solid var(--sign, var(--gold));
    border-radius: 12px; color: var(--ink); text-align: center;
    transition: transform .12s ease, box-shadow .2s;
}
.sign-chip:hover { text-decoration: none; transform: translateY(-3px); box-shadow: 0 12px 22px rgba(30, 3, 8, .38); }
.sign-chip-sym { font-family: "Segoe UI Symbol", "Apple Symbols", "Noto Sans Symbols 2", "Noto Sans Symbols", var(--font); font-size: 23px; line-height: 1; color: var(--sign, var(--brand)); }
.sign-chip-name { font-size: 12.5px; font-weight: 700; }

/* ---- Stars ------------------------------------------------------------- */
.stars { display: inline-flex; gap: 2px; font-size: 16px; }
.star { color: #e6d7d2; }
.star.on { color: var(--gold); }

/* ---- Sign grid / cards ------------------------------------------------- */
/* Each card carries a .s-<sign> class that sets --sign to that rashi's colour. */
.sign-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); }
.sign-card {
    display: flex; flex-direction: column; gap: 12px; padding: 20px;
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow); color: var(--ink); transition: transform .12s, box-shadow .2s, border-color .2s;
    border-top: 4px solid var(--sign, var(--brand));
}
.sign-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--sign, var(--line)); text-decoration: none; }
.sign-card-top { display: flex; align-items: center; gap: 12px; }
.sign-card-sym {
    font-family: "Segoe UI Symbol", "Apple Symbols", "Noto Sans Symbols 2", "Noto Sans Symbols", var(--font);
    font-size: 26px; line-height: 1; width: 48px; height: 48px; display: grid; place-items: center;
    background: var(--sign, var(--brand)); color: #fff; border-radius: 12px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18);
}
.sign-card-name { display: block; font-weight: 700; font-size: 18px; }
a.sign-card:hover .sign-card-name { color: var(--sign, var(--brand-dark)); }
.sign-card-range { display: block; color: var(--muted); font-size: 13px; }
.sign-card-teaser { color: var(--ink-soft); font-size: 14px; margin: 0; flex: 1; }
.sign-card-foot { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--bg-alt); color: var(--ink-soft); }
.chip-lucky { background: #fbeecb; color: #8a5e08; }
/* Today's tone now rides on the tone chip, freeing the card border for the rashi colour. */
.sign-card.tone-strong  .chip-tone { background: #e4f6ec; color: #12814e; }
.sign-card.tone-good     .chip-tone { background: #eef7e0; color: #4c7a15; }
.sign-card.tone-mixed    .chip-tone { background: #fbefd6; color: #92620a; }
.sign-card.tone-caution  .chip-tone { background: #fbe6df; color: #b03f1f; }

/* ---- Period strip ------------------------------------------------------ */
.period-strip { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.period-strip a {
    display: inline-block; padding: 10px 20px; border-radius: 999px; font-weight: 600;
    background: var(--bg-alt); color: var(--brand-dark); border: 1px solid var(--line);
}
.period-strip a:hover { background: var(--brand); color: #fff; text-decoration: none; }

/* ---- Tool grid / cards ------------------------------------------------- */
.tool-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.tool-grid-4 { grid-template-columns: repeat(4, 1fr); }
.tool-card {
    display: flex; flex-direction: column; gap: 8px; padding: 24px;
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow); color: var(--ink); transition: transform .12s, box-shadow .2s;
}
.tool-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); text-decoration: none; }
.tool-card-icon { font-size: 24px; color: var(--brand); }
.tool-card h3 { margin: 0; font-size: 18px; }
.tool-card p { margin: 0; color: var(--ink-soft); font-size: 14px; flex: 1; }
.tool-card-cta { color: var(--brand-dark); font-weight: 700; font-size: 14px; }

/* ---- Panchang card ----------------------------------------------------- */
.panchang-card { display: grid; grid-template-columns: 1.3fr 1fr; gap: var(--gap); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px; }
.panchang-facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.pf { display: flex; flex-direction: column; gap: 2px; }
.pf-k { color: var(--muted); font-size: 13px; font-weight: 600; }
.pf-v { font-weight: 700; font-size: 16px; }
.panchang-windows { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; border-inline-start: 1px solid var(--line); padding-inline-start: 20px; }
.window-col h3 { font-size: 15px; margin: 0 0 10px; }
.window-good h3 { color: var(--ok); }
.window-bad h3 { color: var(--warn); }
.window-col li { display: flex; flex-direction: column; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.window-col li:last-child { border-bottom: 0; }
.w-name { font-weight: 600; font-size: 14px; }
.w-time { color: var(--muted); font-size: 13px; }

/* ---- Feature grid ------------------------------------------------------ */
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); }
.feature { text-align: center; padding: 10px; }
.feature-icon { display: inline-grid; place-items: center; width: 54px; height: 54px; border-radius: 14px; background: var(--bg-alt); color: var(--brand); font-size: 24px; margin-bottom: 12px; }
.feature h3 { font-size: 17px; margin: 0 0 6px; }
.feature p { color: var(--ink-soft); font-size: 14px; margin: 0; }

/* ---- Article grid ------------------------------------------------------ */
.article-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.article-card { padding: 22px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); color: var(--ink); transition: transform .12s, box-shadow .2s; }
.article-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); text-decoration: none; }
.article-card h3 { font-size: 18px; margin: 0 0 8px; }
.article-card p { color: var(--ink-soft); font-size: 14px; }
.article-date { color: var(--muted); font-size: 13px; }

/* ---- FAQ --------------------------------------------------------------- */
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.faq-item summary { cursor: pointer; list-style: none; padding: 16px 20px; font-weight: 600; position: relative; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; inset-inline-end: 20px; color: var(--brand); font-size: 20px; }
.faq-item[open] summary::after { content: "−"; }
.faq-answer { padding: 0 20px 18px; color: var(--ink-soft); }

/* ---- Languages grid ---------------------------------------------------- */
.lang-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.lang-tile { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 16px 8px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; color: var(--ink); text-align: center; transition: transform .12s, border-color .2s; }
.lang-tile:hover { transform: translateY(-3px); border-color: var(--brand); text-decoration: none; }
.lang-flag { font-size: 22px; }
.lang-native { font-weight: 700; }
.lang-en { color: var(--muted); font-size: 12px; }

/* ---- CTA band ---------------------------------------------------------- */
.cta-band { background: radial-gradient(700px 300px at 50% -40%, rgba(201, 154, 46, .28), transparent 60%), linear-gradient(135deg, #5a0a14, #a30f1a); color: #fff; text-align: center; border-radius: 0; }
.cta-inner h2 { color: #fff; font-size: clamp(24px, 3vw, 32px); }
.cta-band .btn-primary { background: var(--gold); color: #3d060e; box-shadow: 0 10px 26px rgba(0, 0, 0, .28); }
.cta-band .btn-primary:hover { background: var(--gold-soft); color: #3d060e; }
.cta-note { color: #f3d3c6; font-size: 13px; margin-top: 22px; }

/* ---- Forms (calculators) ---------------------------------------------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px; }
.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 15px; }
.form-row .hint { color: var(--muted); font-size: 13px; font-weight: 400; }
.input, .select, .textarea {
    width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm);
    font: inherit; color: var(--ink); background: #fff;
}
.input:focus, .select:focus, .textarea:focus { outline: 2px solid var(--brand-light); border-color: var(--brand); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-actions { display: flex; gap: 12px; margin-top: 8px; }
.field-error { color: var(--warn); font-size: 13px; margin-top: 4px; }

/* ---- Result blocks ----------------------------------------------------- */
.result { margin-top: 26px; }
.result-hero { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; padding: 24px; background: var(--bg-alt); border-radius: var(--radius); }
.result-number { font-size: 54px; font-weight: 800; color: var(--brand); line-height: 1; }
.result-meta h2 { margin: 0 0 4px; }
.calc-table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.calc-table th, .calc-table td { text-align: start; padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 14px; }
.calc-table th { color: var(--muted); font-weight: 600; }
.letter-grid { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.letter { display: inline-grid; place-items: center; min-width: 42px; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.letter b { font-size: 16px; }
.letter span { font-size: 12px; color: var(--muted); }

/* ---- Horoscope reading page ------------------------------------------- */
.page-head { background: radial-gradient(600px 260px at 100% -30%, rgba(201, 154, 46, .22), transparent 60%), linear-gradient(160deg, #4a0710, #7a1220); color: #fff; padding: 40px 0; }
.page-head h1 { color: #fff; font-size: clamp(26px, 3.4vw, 38px); margin: 0; }
.page-head p { color: #f2d3c5; margin: 8px 0 0; }
.breadcrumbs { font-size: 13px; margin-bottom: 14px; color: var(--muted); }
.breadcrumbs a { color: var(--brand-dark); }
.breadcrumbs span { margin: 0 6px; opacity: .6; }
.reading-grid { display: grid; grid-template-columns: 1fr 320px; gap: 32px; align-items: start; }
.rating-hero { display: flex; align-items: center; gap: 18px; padding: 22px; background: var(--bg-alt); border-radius: var(--radius); border-inline-start: 6px solid var(--sign, var(--brand)); margin-bottom: 24px; }
.rating-score { font-size: 42px; font-weight: 800; color: var(--sign, var(--brand)); }
.section-block { padding: 20px 0; border-bottom: 1px solid var(--line); }
.section-block:last-child { border-bottom: 0; }
.section-block h3 { display: flex; align-items: center; gap: 10px; font-size: 19px; }
.section-icon { font-size: 20px; }
.aside-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 20px; }
.aside-card h3 { font-size: 16px; margin: 0 0 12px; }
.lucky-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lucky-list .k { color: var(--muted); font-size: 13px; }
.lucky-list .v { font-weight: 700; }
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { padding: 5px 12px; border-radius: 999px; background: var(--bg-alt); font-size: 13px; font-weight: 600; }
.good-list li, .bad-list li { padding: 6px 0 6px 22px; position: relative; }
.good-list li::before { content: "✓"; position: absolute; inset-inline-start: 0; color: var(--ok); font-weight: 700; }
.bad-list li::before { content: "!"; position: absolute; inset-inline-start: 0; color: var(--warn); font-weight: 700; }
.factor-bar { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; margin-top: 4px; }
.factor-bar > span { display: block; height: 100%; background: var(--brand); }

/* ---- Horoscope reading / overview extras ------------------------------ */
.period-strip a.is-active { background: var(--brand); color: #fff; }
.sign-card .sign-card-name { color: var(--ink); }
.sign-card-link { margin-top: auto; font-weight: 600; color: var(--brand); font-size: 14px; }
a.sign-card-link:hover { text-decoration: underline; }

.reading-head { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.day-nav { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.day-nav a { padding: 6px 12px; border-radius: 999px; background: var(--bg-alt); font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.day-nav a:hover { background: var(--brand); color: #fff; text-decoration: none; }

.rating-hero .sign-card-sym { width: 60px; height: 60px; font-size: 32px; flex: none; }
.rating-body { flex: 1; min-width: 0; }
.rating-body h1 { margin: 0 0 2px; }
.rating-date { color: var(--muted); font-size: 14px; margin: 0 0 6px; }
.rating-tone { font-weight: 700; }
.rating-note { color: var(--ink-soft); font-size: 14px; margin: 2px 0 0; }
.rating-hero.tone-strong  .rating-tone { color: #12814e; }
.rating-hero.tone-good     .rating-tone { color: #4c7a15; }
.rating-hero.tone-mixed    .rating-tone { color: #92620a; }
.rating-hero.tone-caution  .rating-tone { color: #b03f1f; }

.section-block .sb-rating { display: flex; align-items: center; gap: 10px; margin: 2px 0 6px; }
.section-block .sb-tone { color: var(--muted); font-size: 13px; }
.lucky-big { font-size: 40px; font-weight: 800; color: var(--brand); line-height: 1; }
.remedy-title { font-weight: 700; margin: 0 0 4px; }
.factor-row { margin-bottom: 14px; }
.factor-row .fh { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; font-weight: 600; }
.factor-row .fd { color: var(--muted); font-size: 12px; margin-top: 2px; }
.mini-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; }
.mini-facts .k { color: var(--muted); font-size: 12px; display: block; }
.mini-facts .v { font-weight: 600; font-size: 14px; }
.window-mini { margin: 0; padding: 0; list-style: none; }
.window-mini li { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; font-size: 13px; }
.window-mini .wt { color: var(--muted); }

.sign-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; }
.sign-nav a { display: inline-flex; align-items: center; gap: 10px; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius); font-weight: 600; color: var(--ink); }
.sign-nav a:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }
.sign-nav .nn { color: var(--muted); font-size: 12px; font-weight: 500; display: block; }
.sign-nav .sn-next { text-align: end; }

/* ---- Prose (articles, pages) ------------------------------------------ */
.prose { max-width: 720px; margin: 0 auto; }
.prose h2 { margin-top: 1.4em; }
.prose p, .prose li { color: var(--ink-soft); }
.prose ul { list-style: disc; padding-inline-start: 22px; margin: 0 0 1em; }

/* ---- Footer ------------------------------------------------------------ */
.site-footer { background: var(--bg-deep); color: #cfc8ec; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: var(--gap); padding: 48px 20px 32px; }
.footer-col h2 { color: #fff; font-size: 15px; text-transform: uppercase; letter-spacing: .5px; margin: 0 0 14px; }
.footer-col a { color: #c3bce6; display: inline-block; padding: 4px 0; }
.footer-col a:hover { color: #fff; }
.brand-footer { color: #fff; margin-bottom: 12px; }
.footer-about p { color: #a79fce; font-size: 14px; }
.footer-legal { border-top: 1px solid rgba(255, 255, 255, .12); }
.footer-legal .wrap { padding-top: 20px; padding-bottom: 24px; }
.disclaimer { color: #948bbd; font-size: 13px; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; align-items: center; }
.footer-bottom p { margin: 0; font-size: 14px; }
.legal-links { display: flex; gap: 16px; }

/* ---- Flash messages ---------------------------------------------------- */
.flash-region { padding-top: 16px; }
.flash { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 10px; font-weight: 600; }
.flash-ok { background: var(--ok-bg); color: var(--ok); }
.flash-err { background: var(--warn-bg); color: var(--warn); }

/* ---- Error page -------------------------------------------------------- */
.error-page { min-height: 60vh; display: grid; place-items: center; text-align: center; }
.error-card { padding: 40px; }
.error-code { font-size: 90px; font-weight: 800; color: var(--brand-light); line-height: 1; }
.error-card .actions { display: flex; gap: 12px; justify-content: center; margin-top: 20px; }

/* ---- Responsive -------------------------------------------------------- */
@media (max-width: 1024px) {
    .sign-grid, .tool-grid, .tool-grid-4 { grid-template-columns: repeat(3, 1fr); }
    .feature-grid { grid-template-columns: repeat(2, 1fr); }
    .lang-grid { grid-template-columns: repeat(4, 1fr); }
    .reading-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
    body { font-size: 16px; }
    .hero-inner { grid-template-columns: 1fr; }
    .sign-grid, .tool-grid, .tool-grid-4, .article-grid { grid-template-columns: repeat(2, 1fr); }
    .panchang-card { grid-template-columns: 1fr; }
    .panchang-windows { border-inline-start: 0; padding-inline-start: 0; border-top: 1px solid var(--line); padding-top: 16px; }
    .form-grid { grid-template-columns: 1fr; }
    .section-head-row { flex-direction: column; align-items: flex-start; gap: 8px; }

    /* Mobile nav: CSS-only toggle */
    .nav-toggle-btn { display: inline-grid; place-items: center; margin-inline-start: auto; }
    .site-nav {
        position: fixed; inset: 64px 0 auto 0; margin: 0; flex-direction: column; align-items: stretch; gap: 0;
        background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lg);
        max-height: 0; overflow: hidden; transition: max-height .25s ease; padding: 0 20px;
    }
    .site-nav > ul { flex-direction: column; align-items: stretch; gap: 0; width: 100%; }
    .site-nav a { padding: 14px 4px; border-bottom: 1px solid var(--line); border-radius: 0; }
    .lang-switch { padding: 14px 0; }
    .nav-toggle:checked ~ .site-nav { max-height: 80vh; overflow: auto; padding: 8px 20px 20px; }
}
@media (max-width: 460px) {
    .sign-grid, .tool-grid, .tool-grid-4, .article-grid, .feature-grid { grid-template-columns: 1fr; }
    .lang-grid { grid-template-columns: repeat(2, 1fr); }
    .sign-chips { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr; }
}

/* ---- RTL (Urdu) -------------------------------------------------------- */
[dir="rtl"] body { line-height: 1.9; }
[dir="rtl"] .hero-sub { max-width: none; }
[dir="rtl"] .btn { gap: 8px; }
[dir="rtl"] .tool-card-cta,
[dir="rtl"] .section-more { direction: rtl; }

/* ---- Print ------------------------------------------------------------- */
@media print {
    .site-header, .site-footer, .hero-actions, .period-strip, .cta-band, .nav-toggle-btn { display: none; }
    body { font-size: 12pt; color: #000; }
    .card, .sign-card, .tool-card { box-shadow: none; border-color: #ccc; }
    .calc-form, .calc-foot, .calc-how > summary { display: none; }
    .calc-how { border: 0; }
    .calc-how[open] > .calc-how-body { display: block; }
}

/* =========================================================================
   Calculators & numerology results
   ========================================================================= */
.hint { color: var(--muted); font-size: 13px; }

/* Form card + small button (btn-sm is also used by the horoscope pages) */
.calc-form { padding: 24px; margin-bottom: 8px; }
.calc-form .form-actions { margin-top: 4px; }
.btn-sm { padding: 8px 14px; font-size: 14px; }

.privacy-hint {
    display: flex; align-items: flex-start; gap: 6px;
    background: var(--bg-alt); border-radius: var(--radius-sm);
    padding: 10px 12px; margin: 4px 0 12px; color: var(--ink-soft); font-size: 13px;
}

/* Result section headings + multi-column card rows */
.result-title { font-size: 20px; margin: 28px 0 12px; }
.result-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.result-cols .aside-card { margin-bottom: 0; }

/* Vehicle: the two readings side by side */
.reading-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 20px 0; }
.reading-cols .aside-card { margin-bottom: 0; text-align: center; }
.mini-number { font-size: 40px; font-weight: 800; color: var(--brand); line-height: 1; margin: 6px 0; }

/* Stat grids (dob core numbers, mobile / personal-cycle stats) */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin: 16px 0; }
.stat { background: var(--bg-alt); border-radius: var(--radius-sm); padding: 14px 16px; }
.stat .k { display: block; color: var(--muted); font-size: 12px; font-weight: 600; margin-bottom: 2px; }
.stat .v { font-size: 20px; font-weight: 700; color: var(--ink); }
.stat .v.big { font-size: 30px; color: var(--brand); }
.stat-grid-lg .stat { text-align: center; }

/* Verdict badge + transparent reason breakdown */
.verdict-wrap {
    display: flex; gap: 20px; flex-wrap: wrap; align-items: center;
    margin: 18px 0; padding: 18px; border: 1px solid var(--line);
    border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow);
}
.verdict-badge {
    display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
    min-width: 116px; padding: 14px 18px; border-radius: var(--radius); color: #fff;
}
.vb-score { font-size: 30px; font-weight: 800; line-height: 1; }
.vb-score small { font-size: 14px; font-weight: 600; opacity: .85; }
.vb-label { font-size: 13px; font-weight: 700; margin-top: 4px; text-transform: uppercase; letter-spacing: .04em; }
.verdict-badge.tone-strong  { background: linear-gradient(135deg, #17a866, #0f8a52); }
.verdict-badge.tone-good    { background: linear-gradient(135deg, #5aab35, #4a9a2b); }
.verdict-badge.tone-mixed   { background: linear-gradient(135deg, #e79a1f, #d0850f); }
.verdict-badge.tone-caution { background: linear-gradient(135deg, #e0674a, #c74327); }
.reason-list { flex: 1 1 260px; display: grid; gap: 8px; }
.reason-list li { display: flex; align-items: baseline; gap: 10px; }
.reason-delta { flex: none; min-width: 34px; text-align: center; font-weight: 700; font-size: 13px; padding: 2px 6px; border-radius: 6px; }
.reason-up   { color: var(--ok); background: var(--ok-bg); }
.reason-down { color: var(--warn); background: var(--warn-bg); }
.reason-flat { color: var(--muted); background: var(--bg-alt); }
.reason-text { color: var(--ink-soft); font-size: 14px; }

/* Working / expression text */
.calc-expr {
    font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
    background: var(--bg-alt); border-radius: var(--radius-sm);
    padding: 8px 12px; font-size: 14px; word-break: break-word; margin: 8px 0;
}
.calc-chain { color: var(--muted); font-size: 14px; margin: 4px 0 12px; }

/* Harmony row + tone chip (green→red by tier) */
.harmony-row {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    padding: 14px 16px; background: var(--bg-alt); border-radius: var(--radius-sm); margin: 14px 0;
}
.hr-label { font-weight: 600; }
.tone-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; font-weight: 700; font-size: 14px; color: #fff; }
.tone-chip.tone-strong  { background: #17a866; }
.tone-chip.tone-good    { background: #5aab35; }
.tone-chip.tone-mixed   { background: #d0850f; }
.tone-chip.tone-caution { background: #c74327; }

/* "How this is calculated" disclosure */
.calc-how { border: 1px solid var(--line); border-radius: var(--radius); margin: 20px 0; overflow: hidden; }
.calc-how > summary { cursor: pointer; padding: 14px 18px; font-weight: 600; list-style: none; background: var(--bg-alt); }
.calc-how > summary::-webkit-details-marker { display: none; }
.calc-how > summary::after { content: "＋"; float: inline-end; color: var(--muted); }
.calc-how[open] > summary::after { content: "－"; }
.calc-how-body { padding: 18px; }
.calc-steps { display: grid; gap: 8px; }
.calc-steps li { padding-bottom: 8px; border-bottom: 1px solid var(--line); font-size: 14px; }
.calc-steps li:last-child { border-bottom: 0; padding-bottom: 0; }
.subhead { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 14px 0 6px; }

.calc-foot { display: flex; gap: 10px; margin-top: 20px; }
.calc-note { margin-top: 24px; font-size: 13px; color: var(--muted); text-align: center; }

/* Number-meaning profile card */
.meaning-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin: 12px 0; background: var(--card); box-shadow: var(--shadow); }
.meaning-head { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.num-badge { flex: none; width: 56px; height: 56px; display: grid; place-items: center; border-radius: 50%; background: var(--brand); color: #fff; font-size: 26px; font-weight: 800; }
.meaning-id { min-width: 0; }
.meaning-name { margin: 0 0 6px; font-size: 20px; }
.meaning-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.meaning-general, .meaning-rel { color: var(--ink-soft); }
.sw-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 8px 0; }

/* Business suggestions + lucky-number extras */
.suggest-table td { vertical-align: middle; }
.source-row { margin-top: 8px; }
.chip-caution { background: var(--warn-bg); color: var(--warn); }
.chip-lucky.is-primary { outline: 2px solid var(--brand); outline-offset: 1px; }
.note-list { display: grid; gap: 8px; }
.note-list li { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.num-dot { flex: none; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--bg-alt); font-weight: 700; font-size: 13px; }

@media (max-width: 760px) {
    .result-cols, .reading-cols, .sw-grid { grid-template-columns: 1fr; }
    .verdict-wrap { flex-direction: column; align-items: stretch; }
    .verdict-badge { width: 100%; }
}

/* ---- Matching / compatibility ------------------------------------------ */
.party-col { display: flex; flex-direction: column; }
.result-number small { font-size: 24px; font-weight: 700; }
.match-vs { font-size: 18px; margin: 8px 0 2px; }
.match-vs .mv-x { color: var(--muted); margin: 0 8px; }
.result-hero .tone-chip { align-self: flex-start; }
.aspect-table td { vertical-align: top; }
.tip-list { display: grid; gap: 8px; }
.tip-list li { position: relative; padding-inline-start: 22px; }
.tip-list li::before { content: "→"; position: absolute; inset-inline-start: 0; color: var(--brand); font-weight: 700; }

/* ---- Content & legal pages --------------------------------------------- */
.page-prose { color: var(--ink-soft); font-size: 16px; line-height: 1.75; }
.page-prose > p { margin: 0 0 16px; }
.page-prose h2 { color: var(--ink); font-size: 20px; margin: 28px 0 8px; }
.page-prose h3 { color: var(--ink); font-size: 17px; margin: 20px 0 6px; }
.page-prose a { color: var(--brand); }
.page-lead { font-size: 18px; color: var(--ink); line-height: 1.7; margin: 0 0 18px; }
.page-meta { color: var(--muted); font-size: 14px; margin: 0 0 20px; }

/* Article detail */
.article-head { margin-bottom: 18px; }
.article-head h1 { margin: 0 0 8px; }
.article-body { color: var(--ink-soft); font-size: 16px; line-height: 1.8; }
.article-body > p { margin: 0 0 16px; }
.article-body h2 { color: var(--ink); font-size: 22px; margin: 30px 0 10px; }
.article-body h3 { color: var(--ink); font-size: 18px; margin: 22px 0 8px; }
.article-body ul, .article-body ol { margin: 0 0 16px; padding-inline-start: 22px; }
.article-body li { margin: 4px 0; }
.article-body em { color: var(--muted); }
.article-body a { color: var(--brand); }
.article-foot { margin-top: 28px; display: flex; gap: 10px; flex-wrap: wrap; }

/* Articles index pagination */
.pagination { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 28px; }
.pagination .page-status { color: var(--muted); font-size: 14px; }

/* Empty state */
.empty-state { text-align: center; padding: 40px 20px; color: var(--ink-soft); background: var(--bg-alt); border-radius: var(--radius); }
.empty-state p { margin: 0 0 16px; }

/* About page quick links */
.about-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }

/* Contact form message box (textarea reuses the .input styling) */
textarea.input { min-height: 140px; resize: vertical; }

/* ---- Per-rashi identity colours ----------------------------------------
   Each zodiac sign carries its own hue, rooted in its traditional colour /
   ruling planet and spread across the wheel so no two are confusable in a
   4-column grid. Consumed via var(--sign) by .sign-card, .sign-chip and
   .rating-hero. The .s-<key> keys are the English sign keys (locale-neutral). */
.s-aries       { --sign: #e03131; }  /* Mars — kumkum red        */
.s-taurus      { --sign: #2f9e44; }  /* Venus / earth green      */
.s-gemini      { --sign: #6a9a1f; }  /* Mercury — olive-lime     */
.s-cancer      { --sign: #2f8fd4; }  /* Moon — silver-blue       */
.s-leo         { --sign: #f76707; }  /* Sun — orange             */
.s-virgo       { --sign: #0ca678; }  /* Mercury / earth — teal   */
.s-libra       { --sign: #12a5b8; }  /* Venus — sky / cyan       */
.s-scorpio     { --sign: #a61e4d; }  /* Mars — deep maroon       */
.s-sagittarius { --sign: #e8850c; }  /* Jupiter — amber-gold     */
.s-capricorn   { --sign: #3b5bdb; }  /* Saturn — indigo          */
.s-aquarius    { --sign: #7048e8; }  /* Saturn — violet          */
.s-pisces      { --sign: #9c36b5; }  /* Jupiter — sea magenta    */

/* ---- Motion: honour the OS "reduce motion" preference ------------------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }
    .sign-chip:hover, .sign-card:hover { transform: none; }
}
