/* NumroQ White-Label Site - public theme
   Colors/fonts come from CSS variables set per-request from Settings
   (see app/views/layouts/main.php). */

* { box-sizing: border-box; }

:root {
    --color-primary: #5b21b6;
    --color-secondary: #f59e0b;
    --color-accent: #10b981;
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;
    --text: #1f2937;
    --muted: #6b7280;
    --border: #e5e7eb;
    --bg: #ffffff;
    --bg-alt: #f9fafb;
}

html, body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    /* Guard against any element that is a few px wider than the viewport, which on
       mobile made the page scroll sideways and clipped 1-2 characters off full-width
       headings/paragraphs at the right edge. `clip` stops the sideways scroll without
       breaking position: sticky (unlike overflow-x: hidden). */
    max-width: 100%;
    overflow-x: clip;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    line-height: 1.25;
    color: var(--text);
}

a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ── Cosmic background (twinkling + drifting stars, slow orbital rings, centre
   glow). Site-wide on EVERY template. Colour follows --cosmos-color if a template
   sets one, else the site's --color-primary, else a warm gold. Fixed, behind
   everything, non-interactive; animations disabled under reduced-motion. ── */
.nmq-cosmos {
    position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
    --cc: var(--cosmos-color, var(--color-primary, #c9a84c));
}
.nmq-cosmos > span { position: absolute; display: block; }
.nmq-cosmos-stars { top: 0; left: 0; border-radius: 50%; background: transparent; }
.nmq-cosmos-stars-1 {
    width: 1.5px; height: 1.5px;
    box-shadow:
        10vw 20vh var(--cc), 80vw 15vh var(--cc), 40vw 60vh var(--cc), 90vw 80vh var(--cc),
        25vw 45vh var(--cc), 60vw 30vh var(--cc), 75vw 70vh var(--cc), 15vw 85vh var(--cc),
        50vw 10vh var(--cc), 35vw 90vh var(--cc),  5vw 50vh var(--cc), 95vw 40vh var(--cc),
        70vw 95vh var(--cc), 20vw 10vh var(--cc), 85vw 55vh var(--cc), 45vw 35vh var(--cc);
    animation: nmq-twinkle 3s infinite alternate, nmq-drift 36s ease-in-out infinite alternate !important;
}
.nmq-cosmos-stars-2 {
    width: 2.5px; height: 2.5px;
    box-shadow:
        15vw 75vh var(--cc), 85vw 35vh var(--cc), 45vw 25vh var(--cc), 65vw 85vh var(--cc),
         5vw 15vh var(--cc), 95vw 90vh var(--cc), 30vw 65vh var(--cc), 55vw 50vh var(--cc),
        78vw 22vh var(--cc), 12vw 38vh var(--cc);
    animation: nmq-twinkle 4.5s infinite alternate-reverse, nmq-drift 28s ease-in-out infinite alternate-reverse !important;
}
.nmq-cosmos-stars-3 {
    width: 3.5px; height: 3.5px;
    box-shadow:
        50vw 75vh var(--cc), 20vw 30vh var(--cc), 80vw 80vh var(--cc), 90vw 20vh var(--cc),
        38vw 12vh var(--cc), 68vw 58vh var(--cc);
    animation: nmq-twinkle 6s infinite alternate, nmq-drift 22s ease-in-out infinite alternate !important;
}
@keyframes nmq-twinkle { 0% { opacity: 0.15; } 100% { opacity: 0.8; } }
@keyframes nmq-drift  { from { transform: translate(0, 0); } to { transform: translate(-90px, 60px); } }
/* Rings: a bright arc on the top edge (the rest transparent) so the rotation is
   actually visible — a plain symmetric circle looks static when it spins. */
.nmq-cosmos-ring { top: 50%; left: 50%; border-radius: 50%; border: 2px solid transparent; border-top-color: var(--cc); }
.nmq-cosmos-ring-1 { width: clamp(300px,85vh,700px); height: clamp(300px,85vh,700px); opacity: 0.40; animation: nmq-spin 16s linear infinite !important; }
.nmq-cosmos-ring-2 { width: clamp(230px,65vh,540px); height: clamp(230px,65vh,540px); opacity: 0.50; animation: nmq-spin 12s linear infinite reverse !important; }
.nmq-cosmos-ring-3 { width: clamp(160px,45vh,380px); height: clamp(160px,45vh,380px); opacity: 0.60; animation: nmq-spin 8s linear infinite !important; }
@keyframes nmq-spin { from { transform: translate(-50%,-50%) rotate(0deg); } to { transform: translate(-50%,-50%) rotate(360deg); } }
.nmq-cosmos-glow {
    top: 50%; left: 50%; transform: translate(-50%,-50%);
    width: clamp(200px,60vh,500px); height: clamp(200px,60vh,500px); opacity: 0.10;
    background: radial-gradient(ellipse at center, var(--cc) 0%, transparent 70%);
}

/* ── Coloured one-sided accent bar on every card (top edge), site-wide on every
   template. Colour cycles through a 10-colour palette by card position so
   neighbouring cards never share a colour. ── */
.tool-card, .category-card { position: relative; }
.tool-card::before, .category-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: var(--card-accent, var(--color-primary, #c9a84c));
    z-index: 2;
}
.tool-grid > *:nth-child(10n+1),  .category-grid > *:nth-child(10n+1)  { --card-accent: #c9a84c; }
.tool-grid > *:nth-child(10n+2),  .category-grid > *:nth-child(10n+2)  { --card-accent: #4fd1c5; }
.tool-grid > *:nth-child(10n+3),  .category-grid > *:nth-child(10n+3)  { --card-accent: #b794f4; }
.tool-grid > *:nth-child(10n+4),  .category-grid > *:nth-child(10n+4)  { --card-accent: #f6ad55; }
.tool-grid > *:nth-child(10n+5),  .category-grid > *:nth-child(10n+5)  { --card-accent: #fc8181; }
.tool-grid > *:nth-child(10n+6),  .category-grid > *:nth-child(10n+6)  { --card-accent: #68d391; }
.tool-grid > *:nth-child(10n+7),  .category-grid > *:nth-child(10n+7)  { --card-accent: #63b3ed; }
.tool-grid > *:nth-child(10n+8),  .category-grid > *:nth-child(10n+8)  { --card-accent: #f687b3; }
.tool-grid > *:nth-child(10n+9),  .category-grid > *:nth-child(10n+9)  { --card-accent: #76e4f7; }
.tool-grid > *:nth-child(10n+10), .category-grid > *:nth-child(10n+10) { --card-accent: #d6bcfa; }

/* Emoji before a calculator's name on cards. */
.nmq-tool-emoji { font-style: normal; margin-right: 4px; }

/* ── Ad slots (admin-configured AdSense placements) ────────────────────── */

.ad-slot {
    max-width: 1140px;
    margin: 16px auto;
    padding: 0 20px;
    text-align: center;
    overflow: hidden;
}
.ad-slot-demo {
    border: 2px dashed var(--border, #c9a84c);
    border-radius: 8px;
    padding: 28px 20px;
    color: var(--muted, #888);
    font-size: 14px;
    letter-spacing: .04em;
    text-transform: uppercase;
    background: rgba(201, 168, 76, 0.06);
}

/* ── Header ──────────────────────────────────────────────────────────── */

.site-header {
    border-bottom: 1px solid var(--border);
    background: var(--bg);
}

.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 20px;
    max-width: 1280px;   /* a touch wider than the 1140 content container so the nav fits on one line */
}

.site-brand {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 20px;
    color: var(--color-primary);
}

.site-brand img { max-height: 40px; }

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: var(--text);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: nowrap;   /* keep everything (incl. My Account) on one line on desktop; the mobile block switches to a stacked menu */
}

.site-nav > a, .nav-dropdown-toggle {
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
    color: var(--text);
}

.site-nav > a:hover, .nav-dropdown-toggle:hover { color: var(--color-primary); }

.nav-account {
    background: var(--color-primary);
    color: #fff !important;
    padding: 8px 16px;
    border-radius: 8px;
}
/* Keep the button label visible on hover across every theme (some themes force
   a coloured link hover that would otherwise match the button background). */
.nav-account:hover, .nav-account:focus {
    color: #fff !important;
    text-decoration: none !important;
    filter: brightness(1.06);
}

/* Header search box - pill shaped */
.nav-search {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: 999px;
    overflow: hidden;
    background: var(--bg-alt);
    padding-left: 6px;
    transition: border-color .18s, box-shadow .18s;
}
.nav-search:focus-within {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 18%, transparent);
}
.nav-search input {
    border: none;
    outline: none;
    padding: 8px 8px 8px 12px;
    font-size: 14px;
    background: transparent;
    color: var(--text);
    width: 120px;
    font-family: inherit;
}
.nav-search input::placeholder { color: var(--muted); }
.nav-search, .nav-account { flex-shrink: 0; }   /* search box + account button keep their size; nav links absorb any tight fit */
.nav-search button {
    border: none;
    background: var(--color-primary);
    color: #fff;
    width: 34px;
    height: 34px;
    margin: 2px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: opacity .18s;
}
.nav-search button:hover { opacity: .85; }

.nav-dropdown {
    position: relative;
}

.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    padding: 8px;
    min-width: 220px;
    z-index: 30;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu {
    display: block;
}

.nav-dropdown-menu a {
    display: block;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    color: var(--text);
    font-weight: 500;
}

.nav-dropdown-menu a:hover {
    background: var(--bg-alt);
    text-decoration: none;
    color: var(--color-primary);
}

/* ── Footer ──────────────────────────────────────────────────────────── */

.site-footer {
    border-top: 1px solid var(--border);
    background: var(--bg-alt);
    margin-top: 48px;
}

.site-footer-inner {
    padding: 32px 20px;
    text-align: center;
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 18px;
    margin-bottom: 12px;
}

.footer-nav a, .footer-social a {
    font-size: 14px;
    color: var(--muted);
    font-weight: 500;
}

.footer-nav a:hover, .footer-social a:hover { color: var(--color-primary); }

.footer-social {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin-bottom: 12px;
}
.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    transition: color .15s, transform .15s;
}
.footer-social a:hover { color: var(--color-primary); transform: translateY(-2px); }

.footer-text {
    font-size: 13px;
    color: var(--muted);
    margin: 0;
}

/* ── Hero / page header ──────────────────────────────────────────────── */

.page-hero {
    background: linear-gradient(135deg, var(--color-primary) 0%, #312e81 100%);
    color: #fff;
    padding: 56px 20px;
    text-align: center;
}

.page-hero h1 {
    color: #fff;
    font-size: 32px;
    margin: 0 0 10px;
}

.page-hero p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 16px;
    max-width: 640px;
    margin: 0 auto;
}

/* ── Page / article content ─────────────────────────────────────────── */

.page {
    /* Vertical padding only. This element is always `.container page`, so its
       left/right padding must come from `.container` (0 20px). Using the
       `padding` shorthand here reset left/right to 0 (it is declared after
       `.container`, same specificity), which on mobile pushed every page/post/
       tool's body text flush to the screen edge where it was clipped. */
    padding-top: 40px;
    padding-bottom: 64px;
}

.page h1 {
    font-size: 28px;
    margin-bottom: 20px;
}

.content { font-size: 16px; }
.content h2 { font-size: 22px; margin-top: 32px; }
.content h3 { font-size: 18px; margin-top: 24px; }
.content p { margin: 0 0 16px; }
.content ul, .content ol { margin: 0 0 16px; padding-left: 24px; }
.content table { border-collapse: collapse; width: 100%; margin-bottom: 16px; }
.content table th, .content table td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; }

/* ── Category / tool grid ───────────────────────────────────────────── */

.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin: 24px 0;
}

.tool-card {
    display: block;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 18px;
    transition: box-shadow 0.15s, transform 0.15s;
}

.tool-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
    text-decoration: none;
}

.tool-card h3 {
    font-size: 16px;
    margin: 0 0 6px;
    color: var(--text);
}

.tool-card p {
    font-size: 13px;
    color: var(--muted);
    margin: 0;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 18px;
    margin: 24px 0;
}

.category-card {
    display: block;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text);
}

.category-card:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    text-decoration: none;
}

/* ── Forms (auth, account) ──────────────────────────────────────────── */

.auth-card {
    max-width: 420px;
    margin: 40px auto;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 32px;
}

.auth-card h1 { font-size: 22px; margin: 0 0 6px; }
.auth-card p.subtitle { color: var(--muted); font-size: 14px; margin: 0 0 20px; }

.auth-links { margin-top: 16px; font-size: 13px; text-align: center; }

.form-group { margin-bottom: 16px; }

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 6px;
    color: var(--text);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
}

input[type=text], input[type=email], input[type=password],
input[type=number], input[type=url], input[type=date],
select, textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    background: var(--bg);
    color: var(--text);
}

textarea { resize: vertical; min-height: 100px; }

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(91, 33, 182, 0.12);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 22px;
    border-radius: 8px;
    border: none;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
}

.btn:hover { text-decoration: none; }

.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { opacity: 0.9; }

.btn-secondary { background: var(--bg-alt); color: var(--text); border: 1px solid var(--border); }

.actions { margin-top: 20px; }

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 16px;
}

.alert-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.alert-success { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }

/* ── Blog ────────────────────────────────────────────────────────────── */

.blog-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 24px;
}
.blog-search { display: flex; max-width: 340px; flex: 1 1 240px; }
.blog-search input {
    flex: 1;
    padding: 9px 13px;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 6px 0 0 6px;
    font: inherit;
    background: var(--bg, #fff);
    color: inherit;
}
.blog-search button {
    padding: 9px 14px;
    border: 1px solid var(--color-primary, #5b21b6);
    background: var(--color-primary, #5b21b6);
    color: #fff;
    border-radius: 0 6px 6px 0;
    cursor: pointer;
}
.blog-categories { display: flex; flex-wrap: wrap; gap: 8px; }
.blog-cat {
    display: inline-block;
    padding: 5px 12px;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 999px;
    font-size: 13px;
    text-decoration: none;
    color: inherit;
    opacity: .85;
}
.blog-cat:hover { opacity: 1; border-color: var(--color-primary, #5b21b6); }
.blog-cat.active {
    background: var(--color-primary, #5b21b6);
    border-color: var(--color-primary, #5b21b6);
    color: #fff;
    opacity: 1;
}
.blog-heading { margin: 0 0 18px; font-size: 22px; }

/* Article table of contents + anchor offset */
.nmq-toc {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 20px;
    margin: 0 0 28px;
}
.nmq-toc-title { margin: 0 0 8px; font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .6px; opacity: .75; }
.nmq-toc ul { margin: 0; padding: 0; list-style: none; }
.nmq-toc li { margin: 5px 0; line-height: 1.4; }
.nmq-toc a { text-decoration: none; color: inherit; opacity: .9; }
.nmq-toc a:hover { color: var(--color-primary); text-decoration: underline; opacity: 1; }
.nmq-toc-l3 { padding-left: 16px; font-size: .95em; }
.content h2, .content h3 { scroll-margin-top: 90px; }

.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    margin: 24px 0;
}

.post-card {
    display: block;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow 0.15s, transform 0.15s;
}

.post-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
    text-decoration: none;
}

.post-card-image {
    aspect-ratio: 1200 / 630;   /* the card thumbnail area (rounded top corners come from the card's overflow:hidden) */
    background-size: cover;      /* fill edge-to-edge, no side bars; the full image is shown on the article page */
    background-position: center;
    background-color: var(--bg-alt);
}

.post-card-body { padding: 18px; }

.post-card-body h3 {
    font-size: 18px;
    margin: 0 0 8px;
    color: var(--text);
}

.post-card-body p {
    font-size: 14px;
    color: var(--muted);
    margin: 0 0 6px;
}

.post-meta {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-primary) !important;
    font-weight: 700;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 32px 0;
}

.pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-weight: 600;
    font-size: 14px;
}

.pagination a:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    text-decoration: none;
}

.pagination a.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

/* ── Calculator widget ───────────────────────────────────────────────── */

.numroq-calc {
    max-width: 720px;
    margin: 32px auto;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
}

.nmq-fields {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end; /* keep inputs aligned even when labels/hints wrap to 2+ lines */
    gap: 12px 14px;
    margin-bottom: 16px;
}

.nmq-field-wrap {
    flex: 1 1 200px;
    min-width: 0; /* allow shrink below content width so long labels don't overflow the row */
    display: flex;
    flex-direction: column;
}

.nmq-field-wrap label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--muted);
    margin-bottom: 6px;
    line-height: 1.35;
    overflow-wrap: anywhere; /* a long label wraps instead of stretching the row */
}

.nmq-field-hint {
    font-size: 11px;
    color: var(--muted);
    margin: -2px 0 6px;
    opacity: 0.85;
}

.nmq-field-wrap .nmq-field { margin-top: auto; } /* pin the input to the bottom of each equal-height wrap */

.nmq-field {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    background: var(--bg);
    color: var(--text);
    font-family: inherit;
}

.nmq-field:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(91, 33, 182, 0.12);
}

