/*
 * GoldRates V3 Beta Homepage
 * ---------------------------------------------------------
 * Structure:
 * 01. Design tokens & global container
 * 02. Header
 * 03. Hero
 * 04. Hero content, trust items & email form
 * 05. Live gold price card
 * 06. Hero responsive rules
 * 07. Quick Answers
 * 08. Gold Market Gauge
 * 09. Gauge interpretation & gold value calculator
 * 10. Enhanced live price card
 * 11. Today vs Yesterday comparison table
 *
 * Keep component rules inside their relevant section.
 * Compatibility overrides are used only where the parent
 * WordPress theme requires stronger specificity.
 */

:root {
    --ref-navy: #06172b;
    --ref-navy-dark: #041223;
    --ref-panel: #0a2744;
    --ref-gold: #dca51f;
    --ref-gold-light: #f5cc62;
    --ref-white: #ffffff;
    --ref-muted: #b8c4d1;
    --ref-border: rgba(255, 255, 255, 0.13);
    --ref-container: 1540px;
}

html {
    scroll-behavior: smooth;
}

#gold-price-today,
#gold-calculator,
#gold-purity,
#gold-market,
#gold-history,
#gold-by-currency {
    scroll-margin-top: 96px;
}

/* =========================================================
   GLOBAL HOMEPAGE CONTAINER
   ========================================================= */

.ref-container {
    width: calc(100% - 44px);
    max-width: var(--ref-container);
    margin-right: auto;
    margin-left: auto;
}

/* =========================================================
   HEADER
   ========================================================= */

.ref-header {
    position: relative;
    z-index: 100;
    width: 100%;
    background: var(--ref-navy-dark);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ref-header__inner {
    width: calc(100% - 44px);
    max-width: var(--ref-container);
    min-height: 72px;
    margin-right: auto;
    margin-left: auto;
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr) auto;
    align-items: center;
    gap: 22px;
}

.ref-brand {
    min-width: 0;
    height: 72px;
    display: flex;
    align-items: center;
    overflow: visible;
}

.ref-brand__logo {
    display: block;
    width: 255px;
    max-width: none;
    height: auto;
    object-fit: contain;
}

.ref-nav {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(15px, 1.15vw, 26px);
}

.ref-nav a {
    color: #f5f7fa;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    transition:
        color 0.2s ease,
        opacity 0.2s ease;
}

.ref-nav a:hover {
    color: var(--ref-gold-light);
}

.ref-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.ref-watchlist {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #f5f7fa;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.ref-watchlist span {
    color: var(--ref-gold);
    font-size: 19px;
    line-height: 1;
}

.ref-currency {
    display: block;
}

.ref-currency select {
    width: 70px;
    height: 36px;
    padding: 0 9px;
    color: #ffffff;
    background: #0b223b;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 5px;
    outline: none;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}

