article.single-gemstone {
    padding: var(--space-xl) 0 var(--space-xl);
    background: #FAFAF8;
    min-height: 80vh;
}

article.single-gemstone .container {
    display: grid;
    gap: var(--space-lg);
}

article.single-gemstone[data-gem-color="red"]        { --gem-light: #6B0E0E; --gem-dark: #150202; }
article.single-gemstone[data-gem-color="blue"]       { --gem-light: #0C2464; --gem-dark: #030818; }
article.single-gemstone[data-gem-color="green"]      { --gem-light: #0A4020; --gem-dark: #020E07; }
article.single-gemstone[data-gem-color="yellow"]     { --gem-light: #7A5208; --gem-dark: #1E1402; }
article.single-gemstone[data-gem-color="orange"]     { --gem-light: #7A2808; --gem-dark: #1E0802; }
article.single-gemstone[data-gem-color="purple"]     { --gem-light: #3A0C62; --gem-dark: #0C0318; }
article.single-gemstone[data-gem-color="violet"]     { --gem-light: #3A0C62; --gem-dark: #0C0318; }
article.single-gemstone[data-gem-color="pink"]       { --gem-light: #7A1850; --gem-dark: #18040E; }
article.single-gemstone[data-gem-color="colorless"]  { --gem-light: #3A3A3A; --gem-dark: #0F0F0F; }
article.single-gemstone[data-gem-color="white"]      { --gem-light: #3A3A3A; --gem-dark: #0F0F0F; }
article.single-gemstone[data-gem-color="black"]      { --gem-light: #181818; --gem-dark: #020202; }
article.single-gemstone[data-gem-color="brown"]      { --gem-light: #4A1E06; --gem-dark: #120803; }
article.single-gemstone[data-gem-color="gray"]       { --gem-light: #2E2E2E; --gem-dark: #0A0A0A; }
article.single-gemstone[data-gem-color="multicolor"] { --gem-light: #2A1260; --gem-dark: #080218; }
article.single-gemstone {                             --gem-light: #2A2218; --gem-dark: #080604; }

.single-gemstone-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--color-border);
}

.single-gemstone-tools a,
.single-gemstone-tools button {
    background: transparent;
    border: 0;
    color: var(--color-text-muted);
    cursor: pointer;
    font: inherit;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.10em;
    text-decoration: none;
    text-transform: uppercase;
    padding: 0;
    transition: color var(--transition);
}

.single-gemstone-tools a:hover,
.single-gemstone-tools button:hover { color: var(--color-text); }

.single-gemstone-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    align-items: start;
    border: 1px solid var(--color-border);
    background: #fff;
}

.single-gemstone-content {
    border-right: 1px solid var(--color-border);
    min-width: 0;
}

.single-gemstone-hero {
    border-bottom: 1px solid var(--color-border);
}

.single-gemstone-intro {
    padding: var(--space-xl);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.single-gemstone-kicker {
    display: block;
    color: oklch(from var(--gem-color, var(--color-gold)) clamp(0.2, l, 0.62) c h);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.20em;
    text-transform: uppercase;
}

.single-gemstone-intro h1 {
    font-family: var(--font-serif);
    font-size: clamp(28px, 3.5vw, 46px);
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: -0.02em;
    margin: 0;
}

.single-gemstone-intro > p {
    color: var(--color-text-muted);
    font-size: var(--text-sm);
    line-height: 1.7;
    max-width: 52ch;
    margin: 0;
}

.single-gemstone-color-dots {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: var(--space-xs);
}

.single-gemstone-color-dots span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--color-text-muted);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.single-gemstone-color-dots span::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ccc;
    flex-shrink: 0;
}

.single-gemstone-color-dots span[data-gem-color="red"]::before        { background: #8B1A1A; }
.single-gemstone-color-dots span[data-gem-color="blue"]::before       { background: #1A3580; }
.single-gemstone-color-dots span[data-gem-color="green"]::before      { background: #1A5C2E; }
.single-gemstone-color-dots span[data-gem-color="yellow"]::before     { background: #B8960A; }
.single-gemstone-color-dots span[data-gem-color="orange"]::before     { background: #B84A10; }
.single-gemstone-color-dots span[data-gem-color="purple"]::before     { background: #5C1A90; }
.single-gemstone-color-dots span[data-gem-color="violet"]::before     { background: #4A1A80; }
.single-gemstone-color-dots span[data-gem-color="pink"]::before       { background: #B01E60; }
.single-gemstone-color-dots span[data-gem-color="colorless"]::before  { background: #C8C8CC; border: 1px solid #aaa; }
.single-gemstone-color-dots span[data-gem-color="white"]::before      { background: #E0E0E0; border: 1px solid #aaa; }
.single-gemstone-color-dots span[data-gem-color="black"]::before      { background: #111; }
.single-gemstone-color-dots span[data-gem-color="brown"]::before      { background: #7A3210; }
.single-gemstone-color-dots span[data-gem-color="gray"]::before          { background: #808080; }
.single-gemstone-color-dots span[data-gem-color="grey"]::before          { background: #808080; }
.single-gemstone-color-dots span[data-gem-color="royal-blue"]::before    { background: #1A3FA0; }
.single-gemstone-color-dots span[data-gem-color="vivid-blue"]::before    { background: #1050B8; }
.single-gemstone-color-dots span[data-gem-color="blue-green"]::before    { background: #0D7A6A; }
.single-gemstone-color-dots span[data-gem-color="blue-grey"]::before     { background: #5A6E82; }
.single-gemstone-color-dots span[data-gem-color="teal"]::before          { background: #0D7A6A; }
.single-gemstone-color-dots span[data-gem-color="green"]::before         { background: #1A5C2E; }
.single-gemstone-color-dots span[data-gem-color="apple-green"]::before   { background: #3A7A20; }
.single-gemstone-color-dots span[data-gem-color="mint-green"]::before    { background: #4A9A6A; }
.single-gemstone-color-dots span[data-gem-color="pale-green"]::before    { background: #6AAA7A; }
.single-gemstone-color-dots span[data-gem-color="yellow-green"]::before  { background: #7A9A10; }
.single-gemstone-color-dots span[data-gem-color="banded-green"]::before  { background: #2A6A3A; }
.single-gemstone-color-dots span[data-gem-color="canary-yellow"]::before { background: #D4A800; }
.single-gemstone-color-dots span[data-gem-color="pale-yellow"]::before   { background: #C8A820; border: 1px solid #aaa; }
.single-gemstone-color-dots span[data-gem-color="yellow-brown"]::before  { background: #8A5A1A; }
.single-gemstone-color-dots span[data-gem-color="gold"]::before          { background: #B8860A; }
.single-gemstone-color-dots span[data-gem-color="red-orange"]::before    { background: #C03A10; }
.single-gemstone-color-dots span[data-gem-color="red-pink"]::before      { background: #B02050; }
.single-gemstone-color-dots span[data-gem-color="red-spotted"]::before   { background: #8B1A1A; }
.single-gemstone-color-dots span[data-gem-color="hot-pink"]::before      { background: #C01860; }
.single-gemstone-color-dots span[data-gem-color="purplish-pink"]::before { background: #9A1870; }
.single-gemstone-color-dots span[data-gem-color="silver"]::before        { background: #A8B0B8; border: 1px solid #888; }
.single-gemstone-color-dots span[data-gem-color="transparent"]::before   { background: transparent; border: 1px solid #aaa; }
.single-gemstone-color-dots span[data-gem-color="banded"]::before        { background: #888; }
.single-gemstone-color-dots span[data-gem-color="multicolor"]::before    { background: linear-gradient(135deg, #C01818 25%, #1A6A40 50%, #1A3080 75%); }
.single-gemstone-color-dots span[data-gem-color="bicolor"]::before       { background: linear-gradient(135deg, #C01868 50%, #1A6A40 50%); }
.single-gemstone-color-dots span[data-gem-color="color-change"]::before  { background: linear-gradient(135deg, #1A3580 50%, #6A1A40 50%); }

.single-gemstone-main {
    padding: var(--space-xl);
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

.single-gemstone-section {
    padding-bottom: var(--space-xl);
    border-bottom: 1px solid var(--color-border);
}

.single-gemstone-section:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.single-gemstone-section-label {
    display: block;
    color: oklch(from var(--gem-color, var(--color-gold)) clamp(0.2, l, 0.62) c h);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.20em;
    text-transform: uppercase;
    margin-bottom: var(--space-xs);
}

.single-gemstone-section h2 {
    font-family: var(--font-serif);
    font-size: 22px;
    font-weight: 400;
    letter-spacing: -0.01em;
    margin-bottom: var(--space-lg);
}

.single-gemstone-props {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    border: 1px solid var(--color-border);
}

.single-gemstone-props > div {
    padding: var(--space-sm) var(--space-md);
    border-right: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.single-gemstone-props > div:nth-child(2n) { border-right: 0; }
.single-gemstone-props > div:nth-last-child(-n+2) { border-bottom: 0; }

.single-gemstone-props dt {
    color: var(--color-text-muted);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 3px;
}

.single-gemstone-props dd {
    color: var(--color-text);
    font-size: var(--text-sm);
    font-weight: 500;
}

.single-gemstone-props dd em {
    display: block;
    color: var(--color-text-muted);
    font-size: 12px;
    font-style: normal;
    margin-top: 2px;
}

.single-gemstone-origin-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
}

.single-gemstone-origin-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    padding: var(--space-md);
    border: 1px solid var(--color-border);
    text-decoration: none;
    transition: background var(--transition);
    border-top: 3px solid var(--prestige-color, var(--color-border));
}

.single-gemstone-origin-card:hover { background: #FAFAF8; }

.single-gemstone-origin-card[data-prestige="legendary"]  { --prestige-color: var(--prestige-legendary,  #A3162D); }
.single-gemstone-origin-card[data-prestige="premium"]    { --prestige-color: var(--prestige-premium,    #A98C4A); }
.single-gemstone-origin-card[data-prestige="major"]      { --prestige-color: var(--prestige-major,      #2E6DA4); }
.single-gemstone-origin-card[data-prestige="commercial"] { --prestige-color: var(--prestige-commercial, #2E7D5E); }
.single-gemstone-origin-card[data-prestige="notable"]    { --prestige-color: var(--prestige-notable,    #8A8078); }

.single-gemstone-origin-head span {
    display: block;
    color: var(--color-text-muted);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.single-gemstone-origin-head strong {
    display: block;
    color: var(--color-text);
    font-family: var(--font-serif);
    font-size: 16px;
    font-weight: 400;
}

.single-gemstone-origin-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.origin-prestige-badge {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    padding: 2px 7px;
    background: color-mix(in srgb, var(--prestige-color, #888) 12%, transparent);
    color: var(--prestige-color, #888);
    border-radius: 2px;
}

.origin-premium-badge {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    padding: 2px 7px;
    color: var(--color-gold);
    background: color-mix(in srgb, var(--color-gold) 10%, transparent);
    border-radius: 2px;
}

.origin-note {
    font-size: 11px;
    color: var(--color-text-muted);
    line-height: 1.5;
    margin: 0;
}

.single-gemstone-origin-bar {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-top: 2px;
}

.origin-bar-track {
    flex: 1;
    height: 3px;
    background: var(--color-border);
    border-radius: 2px;
    overflow: hidden;
}

.origin-bar-fill {
    height: 100%;
    width: var(--share, 0%);
    background: var(--prestige-color, var(--color-text-muted));
    border-radius: 2px;
    transition: width 0.6s ease;
}

.single-gemstone-origin-bar > span {
    color: var(--color-text-muted);
    font-size: 10px;
    white-space: nowrap;
}

.single-gemstone-card-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
}

.single-gemstone-card-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: var(--space-md);
    border: 1px solid var(--color-border);
    text-decoration: none;
    transition: background var(--transition);
}

.single-gemstone-card-item:hover { background: #FAFAF8; }

.single-gemstone-card-item span {
    color: var(--color-gold);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.single-gemstone-card-item strong {
    color: var(--color-text);
    font-size: var(--text-sm);
    font-weight: 600;
}

.single-gemstone-card-item em {
    color: var(--color-text-muted);
    font-size: 12px;
    font-style: normal;
    line-height: 1.5;
}

.single-gemstone-tool-list {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--color-border);
}

.single-gemstone-tool-item {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-md);
    padding: var(--space-sm) var(--space-md);
    border-bottom: 1px solid var(--color-border);
    text-decoration: none;
    transition: background var(--transition);
}

.single-gemstone-tool-item:last-child { border-bottom: 0; }
.single-gemstone-tool-item:hover { background: #FAFAF8; }

.single-gemstone-tool-item strong {
    color: var(--color-text);
    font-size: var(--text-sm);
    font-weight: 500;
}

.single-gemstone-tool-item span {
    color: var(--color-text-muted);
    font-size: 11px;
    text-align: right;
}

.single-gemstone-side {
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    position: sticky;
    top: var(--header-height, 90px);
    align-self: start;
    background: #FAFAF8;
}

.single-gemstone-block {
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.single-gemstone-block:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.single-gemstone-block > span:first-child {
    display: block;
    color: oklch(from var(--gem-color, var(--color-gold)) clamp(0.2, l, 0.62) c h);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.20em;
    text-transform: uppercase;
}

.single-gemstone-block p {
    color: var(--color-text-muted);
    font-size: 12px;
    line-height: 1.65;
    margin: 0;
}

.single-gemstone-props-sm {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.single-gemstone-props-sm > div {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: var(--space-sm);
    padding: var(--space-xs) 0;
    border-bottom: 1px solid var(--color-border);
}

.single-gemstone-props-sm > div:last-child { border-bottom: 0; }

.single-gemstone-props-sm dt {
    color: var(--color-text-muted);
    font-size: 11px;
    flex-shrink: 0;
}

.single-gemstone-props-sm dd {
    color: var(--color-text);
    font-size: 12px;
    font-weight: 500;
    text-align: right;
}

.single-gemstone-price {
    display: block;
    font-family: var(--font-serif);
    font-size: 17px;
    font-weight: 400;
    color: var(--color-text);
}

.single-gemstone-rarity-label {
    display: block;
    font-family: var(--font-serif);
    font-size: 17px;
    font-weight: 400;
    color: var(--color-text);
}

.single-gemstone-confused {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.single-gemstone-confused li strong {
    display: block;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-text);
}

.single-gemstone-confused li em {
    display: block;
    font-style: normal;
    font-size: 11px;
    color: var(--color-text-muted);
    line-height: 1.55;
    margin-top: 2px;
}

.single-gemstone-tip-block {
    background: color-mix(in srgb, var(--color-gold) 6%, transparent);
    border: 1px solid color-mix(in srgb, var(--color-gold) 20%, transparent) !important;
    padding: var(--space-md) !important;
}

.single-gemstone-tip-block > span:first-child {
    color: var(--color-gold) !important;
}

.single-gemstone-varieties {
    list-style: none;
    display: flex;
    flex-direction: column;
}

.single-gemstone-varieties li a {
    display: block;
    padding: var(--space-xs) 0;
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text);
    font-size: var(--text-sm);
    text-decoration: none;
    transition: color var(--transition);
}

.single-gemstone-varieties li:last-child a { border-bottom: 0; }
.single-gemstone-varieties li a:hover { color: var(--color-gold); }

.single-gemstone-parent-link {
    display: block;
    color: var(--color-text-muted);
    font-size: var(--text-sm);
    font-weight: 500;
    text-decoration: none;
    transition: color var(--transition);
}

.single-gemstone-parent-link:hover { color: var(--color-text); }

@media (max-width: 1100px) {
    .single-gemstone-layout {
        grid-template-columns: 1fr 260px;
    }
}

@media (max-width: 860px) {
    .single-gemstone-layout {
        grid-template-columns: 1fr;
    }
    .single-gemstone-content {
        border-right: 0;
    }
    .single-gemstone-side {
        position: static;
        border-top: 1px solid var(--color-border);
    }
    .single-gemstone-origin-list,
    .single-gemstone-card-grid {
        grid-template-columns: 1fr;
    }
    .single-gemstone-props {
        grid-template-columns: 1fr;
    }
    .single-gemstone-props > div:nth-child(2n) { border-right: 1px solid var(--color-border); }
    .single-gemstone-props > div:nth-last-child(-n+2) { border-bottom: 1px solid var(--color-border); }
    .single-gemstone-props > div:last-child { border-bottom: 0; }
}

@media (max-width: 520px) {
    article.single-gemstone { padding: var(--space-md) 0 var(--space-md); }
    .single-gemstone-intro,
    .single-gemstone-main,
    .single-gemstone-side { padding: var(--space-md); }
}

@media print {
    .single-gemstone-tools button { display: none; }
    .single-gemstone-layout { grid-template-columns: 1fr 240px; border: 0; }
    .single-gemstone-side { position: static; }
}