/* The date/time picker icon + timezone dropdown arrow follow the page
   color-scheme (set from the theme's --bg in the layout), so they stay visible
   on both light and dark themes. Just add a pointer + hover affordance here. */
.nmq-field::-webkit-calendar-picker-indicator {
    opacity: .85;
    cursor: pointer;
    padding: 2px;
    border-radius: 4px;
}
.nmq-field::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
    background: rgba(127, 127, 127, .18);
}

/* Sub-section heading inside a category page (e.g. Western / Vedic astrology). */
.nmq-subgroup-title {
    margin: 26px 0 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
    font-size: 18px;
}

/* "How this calculator works" transparency panel (E-E-A-T). */
.nmq-howto {
    max-width: 760px;
    margin: 18px auto 0;
    padding: 16px 18px;
    background: var(--bg-alt, rgba(127, 127, 127, .05));
    border: 1px solid var(--border);
    border-radius: 10px;
}
.nmq-howto-title {
    font-size: 17px;
    margin: 0 0 10px;
}
.nmq-howto p {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text);
    margin: 0 0 6px;
}
.nmq-howto p:last-child {
    margin-bottom: 0;
}

/* Trust / belief disclaimer shown under every calculator (E-E-A-T). */
.nmq-tool-disclaimer {
    max-width: 760px;
    margin: 14px auto 0;
    padding: 10px 14px;
    font-size: 13px;
    line-height: 1.6;
    color: var(--muted);
    background: var(--bg-alt, rgba(127, 127, 127, .06));
    border: 1px solid var(--border);
    border-radius: 8px;
}