.ref-signup {
    min-width: 72px;
    height: 36px;
    padding: 0 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #111d2f;
    background: linear-gradient(180deg, #f7d36c, #d69d18);
    border: 1px solid #eac052;
    border-radius: 5px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
}

/* =========================================================
   HERO
   ========================================================= */

.ref-hero {
    position: relative;
    z-index: 1;
    min-height: 620px;
    overflow: hidden;
    color: var(--ref-white);
    margin-top: 0;

    background:
        linear-gradient(
            90deg,
            rgba(4, 20, 38, 0.88) 0%,
            rgba(4, 20, 38, 0.76) 28%,
            rgba(4, 20, 38, 0.56) 48%,
            rgba(4, 20, 38, 0.38) 68%,
            rgba(4, 20, 38, 0.28) 100%
        ),
        url('../images/gold-rate-b-3.jpeg') center center / cover no-repeat;
}

/*
   These decorative SVG elements must be absolutely positioned.
   Without this, the trend line becomes a full-sized page block.
*/

.ref-hero__map {
    position: absolute;
    z-index: 0;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.ref-hero__map svg {
    position: absolute;
    top: -52px;
    left: 4%;
    width: 92%;
    height: 570px;
    opacity: 0.43;
}

.ref-hero__trend {
    position: absolute;
    z-index: 0;
    top: 62px;
    left: 22%;
    width: 57%;
    height: 310px;
    opacity: 0.88;
    pointer-events: none;
}

.ref-hero__trend svg {
    display: block;
    width: 100%;
    height: 100%;
}

.ref-hero__grid {
    position: relative;
    z-index: 2;
    min-height: 620px;
    padding-top: 30px;
    padding-bottom: 28px;
    display: grid;
    grid-template-columns:
        minmax(355px, 0.95fr)
        minmax(330px, 0.82fr)
        minmax(470px, 1.15fr);
    align-items: center;
    gap: 20px;
}

/* =========================================================
   HERO COPY
   ========================================================= */

.ref-hero__copy {
    position: relative;
    z-index: 4;
    align-self: center;
    padding-top: 4px;
}

.ref-hero h1 {
    max-width: 560px;
    margin: 0 0 20px;
    color: #ffffff;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(48px, 3.65vw, 67px);
    font-weight: 600;
    line-height: 0.98;
    letter-spacing: -0.025em;
}

.ref-hero h1 span {
    display: block;
    margin-top: 4px;
    color: var(--ref-gold);
}

.ref-hero__intro {
    max-width: 470px;
    margin: 0;
    color: #d2dce8;
    font-size: 16px;
    line-height: 1.65;
}

/* =========================================================
   TRUST ITEMS
   ========================================================= */

.ref-trust-grid {
    width: 100%;
    max-width: 490px;
    margin: 28px 0 24px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ref-trust-grid > div {
    min-width: 0;
    min-height: 86px;
    padding: 6px 11px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-right: 1px solid rgba(255, 255, 255, 0.13);
}

.ref-trust-grid > div:first-child {
    padding-left: 0;
}

.ref-trust-grid > div:last-child {
    padding-right: 0;
    border-right: 0;
}

.ref-trust-icon {
    width: 27px;
    height: 27px;
    margin-bottom: 8px;
    display: block;
    color: var(--ref-gold-light);
}

.ref-trust-icon svg {
    display: block;
    width: 100%;
    height: 100%;
}

.ref-trust-grid strong {
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.25;
    white-space: nowrap;
}

.ref-trust-grid small {
    margin-top: 4px;
    color: #9eacbc;
    font-size: 9px;
    line-height: 1.25;
    white-space: nowrap;
}

/* =========================================================
   HERO EMAIL FORM
   ========================================================= */

.ref-alert-form {
    width: 100%;
    max-width: 490px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
}

.ref-alert-form input {
    min-width: 0;
    height: 48px;
    padding: 0 16px;
    color: #192638;
    background: #ffffff;
    border: 0;
    border-radius: 6px 0 0 6px;
    outline: none;
    box-shadow: none;
    font-family: inherit;
    font-size: 13px;
}

.ref-alert-form input::placeholder {
    color: #8490a0;
}

.ref-alert-form button {
    height: 48px;
    padding: 0 22px;
    color: #152137;
    background: linear-gradient(180deg, #f7d36c, #d89e13);
    border: 0;
    border-radius: 0 6px 6px 0;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.35),
        0 6px 18px rgba(0, 0, 0, 0.12);
    font-family: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.ref-alert-note {
    margin: 10px 0 0;
    color: #aab6c4;
    font-size: 10px;
    line-height: 1.4;
}

.ref-alert-note span {
    margin-right: 5px;
    color: var(--ref-gold-light);
}

/* =========================================================
   GOLD IMAGE
   ========================================================= */

.ref-gold-art {
    position: relative;
    z-index: 3;
    min-width: 0;
    height: 100%;
    align-self: end;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    pointer-events: none;
}

.ref-gold-art::after {
    content: "";
    position: absolute;
    z-index: -1;
    right: 8%;
    bottom: 2%;
    left: 8%;
    height: 70px;
    background: rgba(205, 145, 17, 0.29);
    border-radius: 50%;
    filter: blur(28px);
}

.ref-gold-art img {
    display: block;
    width: 118%;
    max-width: 590px;
    height: auto;
    margin-right: -18px;
    margin-bottom: -44px;
    object-fit: contain;
    object-position: center bottom;

    /* Blend the legacy hero artwork into the dark hero. */
    mix-blend-mode: screen;
}

/* =========================================================
   LIVE PRICE CARD
   ========================================================= */

.ref-market-card {
    position: relative;
    z-index: 5;
    width: 100%;
    overflow: hidden;
    align-self: center;
    color: #ffffff;
    background:
        linear-gradient(
            180deg,
            rgba(10, 39, 68, 0.99),
            rgba(6, 27, 49, 0.99)
        );
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 13px;
    box-shadow:
        0 30px 65px rgba(0, 0, 0, 0.36),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.ref-market-card__head {
    min-height: 58px;
    padding: 0 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--ref-border);
    text-transform: uppercase;
}

.ref-market-card__head strong {
    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.ref-market-card__head span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #53d991;
    font-size: 10px;
    font-weight: 700;
}

.ref-market-card__head span i {
    width: 6px;
    height: 6px;
    display: block;
    background: #48d486;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(72, 212, 134, 0.75);
}

.ref-market-tabs {
    padding: 13px 17px 11px;
    display: flex;
    gap: 7px;
    overflow-x: auto;
    scrollbar-width: none;
}

.ref-market-tabs::-webkit-scrollbar {
    display: none;
}

.ref-market-tabs a {
    min-width: 48px;
    height: 32px;
    padding: 0 11px;
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 5px;
    color: #dce4ed;
    background: #0a2948;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 5px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
}

.ref-market-tabs a.is-active {
    color: #152033;
    background: linear-gradient(180deg, #f7d36c, #cf9411);
    border-color: #efc650;
}

.ref-market-labels,
.ref-market-row {
    display: grid;
    grid-template-columns:
        minmax(150px, 1fr)
        minmax(125px, auto)
        72px;
    gap: 12px;
    align-items: center;
}

.ref-market-labels {
    padding: 0 17px 8px;
    color: #93a3b5;
    font-size: 8px;
    font-weight: 600;
    text-transform: uppercase;
}

.ref-market-labels span:nth-child(2),
.ref-market-labels span:nth-child(3) {
    text-align: right;
}

.ref-market-row {
    min-height: 43px;
    padding: 0 17px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.ref-market-row span {
    overflow: hidden;
    color: #f3f6fa;
    font-size: 11px;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ref-market-row strong {
    color: #ffffff;
    text-align: right;
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.ref-market-row em {
    text-align: right;
    font-size: 10px;
    font-weight: 600;
    font-style: normal;
    line-height: 1;
    white-space: nowrap;
}

.ref-market-row .is-positive {
    color: #51d98e;
}

.ref-market-row .is-negative {
    color: #ff7777;
}

.ref-market-row .is-neutral {
    color: #aeb9c6;
}

/* =========================================================
   MINI CHART
   ========================================================= */

.ref-mini-chart {
    position: relative;
    height: 115px;
    padding: 9px 17px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background:
        repeating-linear-gradient(
            to bottom,
            transparent 0,
            transparent 27px,
            rgba(255, 255, 255, 0.045) 28px
        );
}

.ref-mini-chart svg {
    display: block;
    width: 100%;
    height: 100%;
}

.ref-market-card__foot {
    min-height: 44px;
    padding: 0 17px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    color: #8fa0b4;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    font-size: 9px;
    line-height: 1.3;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media screen and (max-width: 1380px) {

    .ref-header__inner {
        grid-template-columns: 225px minmax(0, 1fr) auto;
    }

    .ref-brand__logo {
        width: 220px;
    }

    .ref-nav {
        gap: 14px;
    }

    .ref-nav a {
        font-size: 11px;
    }

    .ref-hero__grid {
        grid-template-columns:
            minmax(330px, 0.92fr)
            minmax(275px, 0.72fr)
            minmax(430px, 1.08fr);
        gap: 15px;
    }

    .ref-gold-art img {
        width: 122%;
        margin-right: -24px;
    }
}

@media screen and (max-width: 1150px) {

    .ref-header__inner {
        grid-template-columns: 220px 1fr auto;
    }

    .ref-nav a:nth-child(5),
    .ref-nav a:nth-child(6),
    .ref-watchlist {
        display: none;
    }

    .ref-hero {
        min-height: auto;
    }

    .ref-hero__grid {
        min-height: auto;
        padding-top: 46px;
        padding-bottom: 46px;
        grid-template-columns: minmax(0, 1fr) minmax(410px, 0.95fr);
        gap: 30px;
    }

    .ref-gold-art {
        position: absolute;
        right: 38%;
        bottom: 0;
        width: 310px;
        height: 360px;
        opacity: 0.42;
    }

    .ref-gold-art img {
        width: 100%;
        margin: 0;
    }

    .ref-market-card {
        grid-column: 2;
    }
}

@media screen and (max-width: 860px) {

    .ref-header__inner {
        width: 100%;
        min-height: 72px;
        padding: 0 16px;
        display: flex;
        justify-content: space-between;
    }

    .ref-brand {
        flex: 1 1 auto;
    }

    .ref-brand__logo {
        width: 205px;
    }

    .ref-nav,
    .ref-watchlist {
        display: none;
    }

    .ref-hero__map svg {
        left: -20%;
        width: 140%;
        opacity: 0.26;
    }

    .ref-hero__trend {
        top: 170px;
        left: 5%;
        width: 90%;
        opacity: 0.42;
    }

    .ref-hero__grid {
        width: calc(100% - 30px);
        padding-top: 42px;
        padding-bottom: 42px;
        grid-template-columns: 1fr;
        gap: 35px;
    }

    .ref-hero__copy {
        max-width: 620px;
    }

    .ref-gold-art {
        display: none;
    }

    .ref-market-card {
        width: 100%;
        max-width: 620px;
        grid-column: auto;
    }
}

@media screen and (max-width: 600px) {

    .ref-header__inner {
        min-height: 66px;
        padding: 0 12px;
        gap: 8px;
    }

    .ref-brand {
        height: 66px;
    }

    .ref-brand__logo {
        width: 178px;
    }

    .ref-currency {
        display: none;
    }

    .ref-signup {
        min-width: 70px;
        height: 38px;
        padding: 0 12px;
        font-size: 11px;
    }

    .ref-hero h1 {
        font-size: clamp(43px, 12vw, 57px);
    }

    .ref-hero__intro {
        font-size: 15px;
    }

    .ref-trust-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        border-top: 1px solid rgba(255, 255, 255, 0.12);
        border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    }

    .ref-trust-grid > div {
        min-height: 94px;
        border-right: 1px solid rgba(255, 255, 255, 0.12);
        border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    }

    .ref-trust-grid > div:nth-child(2n) {
        border-right: 0;
    }

    .ref-trust-grid > div:nth-last-child(-n + 2) {
        border-bottom: 0;
    }

    .ref-trust-grid > div:first-child {
        padding-left: 11px;
    }

    .ref-trust-grid > div:last-child {
        padding-right: 11px;
    }

    .ref-alert-form {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .ref-alert-form input,
    .ref-alert-form button {
        width: 100%;
        border-radius: 6px;
    }

    .ref-market-labels,
    .ref-market-row {
        grid-template-columns: minmax(115px, 1fr) auto 60px;
        gap: 7px;
    }

    .ref-market-row {
        padding-right: 12px;
        padding-left: 12px;
    }

    .ref-market-row span {
        font-size: 10px;
    }

    .ref-market-row strong {
        font-size: 12px;
    }

    .ref-market-row em {
        font-size: 9px;
    }

    .ref-market-card__foot {
        padding-top: 9px;
        padding-bottom: 9px;
        align-items: flex-start;
        flex-direction: column;
        justify-content: center;
        gap: 2px;
    }
}

@media screen and (max-width: 410px) {

    .ref-brand__logo {
        width: 158px;
    }

    .ref-signup {
        min-width: 62px;
        padding: 0 9px;
    }

    .ref-market-tabs {
        padding-right: 11px;
        padding-left: 11px;
    }

    .ref-market-tabs a {
        min-width: 43px;
        padding: 0 8px;
    }

    .ref-market-labels {
        display: none;
    }

    .ref-market-row {
        min-height: 50px;
        grid-template-columns: 1fr auto;
    }

    .ref-market-row em {
        grid-column: 2;
    }
}
/* =========================================================
   QUICK ANSWERS
   ========================================================= */

.quick-strip {
    position: relative;
    z-index: 10;
    width: 100%;
    min-height: 78px;
    background: #ffffff;
    border-top: 1px solid #e7e9ed;
    border-bottom: 1px solid #e2e5e9;
}

.quick-row {
    min-height: 78px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 20px;
}

.quick-row__title {
    padding-right: 20px;
    color: #172131;
    border-right: 1px solid #e1e4e8;
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
}

.quick-links {
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    align-items: center;
    gap: 8px;
}

.quick-link {
    width: auto;
    min-width: 0;
    min-height: 46px;
    height: 46px;
    margin: 0;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    color: #303a48;
    background: #ffffff;
    border: 1px solid #e4e6ea;
    border-radius: 7px;
    box-shadow: 0 1px 3px rgba(18, 31, 47, 0.04);
    font-size: 12px;
    font-weight: 650;
    line-height: 1.2;
    text-align: left;
    text-decoration: none;
    white-space: nowrap;
    transition:
        color 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.quick-link:hover {
    color: #9c6b00;
    border-color: #dcb044;
    box-shadow: 0 5px 14px rgba(18, 31, 47, 0.08);
    transform: translateY(-1px);
}

.quick-link__icon {
    width: 22px;
    height: 22px;
    margin: 0;
    padding: 0;
    display: block;
    flex: 0 0 22px;
    color: #d5a11d;
    background: transparent;
    border: 0;
    overflow: hidden;
}

.quick-link__icon svg {
    width: 22px;
    height: 22px;
    margin: 0;
    padding: 0;
    display: block;
    overflow: visible;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.quick-link__icon svg path,
.quick-link__icon svg circle,
.quick-link__icon svg rect,
.quick-link__icon svg line,
.quick-link__icon svg polyline,
.quick-link__icon svg polygon {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.quick-link > span:last-child {
    min-width: 0;
    margin: 0;
    padding: 0;
    display: block;
    overflow: visible;
    color: inherit;
    background: transparent;
    border: 0;
    text-overflow: clip;
    white-space: nowrap;
}


/* WordPress / theme compatibility.
   Stronger specificity is intentional for legacy theme rules. */

.quick-strip .quick-row {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 20px !important;
}

.quick-strip .quick-links {
    display: grid !important;
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    align-items: center !important;
    gap: 8px !important;
}

.quick-strip .quick-link {
    min-width: 0 !important;
    min-height: 46px !important;
    height: 46px !important;
    margin: 0 !important;
    padding: 8px 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 9px !important;
    color: #303a48 !important;
    background: #ffffff !important;
    border: 1px solid #e4e6ea !important;
    border-radius: 7px !important;
    font-size: 12px !important;
    font-weight: 650 !important;
    line-height: 1.2 !important;
    text-decoration: none !important;
    white-space: nowrap !important;
}

.quick-strip .quick-link__icon {
    width: 22px !important;
    height: 22px !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    flex: 0 0 22px !important;
    color: #d5a11d !important;
    background: transparent !important;
    border: 0 !important;
    overflow: hidden !important;
}

.quick-strip .quick-link__icon svg {
    width: 22px !important;
    height: 22px !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    overflow: visible !important;
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 1.7 !important;
}

.quick-strip .quick-link__icon svg path,
.quick-strip .quick-link__icon svg circle,
.quick-strip .quick-link__icon svg rect,
.quick-strip .quick-link__icon svg line,
.quick-strip .quick-link__icon svg polyline,
.quick-strip .quick-link__icon svg polygon {
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 1.7 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
}

.quick-strip .quick-link > span:last-child {
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    overflow: visible !important;
    color: inherit !important;
    background: transparent !important;
    border: 0 !important;
    text-overflow: clip !important;
    white-space: nowrap !important;
}


/* Quick Answers responsive */

@media screen and (max-width: 1150px) {

    .quick-row,
    .quick-strip .quick-row {
        padding-top: 12px;
        padding-bottom: 12px;
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    .quick-row__title {
        padding-right: 0;
        padding-bottom: 9px;
        border-right: 0;
        border-bottom: 1px solid #e1e4e8;
    }

    .quick-links,
    .quick-strip .quick-links {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

@media screen and (max-width: 650px) {

    .quick-links,
    .quick-strip .quick-links {
        display: flex !important;
        gap: 8px !important;
        overflow-x: auto !important;
        scrollbar-width: none;
    }

    .quick-links::-webkit-scrollbar,
    .quick-strip .quick-links::-webkit-scrollbar {
        display: none;
    }

    .quick-link,
    .quick-strip .quick-link {
        min-width: 205px !important;
        flex: 0 0 205px !important;
        justify-content: flex-start !important;
    }
}


/* =========================================================
   GOLD MARKET GAUGE
   ========================================================= */

.market-gauge-section {
    padding-top: 32px;
}

.market-gauge-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 22px;
}

.market-gauge-heading h2 {
    margin: 7px 0 0;
    color: #15171c;
    font-size: clamp(28px, 3vw, 42px);
    line-height: 1.08;
    letter-spacing: -0.035em;
}

.gauge-method-link {
    flex-shrink: 0;
    padding-bottom: 2px;
    color: #7b5b08;
    border-bottom: 1px solid rgba(123, 91, 8, 0.35);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.gauge-method-link:hover {
    color: #15171c;
    border-color: #15171c;
}

.market-gauge-grid {
    display: grid;
    grid-template-columns:
        minmax(260px, 0.9fr)
        minmax(360px, 1.35fr)
        minmax(270px, 0.95fr);
    align-items: stretch;
    gap: 18px;
}

.market-gauge-grid > .panel {
    height: 100%;
}

.gauge-panel,
.gauge-factors-panel,
.gauge-summary-panel {
    position: relative;
    overflow: hidden;
    padding: 26px;
}

.gauge-panel {
    display: flex;
    flex-direction: column;
    text-align: left;
    background:
        radial-gradient(
            circle at 50% 5%,
            rgba(214, 169, 39, 0.13),
            transparent 36%
        ),
        #ffffff;
}

.gauge-panel-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
}

.gauge-panel-heading > div {
    min-width: 0;
}

.gauge-panel-heading-left {
    width: 100%;
    text-align: left;
}

.gauge-panel-heading-left > div {
    width: 100%;
    text-align: left;
}

.gauge-panel-heading-left .section-label,
.gauge-panel-heading-left .gauge-card-title,
.gauge-panel-heading-left .gauge-market {
    display: block;
    width: 100%;
    text-align: left;
}

.gauge-card-title,
.gauge-panel-heading h3,
.gauge-summary-panel h3 {
    margin: 6px 0 0;
    color: #15171c;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.025em;
}

.gauge-card-title {
    margin-bottom: 7px;
}

.gauge-market {
    margin-top: 2px;
    color: #707783;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.035em;
    text-transform: uppercase;
}

.gauge-live-status {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    gap: 7px;
    margin-top: 2px;
    color: #257247;
    font-size: 12px;
    font-weight: 700;
}

.gauge-live-status i {
    width: 7px;
    height: 7px;
    background: currentColor;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(37, 114, 71, 0.1);
}

.market-gauge {
    --gauge-score: 50;

    position: relative;
    width: min(260px, 100%);
    aspect-ratio: 2 / 1.15;
    margin: 20px auto 0;
    overflow: hidden;
}

.market-gauge-track {
    position: absolute;
    right: 4%;
    bottom: -83%;
    left: 4%;
    aspect-ratio: 1;
    border-radius: 50%;
    background:
        conic-gradient(
            from 270deg,
            #d66155 0deg 45deg,
            #dc9b46 45deg 81deg,
            #d8bf55 81deg 108deg,
            #78a962 108deg 144deg,
            #2f8b59 144deg 180deg,
            transparent 180deg 360deg
        );
}

.market-gauge-track::after {
    content: "";
    position: absolute;
    inset: 18%;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.04);
}

.market-gauge-needle {
    position: absolute;
    z-index: 3;
    bottom: 4%;
    left: 50%;
    width: 42%;
    height: 2px;
    transform:
        rotate(
            calc(-180deg + (var(--gauge-score) * 1.8deg))
        );
    transform-origin: left center;
    transition: transform 650ms ease;
}

.market-gauge-needle span {
    display: block;
    width: 100%;
    height: 3px;
    background: #24272e;
    border-radius: 999px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.24);
}

.market-gauge-needle::before {
    content: "";
    position: absolute;
    top: -6px;
    left: -7px;
    width: 15px;
    height: 15px;
    background: #24272e;
    border: 4px solid #ffffff;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.market-gauge-centre {
    position: absolute;
    z-index: 4;
    bottom: 0;
    left: 50%;
    min-width: 130px;
    display: flex;
    align-items: baseline;
    justify-content: center;
    color: #181a20;
    background: #ffffff;
    transform: translateX(-50%);
}

.market-gauge-centre strong {
    font-size: 48px;
    line-height: 1;
    letter-spacing: -0.055em;
}

.market-gauge-centre small {
    margin-left: 4px;
    color: #7c838f;
    font-size: 14px;
    font-weight: 700;
}

.gauge-scale {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin: 6px 6px 20px;
    color: #8a9099;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.gauge-result {
    min-height: 34px;
    padding: 7px 14px;
    display: inline-flex;
    align-self: center;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
}

.gauge-result-strong,
.gauge-result-positive {
    color: #236e47;
    background: #eaf5ef;
}

.gauge-result-balanced {
    color: #775d11;
    background: #f8f1dc;
}

.gauge-result-cautious {
    color: #925a14;
    background: #fff1df;
}

.gauge-result-weak {
    color: #a04841;
    background: #fbeceb;
}

.gauge-description {
    max-width: 380px;
    margin: 15px auto 0;
    color: #626a76;
    font-size: 14px;
    line-height: 1.65;
    text-align: center;
}

.gauge-metadata {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 16px;
    margin-top: auto;
    padding-top: 23px;
    color: #949aa4;
    font-size: 11px;
    text-align: center;
}

.gauge-panel-empty .gauge-metadata {
    margin-top: 28px;
}

.gauge-metadata span + span {
    position: relative;
}

.gauge-metadata span + span::before {
    content: "";
    position: absolute;
    top: 50%;
    left: -9px;
    width: 3px;
    height: 3px;
    background: #c3c7cd;
    border-radius: 50%;
    transform: translateY(-50%);
}

.factor-total {
    color: #8b6911;
    font-size: 18px;
    white-space: nowrap;
}

.gauge-factor-list {
    display: grid;
    gap: 19px;
}

.gauge-factor {
    padding-bottom: 17px;
    border-bottom: 1px solid #eceef1;
}

.gauge-factor:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.gauge-factor-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.gauge-factor-top > div:first-child {
    min-width: 0;
}

.gauge-factor-top strong {
    display: block;
    margin-bottom: 3px;
    color: #2b2e35;
    font-size: 13px;
}

.gauge-factor-top span {
    color: #8b919b;
    font-size: 12px;
}

.gauge-factor-result {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
    text-align: right;
}

.gauge-factor-result b {
    font-size: 12px;
}

.factor-tone-positive {
    color: #27754a;
}

.factor-tone-neutral {
    color: #816920;
}

.factor-tone-negative {
    color: #ac5148;
}

.gauge-factor-bar {
    height: 5px;
    margin-top: 10px;
    overflow: hidden;
    background: #eceef1;
    border-radius: 999px;
}

.gauge-factor-bar span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #b88811, #ddb73f);
    border-radius: inherit;
}

.gauge-note {
    margin: 22px 0 0;
    padding: 13px 15px;
    color: #787f89;
    background: #f7f8fa;
    border-radius: 10px;
    font-size: 11px;
    line-height: 1.55;
}

.gauge-summary-panel {
    display: flex;
    flex-direction: column;
}

.gauge-summary-list {
    display: grid;
    gap: 4px;
    margin-top: 18px;
}

.gauge-summary-item {
    padding: 15px 0;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 12px;
    border-bottom: 1px solid #eceef1;
}

.gauge-summary-item:last-child {
    border-bottom: 0;
}

.gauge-summary-icon {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #82600a;
    background: #f7f0dc;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 800;
}

.gauge-summary-item p {
    margin: 0;
}

.gauge-summary-item strong {
    display: block;
    margin-bottom: 5px;
    color: #282b32;
    font-size: 13px;
}

.gauge-summary-item small {
    display: block;
    color: #757c87;
    font-size: 12px;
    line-height: 1.55;
}

.gauge-data-footnote {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: auto;
    padding-top: 20px;
    color: #858b95;
    font-size: 11px;
}

.gauge-data-footnote strong {
    color: #555b65;
    text-align: right;
}

.gauge-unavailable,
.factor-empty-state {
    padding: 28px 20px;
    color: #777f8a;
    background: #fafbfc;
    border: 1px dashed #d9dde3;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.6;
    text-align: center;
}

.gauge-unavailable {
    margin: auto 0;
}

.gauge-unavailable strong {
    display: block;
    margin-bottom: 7px;
    color: #30343b;
    font-size: 17px;
}

.gauge-unavailable p {
    margin: 0;
}

.gauge-summary-panel > .factor-empty-state {
    margin-top: 22px;
}

@media (max-width: 1050px) {
    .market-gauge-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .gauge-summary-panel {
        grid-column: 1 / -1;
    }

    .gauge-summary-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 18px;
    }

    .gauge-summary-item {
        border-bottom: 0;
    }
}

@media (max-width: 760px) {
    .market-gauge-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 13px;
    }

    .market-gauge-grid {
        grid-template-columns: 1fr;
    }

    .gauge-summary-panel {
        grid-column: auto;
    }

    .gauge-summary-list {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .gauge-summary-item {
        border-bottom: 1px solid #eceef1;
    }

    .gauge-panel,
    .gauge-factors-panel,
    .gauge-summary-panel {
        padding: 22px;
    }
}

@media (max-width: 480px) {
    .gauge-panel-heading,
    .gauge-factor-top {
        align-items: flex-start;
    }

    .gauge-panel-heading-left {
        flex-direction: column;
    }

    .gauge-factor-result {
        flex-shrink: 0;
    }

    .market-gauge-centre strong {
        font-size: 42px;
    }

    .gauge-metadata {
        align-items: center;
        flex-direction: column;
    }

    .gauge-metadata span + span::before {
        display: none;
    }
}

/* =========================================================
   ENHANCED LIVE PRICE CARD
   ========================================================= */

/* USD + 24H change summary */
.ref-market-summary {
    min-height: 90px;
    padding: 16px 20px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.11);
}

.ref-market-currency {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ref-market-currency strong {
    color: #ffffff;
    font-size: 26px;
    font-weight: 500;
    line-height: 1;
}

.ref-market-currency span {
    margin-top: 3px;
    color: #8fa1b5;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.045em;
    text-transform: uppercase;
}

.ref-market-change {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    text-align: right;
}

.ref-market-change small {
    color: #8fa1b5;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.055em;
    line-height: 1;
    text-transform: uppercase;
}

.ref-market-change strong {
    font-size: 24px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.025em;
}

.ref-market-change .is-positive {
    color: #4bd78b;
}

.ref-market-change .is-negative {
    color: #ff7777;
}

.ref-market-change .is-neutral {
    color: #b8c4d1;
}


/* Card heading and footer */
.ref-market-card--enhanced .ref-market-card__head {
    min-height: 60px;
    padding-right: 20px;
    padding-left: 20px;
}

.ref-market-card--enhanced .ref-market-card__head > strong {
    font-size: 15px;
}

.ref-market-card--enhanced .ref-market-card__foot {
    min-height: 42px;
    padding-right: 20px;
    padding-left: 20px;
    color: rgba(225, 233, 242, 0.72);
    font-size: 9px;
}


/* Enhanced card — mobile */
@media screen and (max-width: 600px) {

    .ref-market-summary {
        min-height: 90px;
        padding: 16px 16px 15px;
    }

    .ref-market-change strong {
        font-size: 24px;
    }
}

/* =========================================================
   GAUGE — RIGHT COLUMN + GOLD VALUE CALCULATOR
   ========================================================= */

/* Stack Interpretation + Calculator in the third gauge column */
.gauge-right-column {
    min-width: 0;
    display: grid;
    grid-template-columns: 1fr;
    align-content: start;
    gap: 18px;
}

.gauge-right-column > .panel {
    width: 100%;
    height: auto;
}


/* Interpretation value emphasis */
.gauge-summary-item small b {
    font-weight: 800;
}

.gauge-summary-item small .factor-tone-positive {
    color: #27754a;
}

.gauge-summary-item small .factor-tone-negative {
    color: #ac5148;
}

.gauge-summary-item small .factor-tone-neutral {
    color: #816920;
}


/* Calculator card */
.gauge-calculator-panel {
    padding: 24px 26px;
}

.gauge-calculator-heading {
    margin-bottom: 18px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.gauge-calculator-heading h3 {
    margin: 6px 0 0;
    color: #15171c;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.025em;
}

.gauge-calculator-currency {
    flex-shrink: 0;
    margin-top: 2px;
    color: #8b6911;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
}


/* Calculator fields */
.gauge-value-calculator__fields {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
}

.gauge-value-calculator__fields label {
    min-width: 0;
    display: block;
    margin: 0;
}

.gauge-value-calculator__fields label > span {
    display: block;
    margin-bottom: 7px;
    color: #656d79;
    font-size: 11px;
    font-weight: 700;
}

.gauge-value-calculator select,
.gauge-value-calculator input {
    width: 100%;
    height: 44px;
    margin: 0;
    padding: 0 12px;
    color: #20242b;
    background: #ffffff;
    border: 1px solid #dfe3e8;
    border-radius: 8px;
    outline: none;
    box-shadow: none;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
}

.gauge-value-calculator select:focus,
.gauge-value-calculator input:focus {
    border-color: #cda126;
    box-shadow: 0 0 0 3px rgba(205, 161, 38, 0.10);
}

.gauge-weight-input {
    position: relative;
}

.gauge-weight-input input {
    padding-right: 36px;
}

.gauge-weight-input > span {
    position: absolute;
    top: 50%;
    right: 13px;
    margin: 0;
    color: #858c96;
    font-size: 12px;
    font-weight: 700;
    transform: translateY(-50%);
    pointer-events: none;
}


/* Result */
.gauge-value-calculator__result {
    margin-top: 15px;
    padding: 16px 17px;
    background: #f7f8fa;
    border: 1px solid #eceef1;
    border-radius: 10px;
}

.gauge-value-calculator__result > span {
    display: block;
    margin-bottom: 5px;
    color: #7b828d;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.035em;
    text-transform: uppercase;
}

.gauge-value-calculator__result strong {
    display: block;
    color: #171a20;
    font-size: 25px;
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
}

.gauge-value-calculator__result small {
    display: block;
    margin-top: 7px;
    color: #747c87;
    font-size: 11px;
    line-height: 1.4;
}

.gauge-value-calculator__note {
    margin: 11px 0 0;
    color: #8b929c;
    font-size: 10px;
    line-height: 1.5;
}


/* Tablet */
@media (max-width: 1050px) {
    .gauge-right-column {
        grid-column: 1 / -1;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


/* Mobile */
@media (max-width: 760px) {
    .gauge-right-column {
        grid-column: auto;
        grid-template-columns: 1fr;
    }

    .gauge-calculator-panel {
        padding: 22px;
    }
}

@media (max-width: 480px) {
    .gauge-calculator-heading {
        align-items: flex-start;
    }

    .gauge-value-calculator__fields {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   GOLD VALUE CALCULATOR — BUTTON
   ========================================================= */

.gauge-calc-button {
    width: 100%;
    min-height: 44px;
    margin-top: 12px;
    padding: 10px 16px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    color: #172131;
    background: linear-gradient(180deg, #f7c844 0%, #e7ad15 100%);

    border: 1px solid #d49e11;
    border-radius: 8px;

    box-shadow: 0 2px 6px rgba(173, 124, 0, 0.14);

    font-family: inherit;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;

    cursor: pointer;

    transition:
        transform 0.16s ease,
        box-shadow 0.16s ease,
        filter 0.16s ease;
}

.gauge-calc-button:hover {
    filter: brightness(1.02);
    box-shadow: 0 5px 12px rgba(173, 124, 0, 0.18);
    transform: translateY(-1px);
}

.gauge-calc-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(173, 124, 0, 0.14);
}

.gauge-calc-button:focus-visible {
    outline: 3px solid rgba(205, 161, 38, 0.22);
    outline-offset: 2px;
}

/* =========================================================
   HERO PRICE CARD — TODAY VS YESTERDAY
   ========================================================= */

.ref-market-labels--compare,
.ref-market-row--compare {
    display: grid;
    grid-template-columns:
        minmax(165px, 1.35fr)
        minmax(100px, 0.85fr)
        minmax(100px, 0.85fr);
    align-items: center;
    gap: 14px;
}

.ref-market-labels--compare {
    min-height: 38px;
    padding: 0 20px;
    color: #8fa1b5;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.ref-market-labels--compare span:nth-child(2),
.ref-market-labels--compare span:nth-child(3) {
    text-align: right;
}

.ref-market-row--compare {
    min-height: 55px;
    padding: 0 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.ref-market-metal {
    color: #f3f6fa;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.25;
    white-space: nowrap;
}

.ref-market-today {
    color: #ffffff;
    font-size: 17px;
    font-weight: 800;
    line-height: 1;
    text-align: right;
    letter-spacing: -0.015em;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.ref-market-yesterday {
    color: #95a5b6;
    font-size: 14px;
    font-weight: 650;
    line-height: 1;
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.ref-market-card--enhanced {
    max-width: 590px;
}

@media screen and (max-width: 760px) {

    .ref-market-labels--compare,
    .ref-market-row--compare {
        grid-template-columns:
            minmax(125px, 1.2fr)
            minmax(90px, 0.8fr)
            minmax(90px, 0.8fr);
        gap: 9px;
        padding-right: 14px;
        padding-left: 14px;
    }

    .ref-market-metal {
        font-size: 11px;
    }

    .ref-market-today {
        font-size: 14px;
    }

    .ref-market-yesterday {
        font-size: 12px;
    }
}

@media screen and (max-width: 460px) {

    .ref-market-card--enhanced {
        overflow-x: auto;
    }

    .ref-market-labels--compare,
    .ref-market-row--compare {
        min-width: 455px;
    }
}

/* Keep V3 hero below the global WordPress header */
body .ref-hero {
    margin-top: 0 !important;
}