/* قیمت‌ها — هماهنگ با تم لینک‌ها */
*, *::before, *::after { box-sizing: border-box; }

:root {
    --bg: #0c0f14;
    --bg-elev: #121820;
    --card: #161d27;
    --text: #e6edf3;
    --muted: #8b9aad;
    --accent: #38bdf8;
    --border: rgba(255, 255, 255, 0.08);
    --radius: 14px;
}

body.light-mode {
    --bg: #f0f3f8;
    --bg-elev: #ffffff;
    --card: #ffffff;
    --text: #1a2332;
    --muted: #64748b;
    --accent: #0284c7;
    --border: rgba(15, 23, 42, 0.1);
}

body {
    margin: 0;
    font-family: "Vazirmatn", Tahoma, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    padding: 0 0 72px;
    direction: rtl;
    text-align: right;
}

.pr-top {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px max(12px, env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
    background: rgba(12, 15, 20, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    width: 100%;
    max-width: none;
    margin: 0;
    box-sizing: border-box;
}

body.light-mode .pr-top {
    background: rgba(255, 255, 255, 0.94);
}

.pr-back {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--accent);
    text-decoration: none;
    font-size: 18px;
    font-weight: 800;
}

.pr-head {
    flex: 1;
    min-width: 0;
}

.pr-head h1 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.35;
}

.pr-updated {
    margin: 6px 0 0;
    font-size: 13px;
    font-weight: 700;
    color: var(--muted);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 8px;
    line-height: 1.5;
}

.pr-updated svg {
    width: 15px;
    height: 15px;
    opacity: 0.88;
    flex-shrink: 0;
}

.pr-updated__src {
    font-weight: 600;
}

.pr-updated__src a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 800;
}

.pr-updated__src a:hover {
    text-decoration: underline;
}

.pr-wrap {
    width: 100%;
    max-width: none;
    margin: 0 auto;
    padding: 14px max(12px, env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px)) 28px;
    font-size: 15px;
    box-sizing: border-box;
}

.pr-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 158px), 1fr));
    gap: 10px;
}

.pr-hero__card {
    position: relative;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
    min-height: 108px;
    padding: 12px 11px 14px;
    isolation: isolate;
}

.pr-hero__card--gold {
    background: linear-gradient(145deg, #1f1810 0%, #141a22 48%, #2a2214 100%);
}

body.light-mode .pr-hero__card--gold {
    background: linear-gradient(145deg, #fff8e8 0%, #fff 45%, #fcefcf 100%);
}

.pr-hero__card--oil {
    background: linear-gradient(145deg, #0d1520 0%, #121a24 50%, #0f1a28 100%);
}

body.light-mode .pr-hero__card--oil {
    background: linear-gradient(145deg, #e8f2fc 0%, #f8fafc 50%, #dceaf8 100%);
}

.pr-hero__card--fx {
    background: linear-gradient(145deg, #0c1622 0%, #121a26 48%, #0e1a28 100%);
}

body.light-mode .pr-hero__card--fx {
    background: linear-gradient(145deg, #e8f4fc 0%, #fff 50%, #dceef8 100%);
}

.pr-hero__card--fx .pr-hero__deco {
    color: var(--accent);
}

.pr-hero__card--crypto {
    background: linear-gradient(145deg, #161028 0%, #141822 50%, #1a1530 100%);
}

body.light-mode .pr-hero__card--crypto {
    background: linear-gradient(145deg, #f3efff 0%, #fafafa 50%, #ebe5ff 100%);
}

.pr-hero__card--metal {
    background: linear-gradient(145deg, #141a1a 0%, #121820 50%, #152022 100%);
}

body.light-mode .pr-hero__card--metal {
    background: linear-gradient(145deg, #eef4f4 0%, #fafafa 50%, #e2ecec 100%);
}

.pr-hero__card--metal .pr-hero__deco {
    color: #94a3b8;
}

.pr-hero__card--neutral {
    background: linear-gradient(145deg, #12151c 0%, #141a22 100%);
}

body.light-mode .pr-hero__card--neutral {
    background: linear-gradient(145deg, #f1f5f9 0%, #fff 100%);
}

.pr-hero__deco {
    position: absolute;
    inset-inline-end: -6px;
    inset-block-end: -10px;
    width: 88px;
    height: 88px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.32;
    pointer-events: none;
    z-index: 0;
}

body.light-mode .pr-hero__deco {
    opacity: 0.2;
}

.pr-hero__deco svg {
    width: 100%;
    height: 100%;
    display: block;
}

.pr-hero__deco-emoji {
    font-size: 2.35rem;
    line-height: 1;
    font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", "Twemoji Mozilla", sans-serif;
    opacity: 0.95;
}

.pr-hero__card--gold .pr-hero__deco {
    color: #d4a84b;
}

.pr-hero__card--oil .pr-hero__deco {
    color: #38bdf8;
}

.pr-hero__card--crypto .pr-hero__deco {
    opacity: 0.38;
}

.pr-hero__label {
    position: relative;
    z-index: 1;
    font-size: 11px;
    font-weight: 800;
    color: var(--muted);
    margin: 0 0 6px;
    letter-spacing: -0.02em;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pr-hero__val {
    position: relative;
    z-index: 1;
    font-size: clamp(0.92rem, 2.8vw, 1.05rem);
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    direction: ltr;
    unicode-bidi: isolate;
    text-align: right;
    color: var(--text);
    line-height: 1.35;
    word-break: break-word;
    white-space: normal;
}

.pr-hero__unit {
    font-size: 0.75em;
    font-weight: 800;
    color: var(--muted);
    margin-inline-start: 4px;
}

.pr-section {
    margin-bottom: 22px;
}

.pr-section__title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 800;
    color: var(--accent);
    margin: 0 0 11px;
    padding-bottom: 7px;
    border-bottom: 1px solid var(--border);
    letter-spacing: -0.02em;
}

.pr-section__title .pr-sec-ic {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pr-section__title .pr-sec-ic svg {
    width: 26px;
    height: 26px;
    display: block;
}

.pr-empty {
    text-align: center;
    padding: 32px 16px;
    color: var(--muted);
    font-size: 15px;
}

.pr-empty code {
    font-size: 12px;
    background: rgba(255, 255, 255, 0.06);
    padding: 0.2rem 0.45rem;
    border-radius: 6px;
    color: var(--accent);
}

#themeToggle {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--card);
    cursor: pointer;
    font-size: 16px;
}

.pr-foot {
    width: 100%;
    max-width: none;
    margin: 0 auto;
    padding: 0 max(12px, env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px)) 24px;
    text-align: center;
    box-sizing: border-box;
}

@media (min-width: 721px) {
    .pr-top,
    .pr-wrap,
    .pr-foot {
        max-width: 1120px;
    }

    .pr-top,
    .pr-wrap,
    .pr-foot {
        margin-inline: auto;
    }

    .pr-top,
    .pr-wrap {
        padding-inline: max(24px, env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
    }

    .pr-foot {
        padding-inline: max(24px, env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
    }
}

.pr-foot a {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
}

.pr-foot a:hover {
    color: var(--accent);
}

@media (max-width: 380px) {
    .pr-cards {
        grid-template-columns: 1fr;
    }
}