.nmq-go {
    padding: 12px 28px;
    background: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.5px;
    cursor: pointer;
}

.nmq-go:disabled { opacity: 0.6; cursor: default; }

.nmq-err {
    display: none;
    color: #b91c1c;
    font-size: 13px;
    margin-top: 14px;
    padding: 10px 14px;
    border-radius: 8px;
    background: #fef2f2;
}

.nmq-res {
    display: none;
    margin-top: 20px;
}

.nmq-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.nmq-summary-item {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px 10px;
    text-align: center;
}

.nmq-summary-item .value {
    font-size: 22px;
    font-weight: 700;
    color: var(--color-primary);
    word-break: break-word;
    font-family: var(--font-heading);
}

.nmq-summary-item .label {
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

.nmq-table-wrap {
    display: none;
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
}

.nmq-table-wrap table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.nmq-table-wrap th, .nmq-table-wrap td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    text-align: center;
}

.nmq-table-wrap th {
    color: var(--muted);
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
}

.nmq-text {
    display: none;
    margin-top: 14px;
    font-size: 15px;
    line-height: 1.7;
    background: var(--bg-alt);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
}

.nmq-actions {
    margin-top: 16px;
    text-align: right;
}

.nmq-print {
    display: none;
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted);
    border-radius: 6px;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
}

/* ── Account: quick links, history, tickets, referrals ──────────────────── */

.quick-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* ── Account dashboard (horizontal layout) ─────────────────────────────── */
.dash-wrap { padding: 32px 0 48px; }
.dash-top {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
    align-items: start;
}
.dash-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 28px;
}
.dash-card h2 { font-size: 17px; margin: 0 0 16px; }
.dash-card .field-hint { color: var(--muted); font-size: 12px; }
.dash-footer { margin-top: 20px; font-size: 13px; }
@media (max-width: 760px) {
    .dash-top { grid-template-columns: 1fr; }
}

.quick-links a {
    display: inline-block;
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
    color: var(--text);
}

.quick-links a:hover {
    border-color: var(--color-primary);
    text-decoration: none;
}

.btn-small {
    padding: 6px 14px;
    font-size: 12px;
}

.history-item {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 16px;
}

.history-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 8px;
}

.history-item-header h2 {
    font-size: 16px;
    margin: 0;
}

.history-item-date {
    color: var(--muted);
    font-size: 13px;
    margin: 4px 0 0;
}

.history-item-result {
    margin-top: 12px;
}

.ticket-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 10px;
    color: var(--text);
}

.ticket-item:hover {
    border-color: var(--color-primary);
    text-decoration: none;
}

.ticket-item-subject {
    font-weight: 700;
}

.ticket-item-date {
    color: var(--muted);
    font-size: 13px;
    margin: 2px 0 0;
}

.ticket-thread {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ticket-message {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 18px;
    background: var(--bg);
}

.ticket-message-admin {
    background: var(--bg-alt);
    border-color: var(--color-primary);
}

.ticket-message-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 6px;
}

.ticket-message-body {
    font-size: 14px;
    white-space: pre-wrap;
}

.referral-link-row {
    display: flex;
    gap: 10px;
}

.referral-link-row input {
    flex: 1;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
}

.stat-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 18px 20px;
    text-align: center;
}

.stat-card .value {
    font-size: 28px;
    font-weight: 700;
    color: var(--color-primary);
}

.stat-card .label {
    font-size: 13px;
    color: var(--muted);
    margin-top: 4px;
}

.badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 999px;
}

.badge-open, .badge-ok { background: #ecfdf5; color: #047857; }
.badge-awaiting_reply, .badge-warn { background: #fffbeb; color: #b45309; }
.badge-closed, .badge-muted { background: #f3f4f6; color: #6b7280; }

/* Reuses admin table styling for front-end referral history / etc. */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.admin-table th, .admin-table td {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
}

.admin-table th {
    color: var(--muted);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ── Print ───────────────────────────────────────────────────────────── */

/* Print uses a popup window (site.js) - no body class manipulation needed */
.numroq-print-overlay { display: none; }

/* ── Home page sections ─────────────────────────────────────────────── */

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
}

.page-hero .btn-primary { background: #fff; color: var(--color-primary); }
.page-hero .btn-primary:hover { opacity: 0.9; }

.page-hero .btn-secondary {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.page-hero .btn-secondary:hover { background: rgba(255, 255, 255, 0.25); }

.category-hero-icon { font-size: 40px; margin-bottom: 8px; }

.stats-band {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin: 32px 0;
    text-align: center;
}

.stat-item {
    padding: 20px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    color: var(--color-primary);
}

.stat-label {
    font-size: 13px;
    color: var(--muted);
    margin-top: 4px;
}

.category-card .icon { font-size: 32px; margin-bottom: 8px; }

.category-card-count {
    font-size: 12px;
    font-weight: 500;
    color: var(--muted);
    margin-top: 4px;
}

.how-it-works {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin: 24px 0;
}

.step-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    font-weight: 700;
    margin-bottom: 12px;
}

.step-card h3 { margin: 0 0 8px; font-size: 16px; }
.step-card p { margin: 0; font-size: 14px; color: var(--muted); }

.cta-band {
    margin: 40px 0;
    padding: 40px 24px;
    text-align: center;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.cta-band h2 { margin-top: 0; }
.cta-band p { color: var(--muted); margin-bottom: 20px; }

/* Trending tool-card rating badge */
.tool-card-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    margin: 2px 0 8px;
}
.tool-card-stars { color: #f59e0b; }
.tool-card-rating strong { color: var(--text); }
.nmq-muted { color: var(--muted); }

/* Reference table (guide pages, e.g. What Is Numerology) */
.nmq-ref-table {
    width: 100%;
    border-collapse: collapse;
    margin: 18px 0;
    font-size: 15px;
}
.nmq-ref-table th, .nmq-ref-table td {
    text-align: left;
    padding: 11px 14px;
    border-bottom: 1px solid var(--border);
}
.nmq-ref-table th {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--muted);
    background: var(--bg-alt);
}
.nmq-ref-table td a { color: var(--color-primary); font-weight: 600; text-decoration: none; }
.nmq-ref-table td a:hover { text-decoration: underline; }

/* Home "Latest from the Blog" */
.nmq-home-blog { margin: 48px 0; }
.nmq-blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}
.nmq-blog-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform .18s, box-shadow .18s, border-color .18s;
}
.nmq-blog-card:hover {
    transform: translateY(-3px);
    border-color: var(--color-primary);
    box-shadow: 0 8px 28px rgba(0,0,0,0.12);
}
.nmq-blog-card-img {
    aspect-ratio: 1200 / 630;   /* the card thumbnail area (rounded top corners come from the card's overflow:hidden) */
    background-size: cover;      /* fill edge-to-edge, no side bars; the full image is shown on the article page */
    background-position: center;
    background-color: var(--bg-alt);
}
.nmq-blog-card-body { padding: 16px 18px; }
.nmq-blog-card-body h3 { margin: 0 0 8px; font-size: 17px; }
.nmq-blog-card-body p {
    margin: 0 0 10px;
    font-size: 14px;
    color: var(--muted);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.nmq-blog-card-date { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }

.contact-form {
    max-width: 600px;
    margin: 32px auto 0;
    padding: 24px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.contact-details {
    max-width: 600px;
    margin: 28px auto 0;
    padding: 16px 24px;
    background: var(--bg-alt, var(--bg));
    border: 1px solid var(--border);
    border-radius: 12px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 12px 28px;
}
.contact-details p {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
}
.contact-details a {
    color: var(--text);
    text-decoration: none;
}
.contact-details a:hover { text-decoration: underline; }

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin: 24px 0;
}

.pricing-card {
    padding: 24px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    text-align: center;
}

.pricing-card h3 { margin: 0 0 12px; }

.pricing-price {
    font-size: 32px;
    font-weight: 800;
    color: var(--color-primary);
    margin-bottom: 12px;
}

.pricing-price span {
    font-size: 14px;
    font-weight: 600;
    color: var(--muted);
}

.pricing-card p { color: var(--muted); margin-bottom: 20px; }
.pricing-card form { margin: 0; }

/* ── New home + category sections ───────────────────────────────────────── */

.nmq-section-sub {
    color: var(--muted);
    font-size: 15px;
    margin: -10px 0 20px;
    max-width: 640px;
}
.nmq-lead {
    font-size: 17px;
    line-height: 1.75;
    color: var(--text);
    max-width: 760px;
    margin-bottom: 24px;
}

/* Tradition ticker */
.nmq-ticker {
    overflow: hidden;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: var(--bg-alt);
    padding: 14px 0;
}
.nmq-ticker-track {
    display: flex;
    width: max-content;
    animation: nmq-ticker-scroll 36s linear infinite;
}
@keyframes nmq-ticker-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-33.333%); }
}
.nmq-ticker-pill {
    display: flex; align-items: center; gap: 8px;
    padding: 0 32px; border-right: 1px solid var(--border);
    white-space: nowrap; font-size: 13px; font-weight: 600; color: var(--muted);
}
.nmq-ticker-dot {
    width: 5px; height: 5px; border-radius: 50%;
    background: var(--color-primary); flex-shrink: 0;
}

/* Category card enhancements */
.category-card-name { font-weight: 700; font-size: 15px; margin-bottom: 6px; }
.category-card-desc { font-size: 12px; color: var(--muted); line-height: 1.5; margin-bottom: 6px; font-weight: 400; }

/* Quality pillars */
.nmq-pillars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px; margin: 20px 0 40px;
}
.nmq-pillar {
    background: var(--bg-alt); border: 1px solid var(--border);
    border-radius: 12px; padding: 28px 24px;
}
.nmq-pillar-icon { font-size: 28px; margin-bottom: 14px; }
.nmq-pillar h3 { font-size: 17px; margin: 0 0 10px; }
.nmq-pillar p { font-size: 14px; color: var(--muted); margin: 0; line-height: 1.7; }

/* FAQ section */
.nmq-faq { margin: 40px 0; }
.nmq-faq-item {
    border: 1px solid var(--border); border-radius: 10px;
    padding: 22px 24px; margin-bottom: 12px; background: var(--bg);
}
.nmq-faq-item h3 { font-size: 16px; margin: 0 0 10px; color: var(--text); }
.nmq-faq-item p { font-size: 15px; color: var(--muted); margin: 0; line-height: 1.75; }

/* About page */
.nmq-about h2, .nmq-about h3 { margin-top: 36px; margin-bottom: 14px; }
.nmq-about h2:first-child { margin-top: 0; }
.nmq-about p { margin-bottom: 16px; }
.nmq-about ul, .nmq-traditions-list, .nmq-standards, .nmq-contact-options {
    list-style: none; padding-left: 0;
}
.nmq-about ul li, .nmq-traditions-list li, .nmq-standards li, .nmq-contact-options li {
    padding: 10px 0; border-bottom: 1px solid var(--border);
    font-size: 15px; line-height: 1.7;
}
.nmq-about ul li:last-child, .nmq-traditions-list li:last-child,
.nmq-standards li:last-child, .nmq-contact-options li:last-child { border-bottom: none; }

.nmq-mission-cards {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px; margin: 28px 0;
}
.nmq-mission-card {
    background: var(--bg-alt); border: 1px solid var(--border);
    border-radius: 10px; padding: 20px 18px;
}
.nmq-mission-icon { font-size: 24px; margin-bottom: 10px; display: block; }
.nmq-mission-card h3 { font-size: 15px; margin: 0 0 6px; }
.nmq-mission-card p { font-size: 13px; color: var(--muted); margin: 0; }

.nmq-trust-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px; margin-top: 20px;
}
.nmq-trust-item {
    background: var(--bg-alt); border: 1px solid var(--border);
    border-radius: 10px; padding: 20px 18px;
}
.nmq-trust-icon { font-size: 22px; margin-bottom: 10px; display: block; }
.nmq-trust-item h3 { font-size: 15px; margin: 0 0 6px; }
.nmq-trust-item p { font-size: 13px; color: var(--muted); margin: 0; line-height: 1.65; }

.nmq-cta-band {
    text-align: center; padding: 40px 24px;
    background: var(--bg-alt); border: 1px solid var(--border);
    border-radius: 12px; margin-top: 36px;
}
.nmq-cta-band h2 { margin: 0 0 10px; }
.nmq-cta-band p { color: var(--muted); margin-bottom: 20px; }

.nmq-page-content h2 { margin-top: 32px; font-size: 20px; }
.nmq-page-content p { margin-bottom: 14px; font-size: 15px; line-height: 1.75; }
.nmq-page-content a { color: var(--color-primary); }

/* Category page */
.nmq-trad-intro {
    background: var(--bg-alt); border: 1px solid var(--border);
    border-radius: 10px; padding: 20px 24px; margin-bottom: 28px;
}
.nmq-trad-intro p { font-size: 15px; line-height: 1.75; color: var(--text); margin: 0; }

.nmq-tradition-nav { margin-top: 48px; }
.nmq-trad-links {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px; margin-top: 16px;
}
.nmq-trad-link {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 16px; background: var(--bg); border: 1px solid var(--border);
    border-radius: 8px; text-decoration: none; transition: border-color 0.15s;
}
.nmq-trad-link:hover { border-color: var(--color-primary); text-decoration: none; }
.nmq-trad-link-icon { font-size: 18px; flex-shrink: 0; }
.nmq-trad-link-name { font-size: 13px; font-weight: 600; color: var(--text); flex: 1; }
.nmq-trad-link-count { font-size: 11px; color: var(--muted); white-space: nowrap; }

/* ── Tier cards (homepage free/account/premium section) ─────────────── */
.nmq-tiers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 56px;
    align-items: start;
}
.nmq-tier-card {
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 12px;
    padding: 28px 24px;
    background: var(--card-bg, #fff);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: box-shadow .2s;
}
.nmq-tier-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,.08); }
.nmq-tier-premium { border-color: var(--color-primary, #5b21b6); border-width: 2px; }
.nmq-tier-badge {
    position: absolute; top: 12px; right: 12px;
    background: var(--color-primary, #5b21b6); color: #fff;
    font-size: 11px; font-weight: 700; padding: 3px 10px;
    border-radius: 20px; text-transform: uppercase; letter-spacing: .5px;
}
.nmq-tier-icon { font-size: 2rem; line-height: 1; }
.nmq-tier-name { font-family: var(--font-heading, sans-serif); font-size: 1.15rem; font-weight: 700; color: var(--text, #111); }
.nmq-tier-desc { font-size: 13px; color: var(--muted, #6b7280); margin: 0; }
.nmq-tier-features {
    list-style: none; padding: 0; margin: 8px 0; flex: 1;
    display: flex; flex-direction: column; gap: 8px;
}
.nmq-tier-features li {
    font-size: 14px; color: var(--text, #374151);
    padding-left: 20px; position: relative;
}
.nmq-tier-features li::before {
    content: '✓'; position: absolute; left: 0;
    color: var(--color-primary, #5b21b6); font-weight: 700;
}
.nmq-tier-btn { width: 100%; text-align: center; display: block; margin-top: 4px; }

/* ── Pricing page ────────────────────────────────────────────────────── */
.nmq-pricing-hero { text-align: center; }
.nmq-pricing-page { padding-top: 40px; }
.nmq-alert { padding: 12px 18px; border-radius: 8px; margin-bottom: 28px; font-size: 14px; }
.nmq-alert-success { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }

.nmq-pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin-bottom: 56px;
    align-items: start;
}

.nmq-plan-card {
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 12px;
    overflow: hidden;
    background: var(--card-bg, #fff);
    display: flex;
    flex-direction: column;
    position: relative;
    transition: box-shadow .2s, transform .2s;
}
.nmq-plan-card:hover { box-shadow: 0 8px 28px rgba(0,0,0,.1); transform: translateY(-2px); }
.nmq-plan-featured { border-color: var(--color-primary, #5b21b6); border-width: 2px; }

.nmq-plan-badge {
    position: absolute; top: 12px; right: 12px;
    background: var(--color-primary, #5b21b6); color: #fff;
    font-size: 11px; font-weight: 700; padding: 3px 10px;
    border-radius: 20px; text-transform: uppercase; letter-spacing: .5px;
}

.nmq-plan-header { padding: 28px 24px 20px; }
.nmq-plan-tier { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--color-primary, #5b21b6); margin-bottom: 10px; }
.nmq-plan-price-wrap { display: flex; align-items: baseline; gap: 4px; margin-bottom: 8px; }
.nmq-price-amount { font-size: 2.6rem; font-weight: 800; font-family: var(--font-heading, sans-serif); color: var(--text, #111); line-height: 1; }
.nmq-price-period { font-size: 14px; color: var(--muted, #6b7280); font-weight: 500; }
.nmq-plan-tagline { font-size: 13px; color: var(--muted, #6b7280); margin: 0; }

.nmq-plan-features {
    list-style: none; margin: 0; padding: 0 24px 20px; flex: 1;
    display: flex; flex-direction: column; gap: 10px;
}
.nmq-plan-features li {
    font-size: 14px; color: var(--text, #374151);
    padding-left: 22px; position: relative;
}
.nmq-plan-features li::before {
    content: '✓'; position: absolute; left: 0; top: 0;
    color: var(--color-primary, #5b21b6); font-weight: 700;
}
.nmq-plan-free .nmq-plan-features li::before { color: var(--muted, #9ca3af); }

.nmq-plan-cta { padding: 0 24px 24px; }
.nmq-plan-btn { width: 100%; text-align: center; display: block; }

/* Feature comparison table */
.nmq-compare-section { margin: 0 0 56px; }
.nmq-compare-section h2 { font-size: 1.4rem; margin-bottom: 20px; font-family: var(--font-heading, sans-serif); }
.nmq-compare-table-wrap { overflow-x: auto; }
.nmq-compare-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.nmq-compare-table th,
.nmq-compare-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border, #e5e7eb); }
.nmq-compare-table th { font-weight: 700; font-family: var(--font-heading, sans-serif); background: var(--bg-alt, #f9fafb); }
.nmq-compare-table td:not(:first-child) { text-align: center; color: var(--muted, #6b7280); }
.nmq-chk { color: var(--color-primary, #5b21b6) !important; font-weight: 700; font-size: 16px; }

.nmq-pricing-faq { margin-bottom: 56px; }
.nmq-pricing-cta { margin-bottom: 56px; }

/* Template gallery color swatch preview */
.template-color-preview {
    width: 100%; height: 100%;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 12px; padding: 20px;
    box-sizing: border-box;
}
.tcp-bar { width: 100%; height: 4px; border-radius: 2px; position: absolute; top: 0; left: 0; }
.tcp-title { font-size: 14px; font-weight: 700; letter-spacing: .5px; }
.tcp-swatches { display: flex; gap: 8px; }
.tcp-swatch { width: 24px; height: 24px; border-radius: 50%; display: inline-block; }
.tcp-lines { width: 100%; display: flex; flex-direction: column; gap: 6px; align-items: center; }
.tcp-line { height: 6px; border-radius: 3px; }

/* ── Tools listing page (/tools) ────────────────────────────────────── */
.nmq-tools-page { padding-top: 32px; padding-bottom: 56px; }

.nmq-tools-filter {
    margin-bottom: 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.nmq-tool-search {
    width: 100%;
    max-width: 520px;
    padding: 10px 16px;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 8px;
    font-size: 15px;
    background: var(--card-bg, #fff);
    color: var(--text, #111);
}
.nmq-tool-search:focus { outline: none; border-color: var(--color-primary, #5b21b6); }
.nmq-cat-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.nmq-cat-btn {
    padding: 7px 14px;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 20px;
    background: var(--card-bg, #fff);
    color: var(--text, #374151);
    font-size: 13px;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s;
    white-space: nowrap;
}
.nmq-cat-btn:hover,
.nmq-cat-btn.active {
    background: var(--color-primary, #5b21b6);
    border-color: var(--color-primary, #5b21b6);
    color: #fff;
}
.nmq-cat-count {
    display: inline-block;
    background: rgba(0,0,0,.08);
    border-radius: 10px;
    padding: 0 6px;
    font-size: 11px;
    margin-left: 4px;
}
.nmq-cat-btn.active .nmq-cat-count { background: rgba(255,255,255,.25); }

.nmq-tools-section { margin-bottom: 48px; }
.nmq-tools-cat-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.15rem;
    color: var(--text, #111);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border, #e5e7eb);
}
.nmq-tools-cat-icon { font-size: 1.3em; }
.nmq-tools-cat-badge {
    margin-left: auto;
    font-size: 12px;
    font-weight: 500;
    color: var(--muted, #6b7280);
    background: var(--bg, #f9fafb);
    border: 1px solid var(--border, #e5e7eb);
    padding: 2px 10px;
    border-radius: 12px;
}
.nmq-tools-empty {
    padding: 60px 20px;
    text-align: center;
    color: var(--muted, #6b7280);
    font-size: 15px;
}

/* ── Responsive ──────────────────────────────────────────────────────── */

@media (max-width: 1200px) {
    .nav-toggle { display: block; }

    .site-nav {
        display: none;
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        gap: 6px;
        padding: 12px 0;
        border-top: 1px solid var(--border);
        margin-top: 12px;
    }

    .site-header-inner { flex-wrap: wrap; }

    .site-nav.open { display: flex; }

    .nav-dropdown { width: 100%; }

    .nav-dropdown-menu {
        position: static;
        border: none;
        box-shadow: none;
        padding-left: 12px;
        display: none;
    }

    .nav-dropdown.open .nav-dropdown-menu { display: block; }
}

/* ── Star Rating Widget ───────────────────────────────────────────────── */

.nmq-rating-widget {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.nmq-stars {
    display: flex;
    gap: 3px;
}

.nmq-star {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.6rem;
    color: rgba(255, 255, 255, 0.65);
    padding: 2px;
    line-height: 1;
    transition: color .15s, transform .1s;
}

.nmq-star:hover,
.nmq-star.hover,
.nmq-star.active { color: var(--color-secondary, #f59e0b); }

.nmq-star:hover { transform: scale(1.15); }

.nmq-rating-summary {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.65);
}

.nmq-rating-summary strong { color: #fff; font-size: 1.05rem; }

.nmq-rating-count { margin-left: 4px; }

.nmq-rating-prompt { font-style: italic; }

/* ── Social Share Bar ────────────────────────────────────────────────── */

.nmq-share-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--border, #e5e7eb);
}

.nmq-share-label {
    font-size: 0.85rem;
    color: var(--muted, #6b7280);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.nmq-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 500;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: opacity .15s;
}

.nmq-share-btn:hover { opacity: 0.85; text-decoration: none; }

.nmq-share-btn.whatsapp { background: #25D366; color: #fff; }
.nmq-share-btn.facebook { background: #1877F2; color: #fff; }
.nmq-share-btn.twitter  { background: #000; color: #fff; }

.nmq-share-btn.copy {
    background: var(--bg-alt, #f9fafb);
    color: var(--text, #374151);
    border-color: var(--border, #e5e7eb);
}

/* ── Cookie Consent Banner ───────────────────────────────────────────── */

.nmq-cookie-banner {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: #1f2937;
    color: #f9fafb;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    z-index: 9999;
    font-size: 0.9rem;
    box-shadow: 0 -4px 20px rgba(0,0,0,.25);
}

.nmq-cookie-banner p { margin: 0; flex: 1; min-width: 200px; }

.nmq-cookie-banner .nmq-cookie-actions {
    display: flex;
    gap: 10px;
}

.nmq-cookie-accept {
    background: var(--color-primary, #5b21b6);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 18px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
}

.nmq-cookie-decline {
    background: transparent;
    color: #9ca3af;
    border: 1px solid #4b5563;
    border-radius: 6px;
    padding: 8px 14px;
    font-size: 0.88rem;
    cursor: pointer;
}

/* ── Newsletter Band ─────────────────────────────────────────────────── */

.nmq-newsletter-band {
    background: var(--color-primary, #5b21b6);
    color: #fff;
    padding: 48px 20px;
    text-align: center;
    margin-top: 48px;
}

.nmq-newsletter-band h2 {
    margin: 0 0 8px;
    color: #fff;
    font-size: 1.6rem;
}

.nmq-newsletter-band p {
    margin: 0 0 20px;
    opacity: .85;
    font-size: 1rem;
}

.nmq-newsletter-form {
    display: flex;
    max-width: 480px;
    margin: 0 auto;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;   /* keep the button centred when it wraps below the input on mobile */
}

.nmq-newsletter-form input[type="email"] {
    flex: 1;
    min-width: 220px;
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
}

.nmq-newsletter-form button {
    padding: 12px 24px;
    background: var(--color-secondary, #f59e0b);
    color: #111;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: opacity .15s;
}

.nmq-newsletter-form button:hover { opacity: .9; }

.nmq-newsletter-msg {
    margin-top: 10px;
    font-size: 0.88rem;
    opacity: .9;
}

/* ── Breadcrumbs ─────────────────────────────────────────────────────── */

.nmq-breadcrumb {
    padding: 10px 0;
    font-size: 0.83rem;
    color: var(--muted, #6b7280);
    border-bottom: 1px solid var(--border, #e5e7eb);
    margin-bottom: 20px;
}

.nmq-breadcrumb ol {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

.nmq-breadcrumb li { display: flex; align-items: center; gap: 4px; }

.nmq-breadcrumb li + li::before {
    content: '›';
    color: var(--border, #d1d5db);
}

.nmq-breadcrumb a { color: var(--color-primary, #5b21b6); }
.nmq-breadcrumb a:hover { text-decoration: underline; }

.nmq-breadcrumb li:last-child span { color: var(--muted, #6b7280); }

/* ── Related Tools ───────────────────────────────────────────────────── */

.nmq-related {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--border, #e5e7eb);
}

.nmq-related-heading {
    margin: 0 0 20px;
    font-size: 1.2rem;
    color: var(--text, #111);
}

/* ── Ad Zone ─────────────────────────────────────────────────────────── */

.ad-zone {
    margin: 20px 0;
    text-align: center;
    min-height: 10px;
}

/* ── Content + sidebar layout (shows when the Sidebar ad zone is active) ── */
.page-layout.has-sidebar {
    display: flex;
    gap: 32px;
    align-items: flex-start;
}
.page-layout.has-sidebar .page-main {
    flex: 1 1 auto;
    min-width: 0;
}
.page-layout.has-sidebar .page-sidebar {
    flex: 0 0 300px;
    width: 300px;
    position: sticky;
    top: 20px;
}
.page-sidebar .ad-zone { margin-top: 0; }
.post-category{display:inline-block;font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.5px;color:var(--color-primary,#5b21b6);margin-bottom:6px}

/* ── Author box (end of article) + author page ── */
.author-box{display:flex;gap:18px;align-items:flex-start;margin:36px 0 8px;padding:20px;border:1px solid var(--border,#e5e7eb);border-radius:12px;background:var(--bg-alt,#f9fafb)}
.author-box-avatar{width:72px;height:72px;border-radius:50%;object-fit:cover;flex:0 0 72px}
.author-box-name{margin:0 0 6px;font-weight:700;font-size:16px}
.author-box-name a{color:inherit;text-decoration:none}
.author-box-title{display:block;font-weight:400;font-size:13px;color:var(--muted,#6b7280)}
.author-box-bio{margin:0 0 8px;font-size:14px;line-height:1.6;color:var(--muted,#374151)}
.author-box-links a{font-size:13px;font-weight:600;margin-right:14px;color:var(--color-primary,#5b21b6);text-decoration:none}
.author-hero{display:flex;gap:20px;align-items:center}
.author-hero-avatar{width:96px;height:96px;border-radius:50%;object-fit:cover;flex:0 0 96px}
.author-hero-title{margin:4px 0 8px;opacity:.85}
.author-page-bio{font-size:16px;line-height:1.7;max-width:720px;margin:0 0 32px}
@media(max-width:600px){.author-box{flex-direction:column}.author-hero{flex-direction:column;text-align:center}}
@media (max-width: 900px) {
    /* Stack with the article first, ads after, so content leads on mobile. */
    .page-layout.has-sidebar { flex-direction: column; }
    .page-layout.has-sidebar .page-main { order: 0; }
    .page-layout.has-sidebar .page-sidebar {
        order: 1;
        flex-basis: auto;
        width: 100%;
        margin-top: 28px;
        position: static;
    }
}

/* ── Testimonials ────────────────────────────────────────────────────── */

.nmq-testimonials {
    padding: 64px 0;
    background: var(--bg-alt, #f9fafb);
}

.nmq-testimonials h2 {
    text-align: center;
    margin: 0 0 36px;
    font-size: 1.6rem;
}

.nmq-testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.nmq-testimonial-card {
    background: var(--bg, #fff);
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 12px;
    padding: 24px;
}

.nmq-testimonial-stars {
    color: var(--color-secondary, #f59e0b);
    font-size: 1rem;
    margin-bottom: 10px;
}

.nmq-testimonial-content {
    font-size: 0.95rem;
    color: var(--text, #374151);
    line-height: 1.65;
    margin: 0 0 14px;
}

.nmq-testimonial-author strong {
    display: block;
    font-size: 0.92rem;
    color: var(--text, #111);
}

.nmq-testimonial-author span {
    font-size: 0.82rem;
    color: var(--muted, #6b7280);
}

/* ── Tool result visual charts (Kundli, Western wheel, grids, biorhythm) ── */
.nmq-visual { margin: 18px 0 6px; }
.nmq-chart-wrap { text-align: center; margin: 0 auto 10px; }
.nmq-chart-title { font-size: 14px; font-weight: 600; opacity: .8; margin-bottom: 8px; }
.nmq-chart-svg { display: block; margin: 0 auto; }
.nmq-grid3 { display: inline-grid; grid-template-columns: repeat(3, 64px); grid-auto-rows: 64px; gap: 4px; margin: 0 auto; }
.nmq-grid3-cell {
  display: flex; align-items: center; justify-content: center;
  border: 1px solid currentColor; border-radius: 8px;
  font-size: 18px; font-weight: 600; letter-spacing: 2px;
  opacity: .92; min-height: 64px;
}
.nmq-grid3-cell:empty::after { content: '·'; opacity: .25; font-weight: 400; }
.nmq-bio-legend { font-size: 12px; margin-top: 6px; opacity: .85; }
.nmq-bio-legend span { margin: 0 8px; }

/* ── Place of birth autocomplete ─────────────────────────────────────────── */
/* Span the whole row so it sits above the paired fields instead of squeezing
   into one flex cell. */
.nmq-place { position: relative; flex: 1 1 100%; }
.nmq-place .nmq-place-input { width: 100%; }
/* Mirror the input's own theme colours so the dropdown is always readable
   (the previous var(--card)/inherit pair fell back to white-on-light). */
.nmq-place-results {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 60;
  background: var(--bg); color: var(--text);
  border: 1px solid var(--border); border-radius: 8px;
  margin-top: 4px; max-height: 260px; overflow-y: auto;
  box-shadow: 0 10px 28px rgba(0,0,0,.30);
}
.nmq-place-opt {
  padding: 10px 13px; cursor: pointer; font-size: 14px;
  color: var(--text); background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.nmq-place-opt:last-child { border-bottom: 0; }
.nmq-place-opt:hover, .nmq-place-opt.active { background: var(--color-primary); color: #fff; }
.nmq-place-manual {
  display: inline-block; margin-top: 6px; padding: 0;
  background: none; border: 0; cursor: pointer;
  color: var(--color-primary); font-size: 12.5px; text-decoration: underline;
}

/* ── RTL support (Urdu, Arabic) ──────────────────────────────────────────── */
[dir="rtl"] { text-align: right; }
[dir="rtl"] input, [dir="rtl"] textarea, [dir="rtl"] select, [dir="rtl"] .nmq-field { text-align: right; }
[dir="rtl"] ul, [dir="rtl"] ol { padding-right: 22px; padding-left: 0; }
[dir="rtl"] .breadcrumbs, [dir="rtl"] .nmq-table-wrap table { direction: rtl; }
[dir="rtl"] th, [dir="rtl"] td { text-align: right; }
[dir="rtl"] .nmq-place-results, [dir="rtl"] .nav-dropdown-menu { text-align: right; }
[dir="rtl"] .nmq-summary-item { text-align: right; }
/* Custom check-mark bullet lists: move the marker to the right in RTL so it
   sits beside the text instead of floating on the far left. */
[dir="rtl"] .nmq-tier-features li,
[dir="rtl"] .nmq-plan-features li,
[dir="rtl"] .nmq-report-list li,
[dir="rtl"] .nmq-tier-card .nmq-tier-features li { padding-left: 0; padding-right: 22px; }
[dir="rtl"] .nmq-tier-features li::before,
[dir="rtl"] .nmq-plan-features li::before,
[dir="rtl"] .nmq-report-list li::before { left: auto; right: 0; }
/* Lists with their own left padding/markers (home pillars, how-it-works, etc.). */
[dir="rtl"] .content ul, [dir="rtl"] .content ol,
[dir="rtl"] .nmq-report-feature-text ul { padding-right: 24px; padding-left: 0; }
/* Inline directional arrows (›) read the other way round in RTL. */
[dir="rtl"] .nmq-day-links a, [dir="rtl"] .nmq-section-sub a { unicode-bidi: plaintext; }

/* ── Reusable affiliate / recommendation card (.nmq-aff) ──────────────────────
   Site-wide (works in blog posts, pages and docs). Paste the markup into any
   article via the editor's Code/Source view to add a promo card. */
.nmq-aff{margin:28px 0;padding:24px;border:2px solid var(--color-secondary,#f59e0b);border-radius:16px;background:linear-gradient(180deg,rgba(245,158,11,.10),transparent);text-align:center}
.nmq-aff-badge{display:inline-block;background:var(--color-secondary,#f59e0b);color:#231603;font-weight:700;font-size:11.5px;letter-spacing:.05em;text-transform:uppercase;padding:4px 12px;border-radius:20px;margin-bottom:10px}
.nmq-aff-title{margin:0 0 8px;font-size:clamp(20px,3vw,24px)}
.nmq-aff p{margin:0 auto 16px;max-width:580px;line-height:1.65}
.nmq-aff-btn{display:inline-block;background:var(--color-secondary,#f59e0b);color:#231603;font-weight:700;padding:12px 26px;border-radius:30px;text-decoration:none;font-size:15px}
.nmq-aff-btn:hover{filter:brightness(1.07)}

/* Horoscope period tabs (daily / weekly / monthly / yearly) */
.nmq-horo-tabs{display:flex;gap:8px;flex-wrap:wrap;justify-content:center;margin-top:14px}
.nmq-horo-tabs a{display:inline-block;padding:7px 18px;border:1px solid rgba(255,255,255,.35);border-radius:999px;font-size:13px;font-weight:600;text-decoration:none;background:rgba(15,15,35,.55);color:#fff;opacity:1}
.nmq-horo-tabs a:hover{border-color:#fff;background:rgba(15,15,35,.78)}
.nmq-horo-tabs a.active{background:#fff;color:#15152b;border-color:#fff;opacity:1;font-weight:700}
