

@media (max-width: 768px) {
    html, body {
        overflow-x: hidden;
        max-width: 100vw;
    }
    
    .ticker-viewport {
        overflow: hidden;
        max-width: 100vw;
    }
    
    .market-ticker {
        overflow: hidden;
    }
}

.spm-sparkline-wrapper { margin-top: 15px; }
.spm-sparkline-container { 
    display: flex; 
    align-items: flex-end; 
    justify-content: space-between; 
    height: 40px; 
    gap: 2px; 
    border-bottom: 1px solid #e2e8f0; 
}
.spm-bar { 
    flex: 1; 
    background-color: #cbd5e1; 
    border-radius: 2px 2px 0 0; 
    transition: background-color 0.2s ease, opacity 0.2s; 
    min-width: 2px; 
}
.spm-bar:hover { background-color: #94a3b8; cursor: crosshair; }
.spm-bar.is-min { background-color: #fca5a5; }
.spm-bar.is-max { background-color: #86efac; }
.spm-bar.is-current { background-color: var(--primary, #ea580c); }
.spm-sparkline-labels { 
    display: flex; 
    justify-content: space-between; 
    font-size: 11px; 
    color: var(--text-light, #64748b); 
    margin-top: 6px; 
}

.matrix-conclusion {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed var(--border, #e2e8f0);
    font-size: 13px;
}

.market-movers-block {
    background: #fff;
    padding: 0;
}

.mm-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 8px;
}

.mm-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    color: var(--text-main, #1e293b);
}

.mm-title svg {
    stroke: #374151;
}

.mm-period {
    font-size: 11px;
    color: #475569;
    background: #f1f5f9;
    padding: 3px 8px;
    border-radius: 2px;
    font-weight: 500;
}

.mm-intro {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-main, #1e293b);
    margin: 0 0 16px 0;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
}

.mm-intro strong {
    color: var(--primary, #ea580c);
    font-weight: 600;
}

.mm-summary {
    display: flex;
    gap: 20px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
}

.mm-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}

.mm-stat-value {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-main, #1e293b);
}

.mm-stat-label {
    color: var(--text-light, #64748b);
    font-size: 13px;
}

.mm-stat-up .mm-stat-value { color: #166534; }
.mm-stat-down .mm-stat-value { color: #991b1b; }
.mm-stat-stable .mm-stat-value { color: #475569; }

.mm-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.mm-zone-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 0 6px;
    margin-top: 0;
    color: #475569;
}

.mm-zone-label:first-child {
    padding-top: 0;
}

.mm-zone-up { color: #166534; }
.mm-zone-stable { color: #475569; }
.mm-zone-down { color: #991b1b; }

.mm-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    text-decoration: none;
    border-bottom: 1px solid #f1f5f9;
}

.mm-item:last-child {
    border-bottom: none;
}

.mm-item-up {
    background: #f8faf8;
    border-left: 3px solid #166534;
}

.mm-item-stable {
    background: #fafafa;
    border-left: 3px solid #64748b;
}

.mm-item-down {
    background: #fefaf8;
    border-left: 3px solid #b45309;
}

.mm-item-name {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main, #1e293b);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.mm-item-trend {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
    font-size: 13px;
}

.mm-item-up .mm-item-trend { color: #166534; }
.mm-item-stable .mm-item-trend { color: #64748b; }
.mm-item-down .mm-item-trend { color: #b45309; }

.mm-trend-icon {
    font-size: 15px;
    font-weight: 700;
}

.mm-item-price {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    min-width: 70px;
    text-align: right;
}

.mm-item-price small {
    font-size: 11px;
    font-weight: 400;
    color: #64748b;
}

.mm-footer {
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px solid #e2e8f0;
}

.mm-meta {
    font-size: 12px;
    color: var(--text-light, #64748b);
}

@media (max-width: 768px) {
    .mm-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .mm-summary {
        gap: 12px;
    }
    
    
    .mm-title svg,
    .card-title svg,
    .matrix-header svg {
        display: none;
    }
}

.is-hot-card {
    border-color: var(--green, #16a34a) !important;
    background: linear-gradient(135deg, rgba(22, 163, 74, 0.03) 0%, transparent 100%);
}

.hot-trend-badge {
    background: var(--green, #16a34a) !important;
}

.price-range-hint {
    display: block;
    font-size: 12px;
    color: var(--text-light, #64748b);
    margin-top: 4px;
}

.card-sparkline-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: var(--bg-light, #f8fafc);
    border-top: 1px solid var(--border, #e2e8f0);
    gap: 15px;
}

.sparkline-trend {
    display: flex;
    align-items: center;
    gap: 8px;
}

.trend-label {
    font-size: 13px;
    color: var(--text-light, #64748b);
}

.trend-value {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    font-weight: 600;
}

.trend-value.trend-up { color: var(--green, #10b981); }
.trend-value.trend-down { color: var(--danger, #ef4444); }
.trend-value.trend-flat { color: var(--text-light, #94a3b8); }

.sparkline-chart {
    flex-shrink: 0;
}

.cta-bottom-link.cta-enhanced {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--primary, #ea580c) 0%, #c2410c 100%);
    border: none;
    border-radius: 0 0 12px 12px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    letter-spacing: 0.3px;
    transition: all 0.25s ease;
    box-shadow: inset 0 -2px 0 rgba(0,0,0,0.15);
}

.cta-bottom-link.cta-enhanced:hover {
    background: linear-gradient(135deg, #c2410c 0%, #9a3412 100%);
    box-shadow: inset 0 -2px 0 rgba(0,0,0,0.2), 0 4px 12px rgba(234, 88, 12, 0.3);
}

.cta-bottom-link.cta-enhanced:active {
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

.cta-bottom-link.cta-enhanced svg {
    transition: transform 0.2s ease;
}

.cta-bottom-link.cta-enhanced:hover svg {
    transform: translateX(4px);
}

.yards-intro-text {
    font-size: 14px;
    color: var(--text-light, #64748b);
    line-height: 1.5;
    margin: 0;
}

.yard-metals-count {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.yard-metals-count .count-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary, #ea580c);
    line-height: 1;
}

.yard-metals-count .count-label {
    font-size: 12px;
    color: var(--text-light, #64748b);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

.btn-toggle-prices {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: var(--bg-light, #f1f5f9);
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 3px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark, #334155);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-toggle-prices:hover {
    background: var(--primary, #ea580c);
    border-color: var(--primary, #ea580c);
    color: #fff;
}

.btn-toggle-prices.active {
    background: var(--primary, #ea580c);
    border-color: var(--primary, #ea580c);
    color: #fff;
}

.yards-list-category {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

@media (max-width: 900px) {
    .yards-list-category {
        grid-template-columns: 1fr;
    }
}

#prices-table .compact-metal-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}
@media (max-width: 900px) {
    #prices-table .compact-metal-grid {
        grid-template-columns: 1fr;
    }
}
#prices-table .metal-card {
    position: relative;
    background: var(--bg-light, #f8fafc);
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 3px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: none;
    height: auto !important;
    align-self: start;
}
#prices-table .metal-card .card-main {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border, #e2e8f0);
    background: linear-gradient(to bottom, #fff, #fafbfc);
}
#prices-table .metal-card .metal-name {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-dark, #1e293b);
}
#prices-table .metal-card .metal-yards {
    font-size: 13px;
    color: var(--text-light, #64748b);
    display: flex;
    align-items: center;
    gap: 4px;
}
#prices-table .metal-card .metal-yards svg {
    stroke: var(--primary, #ea580c);
}
#prices-table .metal-card .metal-price {
    font-size: 17px;
    font-weight: 600;
    color: var(--primary, #ea580c);
}
#prices-table .metal-card .avg-label {
    font-size: 12px;
    color: var(--text-light, #64748b);
}
#prices-table .metal-card .card-sparkline-row {
    padding: 16px 20px;
    background: var(--bg-light, #f8fafc);
    border-top: none;
}
#prices-table .metal-card .cta-bottom-link {
    border-top: none !important;
    margin-top: 0 !important;
}
#prices-table .metal-card.is-hot-card {
    background: linear-gradient(135deg, rgba(22, 163, 74, 0.03) 0%, var(--bg-light, #f8fafc) 100%);
}
#prices-table .metal-card.is-hot-card .hot-trend-badge {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 3;
    border: 1px solid transparent;
    border-top: none;
    border-right: none;
    border-radius: 0 3px 0 3px;
}
#prices-table .metal-card.is-hot-card .card-main {
    padding-top: 40px;
}
#prices-table .metal-card .cta-bottom-link.cta-enhanced {
    border-radius: 0 0 3px 3px;
}

.yard-card-category {
    position: relative;
    background: var(--bg-light, #f8fafc);
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 3px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.badge-double-corner {
    position: absolute;
    top: 0;
    right: 0;
    display: inline-flex;
    align-items: stretch;
    z-index: 3;
    border: 1px solid #e2e8f0;
    border-top: none;
    border-right: none;
    border-radius: 0 3px 0 3px;
    overflow: hidden;
}

.badge-date-part {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 11px;
    font-weight: 500;
    border-radius: 0;
    letter-spacing: 0.2px;
    border-right: 1px solid #e2e8f0;
}

.badge-link-part {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    background: #ecfdf5;
    color: #16a34a;
    font-size: 11px;
    font-weight: 500;
    border-radius: 0;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    border-bottom: 1px solid #86efac;
}

button.badge-link-part {
    border: none;
    margin: 0;
    font: inherit;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.badge-link-part:hover {
    background: #dcfce7;
    color: #15803d;
}

.badge-link-part svg {
    stroke: #16a34a;
}

.badge-link-part:hover svg {
    stroke: #15803d;
}

.badge-date-corner {
    position: absolute;
    top: 0;
    right: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 11px;
    font-weight: 500;
    border-radius: 0 3px 0 3px;
    letter-spacing: 0.2px;
    z-index: 1;
    border-left: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

.badge-date-part.status-fresh,
.badge-date-part.status-warn,
.badge-date-part.status-old {
    background: #f1f5f9;
    color: #64748b;
}

.badge-date-part.verified {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
}

.badge-date-part.verified svg {
    stroke: #b45309;
}

.badge-date-corner.status-fresh,
.badge-date-corner.status-warn,
.badge-date-corner.status-old {
    background: #f1f5f9;
    color: #64748b;
    border-left-color: #e2e8f0;
    border-bottom-color: #e2e8f0;
}

.badge-date-corner.status-fresh svg,
.badge-date-corner.status-warn svg,
.badge-date-corner.status-old svg {
    stroke: #94a3b8;
}

.badge-date-corner.verified {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    border-left: 1px solid #fcd34d;
    border-bottom: 1px solid #fcd34d;
}

.badge-date-corner.verified svg {
    stroke: #b45309;
}

.verified-icon-wrapper {
    position: relative;
    display: inline-flex;
    cursor: help;
}

.verified-icon-wrapper::after {
    content: attr(title);
    position: absolute;
    bottom: calc(100% + 8px);
    right: -10px;
    background: #1e293b;
    color: #fff;
    padding: 8px 12px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.verified-icon-wrapper::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    right: 4px;
    border: 6px solid transparent;
    border-top-color: #1e293b;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    z-index: 100;
}

.verified-icon-wrapper:hover::after,
.verified-icon-wrapper:hover::before,
.verified-icon-wrapper:focus::after,
.verified-icon-wrapper:focus::before,
.verified-icon-wrapper.tooltip-active::after,
.verified-icon-wrapper.tooltip-active::before {
    opacity: 1;
    visibility: visible;
}

.spread-tooltip-trigger {
    position: relative;
    cursor: help;
    border-bottom: 1px dashed currentColor;
}

.spread-tooltip-trigger::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: #fff;
    padding: 10px 14px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;
    white-space: normal;
    max-width: 280px;
    min-width: 150px;
    text-align: left;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    pointer-events: none;
}

.spread-tooltip-trigger::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #1e293b;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    z-index: 100;
}

.spread-tooltip-trigger:hover::after,
.spread-tooltip-trigger:hover::before,
.spread-tooltip-trigger.tooltip-active::after,
.spread-tooltip-trigger.tooltip-active::before {
    opacity: 1;
    visibility: visible;
}

.spread-tooltip-trigger.awaiting {
    color: #b45309;
}

.yard-card-category.premium {
    background: #fffbeb;
    border: 1px solid #fde68a;
}

.yard-card-category.premium .yard-card-top {
    background: transparent;
}

.yard-card-category.premium .yard-prices-table {
    background: rgba(254, 252, 232, 0.5);
}

.yard-card-category.premium .meta-count {
    color: #92400e;
}

.yard-card-category.premium .cell-price {
    color: #1e293b;
}

.yard-card-category.premium .btn-expand-prices {
    color: #92400e;
    border-color: #fde68a;
}

.yard-card-category.premium .btn-expand-prices:hover {
    background: rgba(180, 83, 9, 0.06);
    border-color: #d97706;
}

.yard-card-top {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border, #e2e8f0);
    background: linear-gradient(to bottom, #fff, #fafbfc);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    position: relative;
    z-index: 2;
}

.yard-info-block {
    flex: 1;
    min-width: 0;
}

.yard-info-block .yard-name-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.yard-contact-block {
    flex-shrink: 0;
    position: relative;
    z-index: 2;
    margin-top: 28px;
}

.btn-call-cat {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: linear-gradient(180deg, #22c55e 0%, #16a34a 100%);
    color: #fff;
    border-radius: 3px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 2px 4px rgba(22, 163, 74, 0.3);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-call-cat:hover {
    background: linear-gradient(180deg, #16a34a 0%, #15803d 100%);
    box-shadow: 0 4px 8px rgba(22, 163, 74, 0.4);
    transform: translateY(-1px);
}

.btn-contact-cat {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #fff;
    border: 1px solid var(--primary, #ea580c);
    border-radius: 3px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary, #ea580c);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-contact-cat svg {
    stroke: var(--primary, #ea580c);
}

.btn-contact-cat:hover {
    background: var(--primary, #ea580c);
    color: #fff;
}

.btn-contact-cat:hover svg {
    stroke: #fff;
}

.yard-info-block .yard-name {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-dark, #1e293b);
    margin: 0;
}

.yard-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--text-light, #64748b);
}

.meta-location {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--text-main, #475569);
}

.meta-location svg {
    stroke: var(--primary, #ea580c);
    flex-shrink: 0;
}

.meta-time {
    color: var(--green, #16a34a);
    font-weight: 500;
}

.meta-count {
    font-weight: 600;
    color: var(--primary, #ea580c);
}

.meta-sep {
    color: #cbd5e1;
}

.meta-report {
    margin-left: auto;
}

.meta-report a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #64748b;
    text-decoration: none;
    padding: 4px 10px;
    border-radius: 3px;
    background: #f1f5f9;
    transition: all 0.15s ease;
}

.meta-report a:hover {
    color: #ea580c;
    background: #fff7ed;
}

.meta-report a svg {
    flex-shrink: 0;
}

.yard-prices-table {
    padding: 16px 20px;
    background: var(--bg-light, #f8fafc);
    flex: 1;
}

.prices-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
}

.prices-hidden {
    display: none;
    margin-top: 8px;
}

.prices-hidden.expanded {
    display: grid;
}

.price-cell {
    display: flex;
    align-items: center;
    padding: 8px 0;
    gap: 6px;
}

.cell-metal {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main, #1e293b);
    white-space: normal;
    word-break: break-word;
    line-height: 1.3;
    max-width: 280px;
}

.cell-dots {
    flex: 1;
    height: 1px;
    border-bottom: 2px dotted #d1d5db;
    min-width: 16px;
}

.cell-price-row {
    display: flex;
    align-items: center;
    gap: 0;
    flex-shrink: 0;
}

.btn-price-history {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    margin-left: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 3px;
    color: #64748b;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.btn-price-history:hover {
    background: #f1f5f9;
    color: #475569;
    border-color: #cbd5e1;
}

.btn-price-history:active {
    background: #e2e8f0;
}

.btn-history-icon {
    font-size: 14px;
    line-height: 1;
    flex-shrink: 0;
}

.btn-history-text {
    display: inline;
}

.cell-price {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    display: inline-flex;
    align-items: baseline;
    flex-wrap: wrap;
}

.cell-price-value {
    min-width: 70px;
    text-align: right;
    display: inline-block;
}

.cell-price-trend {
    min-width: 130px;
    display: inline-flex;
    align-items: baseline;
}

.cell-price small {
    font-weight: 500;
    font-size: 12px;
    color: #94a3b8;
}

.price-change-sep {
    color: #cbd5e1;
    margin-left: 8px;
    margin-right: 6px;
    font-weight: 400;
}

.price-trend {
    display: inline;
    font-size: 12px;
    font-weight: 500;
}

.trend-arrow {
    font-size: 14px;
    font-weight: 700;
    margin-right: 2px;
}

.price-trend.trend-up {
    color: #22c55e;
}

.price-trend.trend-up .trend-arrow {
    color: #16a34a;
}

.price-trend.trend-down {
    color: #f87171;
}

.price-trend.trend-down .trend-arrow {
    color: #dc2626;
}

.btn-expand-prices {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 12px;
    padding: 10px;
    background: #fff;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 3px;
    font-size: 13px;
    font-weight: 500;
    color: var(--primary, #ea580c);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-expand-prices:hover {
    background: rgba(234, 88, 12, 0.05);
    border-color: var(--primary, #ea580c);
}

.btn-expand-prices svg {
    transition: transform 0.3s ease;
}

.btn-expand-prices.expanded svg {
    transform: rotate(180deg);
}

.btn-load-more-yards {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 20px;
    padding: 14px 20px;
    background: #fff;
    border: 2px solid var(--primary, #ea580c);
    border-radius: 3px;
    font-size: 15px;
    font-weight: 600;
    color: var(--primary, #ea580c);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-load-more-yards:hover {
    background: var(--primary, #ea580c);
    color: #fff;
}

@keyframes yardCardFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.yard-card-category.yard-appearing {
    animation: yardCardFadeIn 0.4s ease forwards;
}

@media (max-width: 768px) {
    #prices-table .compact-metal-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    #prices-table .metal-card .card-main {
        flex-direction: row;
        padding: 18px 16px;
    }
    #prices-table .metal-card .card-right {
        text-align: right;
    }
    
    .metal-card-main {
        flex-direction: column;
        gap: 12px;
    }
    
    .metal-card-right {
        text-align: left;
    }
    
    .metal-card-name {
        padding-right: 0;
    }
    
    .hot-badge {
        position: static;
        align-self: flex-start;
        margin: 15px 0 0 15px;
    }
    
    .metal-card-analytics {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .yard-price-block {
        min-width: auto;
    }
    
    
    
    .yard-card-category .yard-card-top {
        padding-top: 40px;
        flex-wrap: wrap;
    }
    
    .yard-card-category .badge-date-corner,
    .yard-card-category .badge-date-part,
    .yard-card-category .badge-link-part {
        font-size: 10px;
        padding: 5px 8px;
    }
    
    .yard-contact-block {
        width: 100%;
        margin-top: 10px;
    }
    
    .btn-call-cat,
    .btn-contact-cat {
        width: 100%;
        justify-content: center;
        padding: 10px 14px;
    }
    
    
    .verified-icon-wrapper {
        -webkit-tap-highlight-color: transparent;
    }
    
    .verified-icon-wrapper::after {
        right: -20px;
        white-space: normal;
        max-width: 200px;
        text-align: center;
    }
    
    
    .spread-tooltip-trigger {
        -webkit-tap-highlight-color: transparent;
    }
    
    .spread-tooltip-trigger::after {
        left: 0;
        transform: none;
        max-width: 250px;
    }
    
    .yard-meta-row {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: flex-start;
        gap: 4px 8px;
    }
    
    .meta-sep {
        display: none;
    }
    
    .meta-report {
        width: 100%;
        margin-left: 0;
        margin-top: 4px;
    }
    
    .meta-report a {
        width: 100%;
        justify-content: center;
    }
    
    .prices-grid {
        grid-template-columns: 1fr;
        gap: 4px;
    }
    
    
    .price-cell {
        padding: 10px 0;
        border-bottom: 1px solid var(--border, #e2e8f0);
    }
    
    .price-cell:last-child {
        border-bottom: none;
    }
    
    .price-cell .cell-metal {
        white-space: normal;
        word-break: break-word;
        font-size: 13px;
        max-width: none;
    }
    
    .price-cell .btn-price-history {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .price-cell .btn-history-icon {
        font-size: 14px;
        min-width: 14px;
    }
    
    
    .price-cell:not(.has-history) {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 4px;
    }
    
    .price-cell:not(.has-history) .cell-metal {
        flex-shrink: 1;
        min-width: 0;
    }
    
    .price-cell:not(.has-history) .cell-dots {
        display: none;
    }
    
    .price-cell:not(.has-history) .cell-price-row {
        flex-shrink: 0;
    }
    
    .price-cell:not(.has-history) .cell-price-value {
        min-width: auto;
    }
    
    .price-cell:not(.has-history) .cell-price-trend {
        min-width: auto;
    }
    
    
    .price-cell.has-history {
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto;
        gap: 2px 12px;
    }
    
    .price-cell.has-history .cell-metal {
        grid-column: 1;
        grid-row: 1;
    }
    
    .price-cell.has-history .cell-dots {
        display: none;
    }
    
    .price-cell.has-history .cell-price-row {
        grid-column: 1;
        grid-row: 2;
        display: flex;
        align-items: center;
        gap: 8px;
    }
    
    .price-cell.has-history .btn-price-history {
        grid-column: 2;
        grid-row: 1 / 3;
        align-self: center;
        margin-left: 0;
    }
    
    .price-cell.has-history .cell-price-value {
        min-width: auto;
    }
    
    .price-cell.has-history .cell-price-trend {
        min-width: auto;
        flex: 1;
    }
    
    .price-cell .cell-price {
        font-size: 14px;
        color: #1e293b;
    }
    
    .price-cell .price-trend {
        font-size: 12px;
    }
    
    .price-cell .price-change-sep {
        display: none;
    }
}

.calc-compact {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.calc-catalog-header {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border, #e2e8f0);
}

.calc-catalog-header-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.calc-catalog-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark, #1e293b);
    margin: 0 0 6px 0;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.calc-catalog-subtitle {
    font-size: 14px;
    color: var(--text-light, #64748b);
    margin: 0;
    line-height: 1.5;
}

.calc-location-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    font-size: 14px;
    color: var(--text-dark, #334155);
    background: var(--bg-body, #f8fafc);
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 3px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.calc-location-trigger:hover {
    background: #fff;
    border-color: var(--primary, #2563eb);
}

.calc-location-chevron {
    flex-shrink: 0;
    opacity: 0.6;
}

.calc-accordion-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-light, #64748b);
    background: var(--bg-body, #f1f5f9);
    border-radius: 3px;
}

.calc-location-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.calc-location-modal[hidden] {
    display: none !important;
}

.calc-location-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
}

.calc-location-modal-content {
    position: relative;
    width: 100%;
    max-width: 360px;
    background: #fff;
    border-radius: 3px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.calc-location-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border, #e2e8f0);
}

.calc-location-modal-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark, #1e293b);
}

.calc-location-modal-close {
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    background: transparent;
    font-size: 24px;
    line-height: 1;
    color: var(--text-light, #94a3b8);
    cursor: pointer;
    border-radius: 6px;
}

.calc-location-modal-close:hover {
    background: var(--bg-body, #f8fafc);
    color: var(--text-dark, #1e293b);
}

.calc-location-modal-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.calc-location-modal-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark, #334155);
}

.calc-location-modal-body .calc-state-select,
.calc-location-modal-body .calc-city-select {
    width: 100%;
    padding: 12px 14px;
    font-size: 15px;
    border: 2px solid var(--border, #e2e8f0);
    border-radius: 3px;
    background: #fff;
}

.calc-location-modal-body .calc-city-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.calc-location-reset {
    margin-top: 12px;
    padding: 10px 0;
    font-size: 14px;
    color: var(--primary, #2563eb);
    background: transparent;
    border: none;
    border-top: 1px solid var(--border, #e2e8f0);
    cursor: pointer;
    text-align: center;
    transition: color 0.15s;
}

.calc-location-reset:hover {
    color: var(--accent-hover, #1d4ed8);
}

.calc-location-fields {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.calc-city-wrap {
    flex: 1;
    min-width: 140px;
    max-width: 220px;
}

.calc-location-fields .calc-state-select,
.calc-location-fields .calc-city-select {
    flex: 1;
    min-width: 140px;
    max-width: 220px;
    padding: 12px 14px;
    font-size: 15px;
    border: 2px solid var(--border, #e2e8f0);
    border-radius: 3px;
    background: #fff;
    color: var(--text-dark, #1e293b);
    cursor: pointer;
    transition: border-color 0.15s;
}

.calc-location-fields .calc-state-select:focus,
.calc-location-fields .calc-city-select:focus {
    outline: none;
    border-color: var(--primary, #2563eb);
}

.calc-location-fields .calc-city-select:disabled {
    background: var(--bg-body, #f1f5f9);
    color: var(--text-light, #94a3b8);
}

.hero.calc-hero {
    padding-bottom: 72px;
}

.calc-hero-subtitle {
    font-size: 18px;
    margin-bottom: 24px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.55;
}

.calc-content-section.dashboard-section {
    margin-top: -28px;
    margin-bottom: 60px;
}

.calc-intro-header {
    margin-bottom: 24px;
}

.calc-intro-title.section-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark, #1e293b);
    margin: 0 0 16px 0;
}

.calc-intro-description {
    margin: 0;
    color: var(--text-main, #4b5563);
    font-size: 14px;
    line-height: 1.6;
}

.calc-intro-description p {
    margin: 0 0 10px 0;
}

.calc-intro-description p:last-child {
    margin-bottom: 0;
    font-size: 0.95em;
}

.calc-wholesale-intro {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-main, #4b5563);
    margin: 0 0 14px 0;
}

.calc-wholesale-volumes-wrap {
    margin: 0 0 12px 0;
    overflow-x: auto;
    border-radius: 6px;
    border: 1px solid var(--border, #e2e8f0);
}

.calc-wholesale-volumes-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: #fff;
}

.calc-wholesale-volumes-table th,
.calc-wholesale-volumes-table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border, #e2e8f0);
}

.calc-wholesale-volumes-table th {
    background: var(--bg-body, #f8fafc);
    color: var(--text-dark, #1e293b);
    font-weight: 600;
}

.calc-wholesale-volumes-table tbody tr:last-child td {
    border-bottom: none;
}

.calc-wholesale-volumes-note {
    font-size: 13px;
    color: var(--text-light, #64748b);
    margin: 0 0 8px 0;
    line-height: 1.5;
}

.calc-horizontal-steps {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border, #e2e8f0);
}

.calc-content-section .calc-page-layout {
    margin-top: 30px;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
}

.calc-content-section .calc-info-block {
    margin-top: 30px;
}

.calc-step-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex: 1;
    min-width: 180px;
}

.calc-step-number {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-dark, #1e293b);
    background: var(--bg-body, #f1f5f9);
    border-radius: 50%;
    border: 1px solid var(--border, #e2e8f0);
}

.calc-step-text {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-main, #334155);
}

.calc-step-text strong {
    color: var(--text-dark, #1e293b);
}

.calc-trust-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 24px;
    padding: 14px 24px;
    background: #f8fafc;
    border-top: 1px solid var(--border, #e2e8f0);
    font-size: 13px;
    color: var(--text-main, #475569);
}

.calc-trust-strip-text {
    display: flex;
    align-items: center;
    gap: 8px;
}

.calc-trust-strip-text .trust-icon {
    font-size: 18px;
}

.calc-trust-strip-meta {
    font-size: 12px;
    color: var(--text-light, #64748b);
}

@media (max-width: 768px) {
    .calc-horizontal-steps {
        flex-direction: column;
        gap: 16px;
        padding: 20px 20px 16px;
    }

    .calc-step-item {
        min-width: 0;
    }

    .calc-trust-strip {
        flex-direction: column;
        align-items: flex-start;
        padding: 14px 20px;
    }
}

.calc-page-meta {
    margin: 8px 0 0 0;
    font-size: 13px;
    color: var(--text-light, #64748b);
}

.calc-meta {
    margin: 0 0 8px 0;
    font-size: 13px;
    color: var(--text-light, #64748b);
}

.calc-search-wrap {
    margin-bottom: 4px;
}

.calc-search-inner {
    display: flex;
    align-items: stretch;
    border: 2px solid var(--border, #e2e8f0);
    border-radius: 3px;
    background: #fff;
    overflow: hidden;
}

.calc-search-wrap .calc-search-input {
    flex: 1;
    min-width: 0;
    padding: 14px 18px;
    font-size: 16px;
    border: none;
    background: transparent;
}

.calc-search-wrap .calc-search-input:focus {
    outline: none;
}

.calc-search-inner:focus-within {
    border-color: var(--primary, #2563eb);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.calc-search-clear {
    flex-shrink: 0;
    width: 48px;
    padding: 0;
    border: none;
    border-left: 1px solid var(--border, #e2e8f0);
    background: var(--bg-body, #f8fafc);
    color: var(--text-light, #64748b);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
}

.calc-search-clear:hover {
    background: var(--border, #e2e8f0);
    color: var(--text-dark, #1e293b);
}

.calc-search-inner:not(.has-text) .calc-search-clear {
    opacity: 0.5;
    pointer-events: none;
}

.calc-accordion-area {
    margin-top: 8px;
}
.calc-catalog-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px 20px;
    color: var(--text-light, #64748b);
    font-size: 14px;
}
.calc-loading-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid var(--border, #e2e8f0);
    border-top-color: var(--primary, #0f172a);
    border-radius: 50%;
    animation: sm-calc-spin 0.8s linear infinite;
}
@keyframes sm-calc-spin {
    to { transform: rotate(360deg); }
}

.calc-accordion-group {
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 3px;
    margin-bottom: 8px;
    overflow: hidden;
}

.calc-accordion-group:last-child {
    margin-bottom: 0;
}

.calc-accordion-group.calc-accordion-hidden {
    display: none !important;
}

.calc-accordion-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: #fff;
    border: none;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark, #1e293b);
    cursor: pointer;
    text-align: left;
    transition: background 0.15s;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.calc-accordion-header:hover {
    background: var(--bg-body, #f8fafc);
}

.calc-accordion-header[aria-expanded="true"] {
    background: var(--bg-body, #f8fafc);
    border-bottom: 1px solid var(--border, #e2e8f0);
}

.calc-accordion-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.calc-accordion-icon {
    flex-shrink: 0;
    transition: transform 0.2s;
}

.calc-accordion-header[aria-expanded="true"] .calc-accordion-icon {
    transform: rotate(180deg);
}

.calc-accordion-content {
    display: none;
    padding: 12px;
    background: #fff;
}

.calc-accordion-content .calc-catalog-tiles {
    margin: 0;
}

.calc-catalog-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
}

.calc-tile {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 14px;
    background: #fff;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 3px;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.calc-tile:hover {
    border-color: #059669;
    box-shadow: 0 1px 4px rgba(5, 150, 105, 0.12);
}

.calc-tile.in-cart {
    border-color: #10b981;
    border-left-width: 3px;
    background: #f0fdf4;
}

.calc-tile.calc-search-hidden {
    display: none !important;
}

.calc-catalog-col.calc-search-active .calc-accordion-header {
    display: none !important;
}
.calc-catalog-col.calc-search-active .calc-accordion-group {
    display: contents;
}
.calc-catalog-col.calc-search-active .calc-accordion-content {
    display: contents !important;
}
.calc-catalog-col.calc-search-active .calc-accordion-content .calc-catalog-tiles {
    display: contents;
}
.calc-catalog-col.calc-search-active .calc-accordion-area {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
    align-content: start;
}

.calc-tile-info {
    flex: 1;
    margin-bottom: 10px;
}

.calc-tile-name {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark, #1e293b);
    line-height: 1.3;
}

.calc-tile-price {
    display: block;
    font-size: 12px;
    color: var(--text-light, #64748b);
    margin-top: 4px;
}

.calc-tile-add {
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #059669;
    background: transparent;
    border: 1px solid #10b981;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.15s;
}

.calc-tile-add:hover:not(:disabled) {
    background: #059669;
    color: #fff;
    border-color: #059669;
}

.calc-tile-add.is-added {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #dc2626;
    cursor: pointer;
}
.calc-tile-add.is-added:hover {
    background: #fee2e2;
    border-color: #ef4444;
    color: #b91c1c;
}

.calc-catalog-hint {
    padding: 16px;
    text-align: center;
    font-size: 13px;
    color: var(--text-light, #94a3b8);
    margin: 12px 0 0;
}

.calc-category-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.calc-category-chip {
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    background: var(--border, #e2e8f0);
    color: var(--text-main, #475569);
}

.calc-category-chip:hover {
    background: #cbd5e1;
    color: var(--text-dark, #1e293b);
}

.calc-category-chip.is-active {
    background: var(--text-dark, #1e293b);
    color: #fff;
}

.calc-cart-block {
    min-width: 0;
    border-top: 4px solid var(--calc-accent, #d97706);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

.calc-cart-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.calc-cart-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-dark, #1e293b);
    margin: 0;
}

.calc-clear-all {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-light, #64748b);
    background: transparent;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.15s;
}

.calc-clear-all:hover {
    color: #dc2626;
    border-color: #fca5a5;
    background: #fef2f2;
}

.calc-units-in-cart {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border, #e2e8f0);
}

.calc-empty-desktop {
    display: inline;
}
.calc-empty-mobile {
    display: none;
}
@media (max-width: 768px) {
    .calc-empty-desktop {
        display: none;
    }
    .calc-empty-mobile {
        display: inline;
    }
}

.calc-cart-highlight {
    animation: calc-cart-pulse 1.2s ease;
}
@keyframes calc-cart-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.3); }
    50% { box-shadow: 0 0 0 8px rgba(37, 99, 235, 0); }
}

.calc-mobile-cart-cta {
    display: none;
}
@media (max-width: 768px) {
    .calc-mobile-cart-cta {
        position: fixed;
        bottom: 70px;
        left: 0;
        right: 0;
        z-index: 99;
        padding: 12px 20px;
        background: var(--primary, #2563eb);
        color: #fff;
        font-size: 14px;
        text-align: center;
        cursor: pointer;
        box-shadow: 0 -4px 12px rgba(0,0,0,0.15);
        padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    }
    .calc-mobile-cart-cta:hover {
        background: var(--accent-hover, #1d4ed8);
    }
    .calc-page-layout.calc-has-items {
        padding-bottom: 140px;
    }
}

.calc-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin: 20px 0 24px 0;
}
@media (max-width: 768px) {
    .calc-info-grid {
        grid-template-columns: 1fr;
    }
}
.calc-info-main h3,
.calc-info-tips h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark, #1e293b);
    margin: 0 0 12px 0;
}
.calc-info-main p,
.calc-info-tips p {
    margin: 0 0 12px 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-main, #475569);
}
.calc-info-list {
    padding-left: 20px;
    margin: 0 0 12px 0;
}
.calc-info-list li {
    margin-bottom: 10px;
    line-height: 1.5;
    color: var(--text-main, #475569);
}
.calc-info-tips {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 12px;
    padding: 20px;
}
.calc-info-tips h3 {
    color: #92400e;
}
.calc-info-tips-inner p {
    font-size: 13px;
    color: #b45309;
    margin-bottom: 12px;
}
.calc-faq-list {
    margin: 0 0 15px 0;
}
.calc-faq-list dt {
    font-weight: 600;
    color: var(--text-dark, #1e293b);
    margin-top: 16px;
    margin-bottom: 4px;
    line-height: 1.4;
}
.calc-faq-list dt:first-child {
    margin-top: 0;
}
.calc-faq-list dd {
    margin: 0 0 0 0;
    padding-left: 0;
    line-height: 1.6;
    color: var(--text-main, #334155);
}

.calc-analytics-inline {
    margin-top: 16px;
    padding: 16px;
    background: #f8fafc;
    border: 1px solid var(--border, #cbd5e1);
    border-radius: 8px;
}
.calc-analytics-inline p {
    margin: 0 0 10px 0;
    font-size: 13px;
    color: var(--text-main, #334155);
    line-height: 1.5;
}
.calc-analytics-inline-link {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary, #0284c7);
    text-decoration: none;
}
.calc-analytics-inline-link:hover {
    text-decoration: underline;
}

.calc-b2b-prompt {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px dashed var(--border, #e2e8f0);
    text-align: center;
    font-size: 13px;
}
.calc-b2b-prompt span {
    color: var(--text-light, #64748b);
}
.calc-b2b-prompt a {
    color: var(--calc-accent, #b45309);
    font-weight: 600;
    text-decoration: none;
    margin-left: 4px;
}
.calc-b2b-prompt a:hover {
    text-decoration: underline;
}

.map-section-cta-link {
    color: var(--calc-accent, #b45309);
    font-weight: 600;
    text-decoration: underline;
}
.map-section-cta-link:hover {
    color: #92400e;
}

.calc-analytics-banner {
    margin-top: 24px;
    padding: 20px 24px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid var(--border, #e2e8f0);
}
.calc-analytics-banner p {
    margin: 0;
    font-size: 14px;
    color: var(--text-main, #475569);
}
.calc-analytics-link {
    display: inline-flex;
    align-items: center;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background: var(--calc-accent, #d97706);
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.2s, transform 0.15s;
}
.calc-analytics-link:hover {
    background: #b45309;
    color: #fff;
}

.calc-selector {
    position: relative;
}

.calc-dropdown-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: #fff;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 3px;
    font-size: 14px;
    color: var(--text-main, #334155);
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.calc-dropdown-btn:hover {
    border-color: var(--primary, #2563eb);
}

.calc-dropdown-btn.is-open {
    border-color: var(--primary, #2563eb);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    border-radius: 3px 10px 0 0;
}

.calc-dropdown-arrow {
    transition: transform 0.2s;
}

.calc-dropdown-btn.is-open .calc-dropdown-arrow {
    transform: rotate(180deg);
}

.calc-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 280px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid var(--primary, #2563eb);
    border-top: none;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    z-index: 100;
}

.calc-dropdown-menu.is-open {
    display: block;
}

.calc-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid var(--border, #f1f5f9);
}

.calc-dropdown-item:last-child {
    border-bottom: none;
}

.calc-dropdown-item:hover {
    background: #f8fafc;
}

.calc-dropdown-item input[type="checkbox"] {
    display: none;
}

.calc-item-check {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border, #cbd5e1);
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.15s;
}

.calc-dropdown-item input:checked + .calc-item-check {
    background: var(--primary, #2563eb);
    border-color: var(--primary, #2563eb);
}

.calc-dropdown-item input:checked + .calc-item-check::after {
    content: '';
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-top: -2px;
}

.calc-item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.calc-item-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark, #1e293b);
    line-height: 1.3;
}

.calc-item-price {
    font-size: 12px;
    color: var(--text-light, #64748b);
}

.calc-selected-list {
    min-height: 60px;
    min-width: 0;
    overflow-x: hidden; 
}

.calc-empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px;
    color: var(--text-light, #94a3b8);
    font-size: 13px;
    background: var(--bg-body, #f8fafc);
    border: 1px dashed var(--border, #e2e8f0);
    border-radius: 3px;
}

.calc-metal-row {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    grid-template-areas:
        "info info"
        "weight result";
    align-items: center;
    column-gap: 14px;
    row-gap: 10px;
    padding: 12px 40px 12px 12px;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 8px;
    margin-bottom: 8px;
    background: #fff;
}

.calc-metal-row:last-child {
    margin-bottom: 0;
}

.calc-row-info {
    grid-area: info;
    min-width: 0;
    margin-bottom: 0;
}

.calc-row-weight {
    grid-area: weight;
    justify-self: start;
    min-width: 0;
}

.calc-row-result {
    grid-area: result;
    justify-self: end;
    align-self: center;
    text-align: right;
    min-width: 0;
}

@media (min-width: 769px) {
    .calc-metal-row {
        grid-template-columns: minmax(0, 1.45fr) auto minmax(0, 1fr);
        grid-template-rows: auto;
        grid-template-areas: "info weight result";
        column-gap: clamp(16px, 2.5vw, 28px);
        row-gap: 0;
        align-items: center;
        padding: 14px 44px 14px 16px;
    }

    .calc-row-weight {
        justify-self: center;
    }

    .calc-row-result {
        justify-self: end;
    }
}

.calc-row-name {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-dark, #1e293b);
    word-break: break-word;
}

.calc-row-price {
    font-size: 12px;
    color: var(--text-light, #64748b);
}

@media (max-width: 768px) {
    .calc-row-info {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: baseline;
        justify-content: flex-start;
        gap: 4px 10px;
        max-width: calc(100% - 32px);
    }

    .calc-row-name {
        flex: 0 1 auto;
        min-width: 0;
        line-height: 1.25;
    }

    .calc-row-price {
        flex: 0 1 auto;
        white-space: nowrap;
        text-align: left;
        font-variant-numeric: tabular-nums;
    }
}

.calc-row-weight {
    display: flex;
    align-items: center;
}

.calc-weight-input-group {
    display: inline-flex;
    align-items: stretch;
    min-height: 42px;
    border: 1px solid var(--border, #cbd5e1);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.calc-weight-input-group:focus-within {
    border-color: var(--primary, #ea580c);
    box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.15);
}

.calc-weight-input-group .calc-weight-input {
    width: 4.5rem;
    min-width: 4rem;
    max-width: 6rem;
    flex: 1 1 auto;
    padding: 8px 10px;
    font-size: 15px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    line-height: 1.25;
    text-align: right;
    border: none;
    border-radius: 0;
    background: transparent;
    box-sizing: border-box;
    -moz-appearance: textfield;
    color: var(--text-dark, #1e293b);
}

.calc-weight-input-group .calc-weight-input::placeholder {
    color: #94a3b8;
    font-weight: 500;
}

.calc-weight-input::-webkit-outer-spin-button,
.calc-weight-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.calc-weight-input-group .calc-weight-input:focus {
    outline: none;
}

.calc-weight-input-group .calc-weight-unit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    padding: 0 12px;
    margin: 0;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border: none;
    border-left: 1px solid var(--border, #e2e8f0);
    border-radius: 0;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--text-main, #475569);
    user-select: none;
}

.calc-row-weight:not(:has(.calc-weight-input-group)) .calc-weight-input {
    width: 90px;
    padding: 8px 10px;
    font-size: 14px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    text-align: right;
    border: 1px solid var(--border, #cbd5e1);
    border-radius: 8px;
    background: #fff;
    box-sizing: border-box;
    -moz-appearance: textfield;
}
.calc-row-weight:not(:has(.calc-weight-input-group)) .calc-weight-unit {
    margin-left: 8px;
    padding: 8px 12px;
    background: #f1f5f9;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #475569;
}

.calc-row-result {
    font-size: 14px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: #16a34a;
    word-break: break-word;
    line-height: 1.3;
}

@media (min-width: 769px) {
    .calc-row-result {
        font-size: 15px;
    }
}

.calc-row-remove {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 3px;
    color: #dc2626;
    font-size: 16px;
    cursor: pointer;
    line-height: 1;
    transition: color 0.15s, background 0.15s, border-color 0.15s;
}

.calc-row-remove:hover {
    background: #fee2e2;
    border-color: #f87171;
    color: #b91c1c;
}

.calc-total-bar {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
    background: #f8fafc;
    border-top: 1px solid var(--border, #e2e8f0);
    margin-top: 20px;
}

.calc-total-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.calc-total-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-light, #64748b);
}

.calc-total-location {
    font-size: 12px;
    color: var(--text-light, #94a3b8);
}
.calc-total-weight {
    font-size: 12px;
    color: var(--text-light, #94a3b8);
    margin-top: 2px;
}

.calc-total-value-wrap {
    background: #fff;
    border: 1px solid #fcd34d;
    border-radius: 3px;
    padding: 12px 16px;
    text-align: center;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
}

.calc-total-value-label {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-light, #94a3b8);
    margin-bottom: 4px;
}

.calc-total-value {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 24px;
    font-weight: 800;
    color: var(--text-dark, #0f172a);
    word-break: break-word;
    text-align: center;
}

#calc-total-min, #calc-total-max {
    font-size: 24px;
    font-weight: 800;
}

@media (max-width: 480px) {
    .calc-total-value,
    #calc-total-min, #calc-total-max {
        font-size: 20px;
    }
}

.calc-total-sep {
    font-size: 18px;
    font-weight: 400;
    color: var(--text-light, #94a3b8);
}

.calc-total-note {
    font-size: 10px;
    color: var(--text-light, #94a3b8);
    line-height: 1.4;
    text-align: center;
}

.calc-total-bar-category .calc-total-category-inner {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
}

.calc-total-bar-category .calc-total-category-weight,
.calc-total-bar-category .calc-total-category-value {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.calc-total-bar-category .calc-total-weight-sum {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark, #0f172a);
}

.calc-total-bar-category .calc-total-category-value .calc-total-value {
    font-size: 20px;
    font-weight: 800;
}

@media (min-width: 480px) {
    .calc-total-bar-category .calc-total-category-inner {
        flex-direction: row;
        align-items: flex-start;
        justify-content: space-between;
        gap: 24px;
    }
    .calc-total-bar-category .calc-total-category-weight,
    .calc-total-bar-category .calc-total-category-value {
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
    }
}

.calc-data-sources {
    margin-top: 12px;
    padding: 14px 0 0;
    border-top: 1px solid var(--border, #e2e8f0);
    font-size: 12px;
    color: var(--text-light, #64748b);
    line-height: 1.4;
    background: #f1f5f9;
    border-radius: 3px;
    padding: 14px;
    margin-top: 16px;
}

.calc-data-sources-trigger {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 3px;
    background: #fff;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.calc-data-sources-trigger:hover {
    border-color: var(--primary, #2563eb);
    background: #f8fafc;
}

.calc-data-sources-trigger:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.calc-data-sources-chevron {
    flex-shrink: 0;
    transition: transform 0.2s;
    color: var(--primary, #2563eb);
}

.calc-data-sources-trigger.is-expanded .calc-data-sources-chevron {
    transform: rotate(180deg);
}

.calc-data-sources-text-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.calc-data-sources-trigger-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark, #1e293b);
}

.calc-data-sources-trigger-hint {
    font-size: 0.8em;
    font-weight: normal;
    opacity: 0.8;
    margin-top: 2px;
    color: inherit;
}

.calc-data-sources-list {
    display: none;
    margin-top: 12px;
}

.calc-sources-accordion-group {
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 6px;
    margin-bottom: 8px;
    overflow: hidden;
}

.calc-sources-accordion-group:last-child {
    margin-bottom: 0;
}

.calc-sources-accordion-header {
    width: 100%;
    display: flex;
    align-items: center;
    padding: 10px 14px;
    background: #fff;
    border: none;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark, #334155);
    cursor: pointer;
    text-align: left;
    transition: background 0.15s;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.calc-sources-accordion-header:hover {
    background: var(--bg-body, #f8fafc);
}

.calc-sources-accordion-header[aria-expanded="true"] {
    background: var(--bg-body, #f8fafc);
}

.calc-sources-accordion-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.calc-sources-accordion-icon {
    flex-shrink: 0;
    transition: transform 0.2s;
}

.calc-sources-accordion-header[aria-expanded="true"] .calc-sources-accordion-icon {
    transform: rotate(180deg);
}

.calc-sources-count {
    font-weight: 500;
    color: var(--text-light, #64748b);
}

.calc-sources-accordion-content {
    padding: 12px;
    background: #fff;
    border-top: 1px solid var(--border, #e2e8f0);
}

.calc-sources-table-wrap {
    overflow-x: auto;
    max-height: 240px;
    overflow-y: auto;
}

.calc-sources-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
}

.calc-sources-table th,
.calc-sources-table td {
    padding: 6px 8px;
    text-align: left;
    border-bottom: 1px solid var(--border, #e2e8f0);
}

.calc-sources-table th {
    font-weight: 600;
    color: var(--text-light, #64748b);
    background: var(--bg-body, #f8fafc);
}

.calc-sources-table td {
    color: var(--text-main, #475569);
}

.calc-sources-table tbody tr:nth-child(odd) {
    background: #fff;
}
.calc-sources-table tbody tr:nth-child(even) {
    background: var(--bg-body, #f8fafc);
}
.calc-sources-table tbody tr:hover {
    background: #f1f5f9;
}

.calc-sources-table th:nth-child(3),
.calc-sources-table td:nth-child(3) {
    background: rgba(16, 185, 129, 0.08) !important;
    font-weight: 600;
}
.calc-sources-table tbody tr:nth-child(even) td:nth-child(3) {
    background: rgba(16, 185, 129, 0.06) !important;
}
.calc-sources-table tbody tr:hover td:nth-child(3) {
    background: rgba(16, 185, 129, 0.12) !important;
}

.calc-sources-table tbody tr.calc-sources-row-new {
    animation: calc-sources-row-reveal 0.6s ease;
}
@keyframes calc-sources-row-reveal {
    0% { background-color: rgba(16, 185, 129, 0.25); }
    100% { background-color: transparent; }
}
.calc-sources-table tbody tr.calc-sources-row-new:nth-child(even) {
    animation: calc-sources-row-reveal-even 0.6s ease;
}
@keyframes calc-sources-row-reveal-even {
    0% { background-color: rgba(16, 185, 129, 0.2); }
    100% { background-color: var(--bg-body, #f8fafc); }
}

.calc-sources-loc {
    font-size: 10px;
    color: var(--text-light, #94a3b8);
}

.calc-sources-more,
.calc-sources-load-more {
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-light, #94a3b8);
}

.calc-sources-load-more {
    display: block;
    padding: 8px 12px;
    background: var(--bg-body, #f8fafc);
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.calc-sources-load-more:hover {
    background: var(--primary, #2563eb);
    border-color: var(--primary, #2563eb);
    color: #fff;
}

.calc-sources-empty {
    margin: 8px 0 0;
    font-size: 12px;
    color: var(--text-light, #94a3b8);
}

@media (max-width: 768px) {
    
    .calc-page-layout.calc-has-items {
        padding-bottom: 140px;
    }

    .calc-page-layout.calc-has-items .calc-cart-block .calc-total-bar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100%;
        z-index: 100;
        border-radius: 0;
        margin: 0;
        padding: 14px 20px;
        padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
        box-shadow: 0 -4px 12px rgba(0,0,0,0.1);
    }

    #scrap-calculator .calc-total-bar {
        position: relative;
        left: auto;
        right: auto;
        bottom: auto;
        width: 100%;
        margin-top: 16px;
        margin-bottom: 0;
        border-radius: 3px;
        box-shadow: inset 0 1px 0 rgba(0,0,0,0.04);
    }
}

@media (max-width: 992px) {
    .calc-cart-col:not(.calc-cart-has-items) {
        display: none;
    }
}

@media (max-width: 550px) {
    .calc-metal-row {
        padding-right: 40px;
        column-gap: 10px;
    }

    .calc-weight-input-group {
        max-width: min(200px, 52vw);
    }

    .calc-row-result {
        font-size: 13px;
    }
    
    #calc-total-min, #calc-total-max {
        font-size: 18px;
    }
    
    .calc-location-block {
        padding: 14px 16px;
    }
    
.calc-location-fields .calc-state-select,
    .calc-location-fields .calc-city-select,
    .calc-city-wrap {
        min-width: 100%;
        max-width: none;
    }
    .calc-location-fields .calc-state-select,
    .calc-location-fields .calc-city-select {
        min-height: 48px;
    }
    
    .calc-accordion-content .calc-catalog-tiles {
        grid-template-columns: 1fr;
    }
}

.exchange-table-wrapper {
    overflow-x: auto;
    margin: 0 -5px;
}

.history-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.exchange-comparison-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.exchange-comparison-table th {
    text-align: left;
    padding: 12px 16px;
    background: var(--bg-body, #f8fafc);
    font-weight: 600;
    color: var(--text-dark, #1e293b);
    border-bottom: 2px solid var(--border, #e2e8f0);
}

.exchange-comparison-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border, #e2e8f0);
    vertical-align: middle;
}

.exchange-comparison-table tr:hover {
    background: rgba(37, 99, 235, 0.03);
}

.exchange-metal-link {
    color: var(--primary, #2563eb);
    text-decoration: none;
    font-weight: 600;
}

.exchange-metal-link:hover {
    text-decoration: underline;
}

.exchange-price {
    font-weight: 600;
    color: var(--text-dark, #1e293b);
}

.exchange-source {
    display: block;
    font-size: 11px;
    font-weight: 400;
    color: var(--text-light, #94a3b8);
    margin-top: 2px;
}

.yard-avg-price {
    font-weight: 600;
    color: var(--primary, #2563eb);
}

.exchange-note {
    margin-top: 16px;
    padding: 14px 18px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 3px;
    font-size: 13px;
    color: #92400e;
}

.value-table .value-cell {
    text-align: right;
    padding-right: 20px;
}

.value-cell {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.value-cell-top {
    white-space: nowrap;
}

.grade-quality-note-link {
    display: inline-block;
    font-size: 11px;
    font-weight: 400;
    color: var(--text-light, #64748b);
    cursor: help;
    white-space: nowrap;
    text-align: right;
    line-height: 1.3;
}

.grade-quality-note-link:hover,
.grade-quality-note-link:focus {
    color: var(--accent, #b45309);
}

.value-percent {
    font-size: 18px;
    font-weight: 700;
}

.value-status {
    font-size: 13px;
    font-weight: 600;
}

.value-separator {
    margin: 0 6px;
    color: var(--text-light, #94a3b8);
}

.value-high .value-percent,
.value-high .value-status {
    color: #16a34a;
}

.value-medium .value-percent,
.value-medium .value-status {
    color: #d97706;
}

.value-low .value-percent,
.value-low .value-status {
    color: #64748b;
}

.value-high .value-percent {
    color: #16a34a;
}

.value-medium .value-percent {
    color: #d97706;
}

.value-low .value-percent {
    color: #64748b;
}

/* Value breakdown list — grade value factors (below Grade Value table) */
.value-breakdown-list {
    margin-top: 24px;
    padding: 24px 28px;
    background: #ffffff;
    border: 1px solid var(--border, #e2e8f0);
    border-left: 4px solid var(--accent, #b45309);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.value-breakdown-list h4 {
    margin: 0 0 20px 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--primary, #0f172a);
    letter-spacing: -0.02em;
}

.value-breakdown-list ul {
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-main, #334155);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.value-breakdown-list li {
    margin: 0;
    padding: 16px 20px 16px 48px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    position: relative;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.value-breakdown-list li:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.value-breakdown-list li::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 20px;
    width: 8px;
    height: 8px;
    background: var(--accent, #b45309);
    border-radius: 50%;
    opacity: 0.9;
}

.value-breakdown-list li strong {
    display: block;
    color: var(--primary, #0f172a);
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}

/* Pro tip inside list (fallback when not split) */
.value-breakdown-list .exchange-note.value-tip {
    margin-top: 20px;
    margin-bottom: 0;
}

/* Pro tip — separate block below the list */
.value-breakdown-tip-wrap {
    margin-top: 20px;
}

.value-breakdown-tip-wrap .exchange-note.value-tip {
    margin: 0;
    padding: 18px 22px;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 1px solid #bbf7d0;
    border-left: 4px solid #16a34a;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.65;
    color: #166534;
    box-shadow: 0 1px 3px rgba(22, 163, 74, 0.08);
}

.value-breakdown-tip-wrap .exchange-note.value-tip strong {
    color: #15803d;
    font-weight: 700;
}

/* Standalone value-tip (fallback) */
.exchange-note.value-tip {
    margin-top: 20px;
    padding: 18px 22px;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 1px solid #bbf7d0;
    border-left: 4px solid #16a34a;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.6;
    color: #166534;
    box-shadow: 0 1px 3px rgba(22, 163, 74, 0.08);
}

.exchange-note.value-tip strong {
    color: #15803d;
    font-weight: 700;
}

.chart-metal-select {
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 3px;
    background: var(--white);
    cursor: pointer;
    min-width: 180px;
}

.chart-metal-select:focus {
    outline: none;
    border-color: var(--primary, #2563eb);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

@media (max-width: 768px) {
    .calculator-wrapper {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .calc-result {
        order: -1;
    }
    
    .exchange-comparison-table th,
    .exchange-comparison-table td {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .value-breakdown-list {
        padding: 20px 22px;
        margin-top: 18px;
    }
    
    .value-breakdown-list ul {
        gap: 14px;
    }
    
    .value-breakdown-list li {
        padding: 14px 16px 14px 40px;
    }
    
    .value-breakdown-list li::before {
        left: 16px;
        top: 18px;
        width: 6px;
        height: 6px;
    }
    
    .mobile-scroll-hint {
        display: block !important;
    }
    
    #price-chart-section .chart-controls {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .chart-metal-select {
        width: 100%;
        order: -1;
    }
}

.yard-report-link-cat {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s;
}

.yard-report-link-cat:hover {
    color: #64748b;
}

.yard-report-link-cat.yard-report-share {
    color: #16a34a;
}

.yard-report-link-cat.yard-report-share:hover {
    color: #15803d;
}

.yard-report-link-cat.yard-report-share svg {
    stroke: #16a34a;
}

.sm-modal-wide {
    max-width: 560px;
}

.metals-rows-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 280px;
    overflow-y: auto;
    padding: 4px;
}

/* Price report modal: avoid clipping native select menus (scroll the whole modal instead). */
#cat-report-modal .metals-rows-container {
    max-height: none;
    overflow: visible;
}

.metal-row {
    display: grid;
    grid-template-columns: 1fr 90px 100px 32px;
    gap: 8px;
    align-items: center;
    padding: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 3px;
    transition: all 0.2s;
}

.metal-row:hover {
    border-color: #cbd5e1;
}

.metal-row select,
.metal-row input {
    padding: 8px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 3px;
    font-size: 13px;
    background: white;
}

.metal-row select:focus,
.metal-row input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.metal-row select.metal-select {
    min-width: 0;
}

.metal-row select option:disabled {
    color: #94a3b8;
    background: #f1f5f9;
}

.metal-row .price-input-wrap {
    position: relative;
}

.metal-row .price-input-wrap::before {
    content: '$';
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 13px;
}

.metal-row .price-input {
    padding-left: 22px;
    width: 100%;
}

.metal-row .unit-select {
    font-size: 12px;
}

.btn-remove-row {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.2s;
}

.btn-remove-row:hover {
    background: #fee2e2;
    color: #dc2626;
}

.btn-add-metal {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    margin-top: 8px;
    border: 1px dashed #cbd5e1;
    background: transparent;
    color: #64748b;
    font-size: 13px;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-add-metal:hover {
    border-color: #3b82f6;
    color: #3b82f6;
    background: #eff6ff;
}

.btn-add-metal:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (max-width: 540px) {
    .metal-row {
        grid-template-columns: 1fr 32px;
        gap: 8px;
    }
    
    .metal-row select.metal-select {
        grid-column: 1;
    }
    
    .metal-row .btn-remove-row {
        grid-column: 2;
        grid-row: 1;
    }
    
    .metal-row .price-input-wrap,
    .metal-row .unit-select {
        grid-column: 1 / -1;
    }
}

#cat-report-modal .icon-share { display: none; }
#cat-report-modal .icon-report { display: block; }

#cat-report-modal.share-mode .icon-share { display: block; }
#cat-report-modal.share-mode .icon-report { display: none; }

#cat-report-modal.share-mode .sm-modal-header svg {
    stroke: #16a34a;
}

#cat-report-modal.share-mode .btn-submit-report {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
}

#cat-report-modal.share-mode .btn-submit-report:hover {
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
}

#cat-report-modal.share-mode .metal-row {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

#cat-report-modal.share-mode .btn-add-metal:hover {
    border-color: #16a34a;
    color: #16a34a;
    background: #dcfce7;
}

#cat-report-modal.share-mode .metal-row select:focus,
#cat-report-modal.share-mode .metal-row input:focus {
    border-color: #16a34a;
    box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.1);
}

.cat-report-date-hint {
    margin: 6px 0 0;
    font-size: 12px;
    color: #64748b;
    line-height: 1.4;
}

#cat-report-modal .cat-report-date-us {
    max-width: 200px;
}

.sm-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.sm-modal-overlay.open {
    display: flex;
}

.sm-modal {
    background: #fff;
    border-radius: 3px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.25);
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.25s ease;
}

/* No transform: native <select> dropdown breaks inside transformed ancestors (Chrome/Edge on Windows). */
@keyframes modalSlideIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.sm-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: none;
    background: #f1f5f9;
    border-radius: 3px;
    font-size: 20px;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
    line-height: 1;
}

.sm-modal-close:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.sm-modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px 24px 0;
}

.sm-modal-header svg {
    stroke: var(--primary, #ea580c);
}

.sm-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
}

.sm-modal-body {
    padding: 20px 24px 24px;
}

.modal-company-label {
    background: #f8fafc;
    padding: 10px 14px;
    border-radius: 3px;
    font-size: 14px;
    color: #475569;
    margin: 0 0 16px;
}

.modal-company-label strong {
    color: #0f172a;
}

.modal-description {
    font-size: 14px;
    color: #64748b;
    line-height: 1.6;
    margin: 0 0 20px;
}

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

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 6px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 3px;
    font-size: 14px;
    color: #0f172a;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary, #ea580c);
    box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.input-with-prefix {
    position: relative;
}

.input-prefix {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-weight: 600;
}

.input-with-prefix input {
    padding-left: 30px;
}

.btn-submit-report {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary, #ea580c) 0%, #c2410c 100%);
    border: none;
    border-radius: 3px;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-submit-report:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(234, 88, 12, 0.3);
}

.btn-submit-report:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.report-success {
    background: #ecfdf5;
    border: 1px solid #86efac;
    color: #166534;
    padding: 12px 16px;
    border-radius: 3px;
    font-size: 14px;
    margin-bottom: 16px;
    text-align: center;
}

.report-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    padding: 12px 16px;
    border-radius: 3px;
    font-size: 14px;
    margin-bottom: 16px;
    text-align: center;
}

@media (max-width: 520px) {
    .sm-modal {
        max-height: 100vh;
        border-radius: 3px 16px 0 0;
        margin-top: auto;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

.cat-yard-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(3px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    overflow: hidden;
    touch-action: none;
}

.cat-yard-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cat-yard-modal {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    max-width: min(380px, calc(100vw - 32px));
    width: calc(100vw - 32px);
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    transform: translateY(20px);
    transition: transform 0.3s ease;
    box-sizing: border-box;
}

.cat-yard-modal-overlay.active .cat-yard-modal {
    transform: translateY(0);
}

.cat-yard-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    padding: 4px;
    transition: color 0.2s;
}

.cat-yard-modal-close:hover {
    color: #475569;
}

.cat-yard-modal-name {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 20px 0;
    padding-right: 30px;
}

.cat-yard-modal-info {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.cat-yard-modal-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 14px;
    color: #475569;
}

.cat-yard-modal-row svg {
    flex-shrink: 0;
    color: #64748b;
}

.cat-modal-phone-link {
    color: var(--primary, #ea580c);
    font-weight: 600;
    text-decoration: none;
}

.cat-modal-phone-link:hover {
    text-decoration: underline;
}
.cat-working-hours-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; margin-top: 8px; font-size: 13px; color: var(--text-light, #64748b); }
.cat-working-hours-grid .wh-row { display: flex; justify-content: space-between; gap: 12px; }
.cat-working-hours-grid .wh-day { font-weight: 500; color: var(--text-main, #475569); }

.price-history-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.price-history-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    touch-action: none;
}

.price-history-content {
    position: relative;
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: min(600px, calc(100vw - 20px));
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.2s ease;
    box-sizing: border-box;
    margin: 0 10px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
    to { transform: translateY(0); }
}

.price-history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
}

.price-history-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
}

.price-history-close {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: #64748b;
    border-radius: 50%;
    transition: background 0.15s;
}

.price-history-close:hover {
    background: #f1f5f9;
}

.price-history-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.price-history-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    gap: 12px;
    color: #64748b;
}

.price-history-loading .spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

#price-history-chart-container {
    height: 250px;
}

#price-history-chart-container canvas {
    width: 100% !important;
    height: 100% !important;
}

.price-history-error {
    text-align: center;
    padding: 40px;
    color: #dc2626;
}

@media (max-width: 767px) {
    .price-history-content {
        max-width: calc(100vw - 16px);
        max-height: 80vh;
        margin: 0 8px;
        border-radius: 12px;
    }
    
    .price-history-header {
        padding: 12px 14px;
    }
    
    .price-history-header h3 {
        font-size: 14px;
        line-height: 1.3;
        padding-right: 24px;
    }
    
    .price-history-close {
        padding: 4px;
    }
    
    .price-history-body {
        padding: 10px 12px 16px;
    }
    
    #price-history-chart-container {
        height: 160px;
        margin: 0 -4px;
    }
}

@media (min-width: 768px) {
    .price-history-content {
        border-radius: 12px;
        max-height: 70vh;
    }
    
    #price-history-chart-container {
        height: 300px;
    }
}

.spm-modal-overlay { 
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
    background: rgba(15, 23, 42, 0.6); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
    z-index: 9999; display: flex; align-items: center; justify-content: center; 
    opacity: 0; visibility: hidden; transition: all 0.3s ease; 
}
.spm-modal-overlay.active { opacity: 1; visibility: visible; }
.spm-modal-card { 
    background: #fff; width: 90%; max-width: 400px; border-radius: 3px; padding: 30px; 
    position: relative; box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1); 
    transform: translateY(20px); transition: all 0.3s ease; border: 1px solid var(--border); 
}
.spm-modal-overlay.active .spm-modal-card { transform: translateY(0); }
.spm-modal-close { 
    position: absolute; top: 15px; right: 15px; background: #f1f5f9; border: none; 
    width: 30px; height: 30px; border-radius: 50%; cursor: pointer; font-size: 18px; 
    color: var(--text-light); display: flex; align-items: center; justify-content: center; transition: 0.2s; 
}
.spm-modal-close:hover { background: #fee2e2; color: var(--danger); }
.spm-modal-card h3 { margin: 0 0 25px 0; color: var(--text-dark); font-size: 20px; line-height: 1.3; padding-right: 20px;}
.spm-modal-info-row { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 20px; font-size: 15px; color: var(--text-main); line-height: 1.4; }
.spm-modal-info-row svg { color: var(--accent); flex-shrink: 0; margin-top: 2px; }
.spm-working-hours-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; margin-top: 8px; font-size: 13px; color: var(--text-light, #64748b); }
.spm-working-hours-grid .wh-row { display: flex; justify-content: space-between; gap: 12px; }
.spm-working-hours-grid .wh-day { font-weight: 500; color: var(--text-main, #475569); }

.yards-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

@keyframes yardCardFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.yard-card.yard-appearing {
    animation: yardCardFadeIn 0.4s ease forwards;
}

.yard-card {
    background: #fff;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 3px;
    padding: 20px;
}

.yard-card {
    position: relative;
}

.yard-card.premium {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 3px;
    margin: 0;
    padding-top: 12px;
}

.yard-card .badge-double-corner {
    position: absolute;
    top: 0;
    right: 0;
    display: inline-flex;
    align-items: stretch;
    z-index: 1;
    border: 1px solid #e2e8f0;
    border-top: none;
    border-right: none;
    border-radius: 0 3px 0 3px;
    overflow: hidden;
}

.yard-card .badge-date-part {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 11px;
    font-weight: 500;
    border-radius: 0;
    letter-spacing: 0.2px;
    border-right: 1px solid #e2e8f0;
}

.yard-card .badge-link-part {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    background: #ecfdf5;
    color: #16a34a;
    font-size: 11px;
    font-weight: 500;
    border-radius: 0;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.yard-card .badge-link-part:hover {
    background: #dcfce7;
    color: #15803d;
}

.yard-card .badge-link-part svg {
    stroke: #16a34a;
}

.yard-card .badge-link-part:hover svg {
    stroke: #15803d;
}

.yard-card .badge-date-part.verified {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
}

.yard-card .badge-date-part.verified svg {
    stroke: #b45309;
}

.yard-card .badge-date-corner {
    position: absolute;
    top: 0;
    right: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 11px;
    font-weight: 500;
    border-radius: 0 3px 0 3px;
    letter-spacing: 0.2px;
    z-index: 1;
    border-left: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

.yard-card .badge-date-corner.verified {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    border-left: 1px solid #fcd34d;
    border-bottom: 1px solid #fcd34d;
}

.yard-card .badge-date-corner.verified svg {
    color: #b45309;
}

.verified-icon-wrapper {
    position: relative;
    display: inline-flex;
    cursor: help;
}

.verified-icon-wrapper::after {
    content: attr(title);
    position: absolute;
    bottom: calc(100% + 8px);
    right: -10px;
    background: #1e293b;
    color: #fff;
    padding: 8px 12px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.verified-icon-wrapper::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    right: 4px;
    border: 6px solid transparent;
    border-top-color: #1e293b;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    z-index: 100;
}

.verified-icon-wrapper:hover::after,
.verified-icon-wrapper:hover::before,
.verified-icon-wrapper:focus::after,
.verified-icon-wrapper:focus::before,
.verified-icon-wrapper.tooltip-active::after,
.verified-icon-wrapper.tooltip-active::before {
    opacity: 1;
    visibility: visible;
}

.yard-card .badge-date-part.status-fresh,
.yard-card .badge-date-part.status-warn,
.yard-card .badge-date-part.status-old {
    background: #f1f5f9;
    color: #64748b;
}

.yard-card .badge-date-corner.status-fresh,
.yard-card .badge-date-corner.status-warn,
.yard-card .badge-date-corner.status-old {
    background: #f1f5f9;
    color: #64748b;
    border-color: #e2e8f0;
}

.yard-card .badge-date-corner.status-fresh svg,
.yard-card .badge-date-corner.status-warn svg,
.yard-card .badge-date-corner.status-old svg {
    stroke: #94a3b8;
}

.yard-card .badge-date-corner.verified.status-fresh,
.yard-card .badge-date-corner.verified.status-warn,
.yard-card .badge-date-corner.verified.status-old {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    border-color: #fcd34d;
}

.yard-card.premium .btn-call-premium {
    background: linear-gradient(180deg, #22c55e 0%, #16a34a 100%);
    color: #fff;
    padding: 12px 20px;
    border-radius: 3px;
    font-size: 15px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    box-shadow: 0 2px 4px rgba(22, 163, 74, 0.3), inset 0 1px 0 rgba(255,255,255,0.2);
    transition: all 0.2s ease;
    border: none;
}

.yard-card.premium .btn-call-premium:hover {
    background: linear-gradient(180deg, #16a34a 0%, #15803d 100%);
    box-shadow: 0 4px 8px rgba(22, 163, 74, 0.4), inset 0 1px 0 rgba(255,255,255,0.2);
    transform: translateY(-1px);
}

.yard-card.premium .btn-call-premium:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(22, 163, 74, 0.3), inset 0 1px 2px rgba(0,0,0,0.1);
}

.yard-card.premium .yard-price {
    color: #92400e;
}

.yard-card.premium .premium-offer-banner {
    background: #fff;
    border: 1px solid #d97706;
    border-radius: 3px;
    color: #92400e;
}

.yard-update-time {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    font-weight: 500;
}

.yard-update-time.status-fresh {
    color: #16a34a;
}

.yard-update-time.status-fresh svg {
    stroke: #16a34a;
}

.yard-update-time.status-warn {
    color: #d97706;
}

.yard-update-time.status-warn svg {
    stroke: #d97706;
}

.yard-update-time.status-old {
    color: #64748b;
}

.yard-update-time.status-old svg {
    stroke: #94a3b8;
}

.yard-meta-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
}

.yard-original-name {
    display: flex;
    align-items: baseline;
    gap: 6px;
    font-size: 13px;
    color: var(--text-light, #64748b);
    margin-top: 6px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px dashed #e2e8f0;
}

.yard-original-name em {
    color: var(--text-main, #475569);
    font-style: normal;
    font-weight: 500;
}

.yard-location-block {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    align-self: flex-start;
}

.yard-address {
    display: inline-flex;
    align-items: flex-start;
    gap: 6px;
    color: var(--text-main, #475569);
    font-size: 13px;
    line-height: 1.5;
}

.yard-address svg {
    stroke: var(--primary, #ea580c);
    flex-shrink: 0;
    margin-top: 2px;
}

.yard-location-block .yard-directions-link {
    white-space: nowrap;
}

.yard-location-block .yard-directions-link::before {
    content: "·";
    margin-right: 6px;
    color: var(--text-light, #94a3b8);
    font-weight: 400;
}

@media (max-width: 480px) {
    .yard-location-block {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .yard-location-block .yard-directions-link::before {
        content: none;
        margin-right: 0;
    }
}

.yard-directions-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--primary, #ea580c);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s, opacity 0.2s;
}

.yard-directions-link:hover {
    color: var(--accent, #ea580c);
    text-decoration: underline;
}

.yard-directions-link svg {
    stroke: currentColor;
    opacity: 0.8;
}

.yard-directions-link--modal {
    font-weight: 500;
}

.btn-yard-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    background: #fff;
    border: 2px solid var(--primary, #ea580c);
    border-radius: 3px;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary, #ea580c);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-yard-cta svg {
    stroke: var(--primary, #ea580c);
}

.btn-yard-cta:hover {
    background: var(--primary, #ea580c);
    color: #fff;
}

.btn-yard-cta:hover svg {
    stroke: #fff;
}

a.btn-yard-cta--tel {
    text-decoration: none;
}

.yard-report-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s;
}

.yard-report-link:hover {
    color: #64748b;
}

.yard-report-link.yard-report-share {
    color: #16a34a;
}

.yard-report-link.yard-report-share:hover {
    color: #15803d;
}

.yard-report-link.yard-report-share svg {
    stroke: #16a34a;
}

#report-modal .icon-share { display: none; }
#report-modal .icon-report { display: block; }

#report-modal.share-mode .icon-share { display: block; }
#report-modal.share-mode .icon-report { display: none; }

#report-modal.share-mode .sm-modal-header svg {
    stroke: #16a34a;
}

#report-modal.share-mode .btn-submit-report {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
}

#report-modal.share-mode .btn-submit-report:hover {
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
}

.update-note {
    color: var(--text-light, #64748b);
    font-weight: 500;
    font-size: 12px;
    margin-left: 4px;
}

.yard-status-live {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-main, #475569);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #16a34a;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.yards-intro-text {
    padding: 12px 20px;
    margin: 0;
    font-size: 14px;
    color: var(--text-light, #64748b);
    line-height: 1.5;
    border-bottom: 1px solid var(--border, #e2e8f0);
}

.yards-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 20px;
    margin-top: 20px;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 3px;
    flex-wrap: wrap;
}

.b2b-link-minimal {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #78716c;
    text-decoration: none;
    transition: all 0.2s;
    padding: 6px 12px;
    background: rgba(245, 158, 11, 0.08);
    border-radius: 3px;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.b2b-link-minimal span {
    font-weight: 700;
    color: #b45309;
}

.b2b-link-minimal:hover {
    color: #57534e;
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.4);
    text-decoration: none;
}

.b2b-link-minimal:hover span {
    color: #92400e;
}

.b2b-link-minimal .b2b-arrow {
    stroke: #b45309;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.b2b-link-minimal:hover .b2b-arrow {
    transform: translateX(4px);
    stroke: #92400e;
}

.sort-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-light, #64748b);
}

.sort-dropdown {
    position: relative;
}

.sort-dropdown-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #fff;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 3px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main, #475569);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.sort-dropdown-btn:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.sort-dropdown.open .sort-dropdown-btn {
    border-color: var(--primary, #ea580c);
    box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.1);
}

.sort-arrow {
    flex-shrink: 0;
    transition: transform 0.2s;
}

.sort-dropdown.open .sort-arrow {
    transform: rotate(180deg);
}

.sort-dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 160px;
    background: #fff;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 3px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    z-index: 100;
    display: none;
    padding: 8px;
}

.sort-dropdown.open .sort-dropdown-menu {
    display: block;
    animation: dropdownFadeIn 0.15s ease;
}

@keyframes dropdownFadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.sort-menu-group {
    margin-bottom: 6px;
}

.sort-menu-group:last-child {
    margin-bottom: 0;
}

.sort-group-label {
    display: block;
    padding: 6px 10px 4px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-light, #94a3b8);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sort-option {
    display: block;
    width: 100%;
    padding: 10px 12px;
    background: none;
    border: none;
    border-radius: 3px;
    font-size: 14px;
    color: var(--text-main, #475569);
    cursor: pointer;
    text-align: left;
    transition: all 0.15s;
}

.sort-option:hover {
    background: #f1f5f9;
}

.sort-option.active {
    background: rgba(234, 88, 12, 0.08);
    color: var(--primary, #ea580c);
    font-weight: 600;
}

.sort-option:last-child {
    border-radius: 0 0 3px 3px;
}

.sort-option:hover {
    background: #f1f5f9;
}

.sort-option.active {
    background: #f0f9ff;
    color: var(--primary, #ea580c);
    font-weight: 600;
}

.sort-option.active svg {
    stroke: var(--primary, #ea580c);
}

.sort-divider {
    height: 1px;
    background: var(--border, #e2e8f0);
    margin: 4px 0;
}

@media (max-width: 768px) {
    .yards-toolbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .sort-controls {
        width: 100%;
        flex-wrap: wrap;
    }
    
    .sort-dropdown-btn {
        padding: 10px 14px;
        font-size: 13px;
    }
    
    .sort-dropdown-menu {
        min-width: 150px;
        right: 0;
        left: auto;
    }
    
    
    .yard-card {
        padding-top: 38px;
    }
    
    .yard-card .badge-date-corner,
    .yard-card .badge-date-part,
    .yard-card .badge-link-part {
        font-size: 10px;
        padding: 5px 8px;
        gap: 3px;
    }
    
    .yard-card .badge-date-corner svg,
    .yard-card .badge-date-part svg,
    .yard-card .badge-link-part svg {
        width: 9px;
        height: 9px;
    }
    
    
    .verified-icon-wrapper {
        -webkit-tap-highlight-color: transparent;
    }
    
    .verified-icon-wrapper::after {
        right: -20px;
        white-space: normal;
        max-width: 200px;
        text-align: center;
    }
}

.spm-sparkline-wrapper { margin-top: 15px; }
.spm-sparkline-container { display: flex; align-items: flex-end; justify-content: space-between; height: 40px; gap: 2px; border-bottom: 1px solid #e2e8f0; }
.spm-bar { flex: 1; background-color: #cbd5e1; border-radius: 2px 2px 0 0; transition: background-color 0.2s ease, opacity 0.2s; min-width: 2px; }
.spm-bar:hover { background-color: #94a3b8; cursor: crosshair; }
.spm-bar.is-min { background-color: #fca5a5; }
.spm-bar.is-max { background-color: #86efac; }
.spm-bar.is-current { background-color: var(--primary, #ea580c); }
.spm-sparkline-labels { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-light, #64748b); margin-top: 6px; }

.card-sparkline-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: var(--bg-light, #f8fafc);
    border-top: 1px solid var(--border, #e2e8f0);
    gap: 15px;
}
.sparkline-trend {
    display: flex;
    align-items: center;
    gap: 8px;
}
.trend-label {
    font-size: 13px;
    color: var(--text-light, #64748b);
}
.trend-value {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    font-weight: 600;
}
.trend-value.trend-up { color: var(--green, #10b981); }
.trend-value.trend-down { color: var(--danger, #ef4444); }
.trend-value.trend-flat { color: var(--text-light, #94a3b8); }
.sparkline-chart { flex-shrink: 0; }

.cta-bottom-link.cta-enhanced {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--primary, #ea580c) 0%, #c2410c 100%);
    border: none;
    border-radius: 0 0 12px 12px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    letter-spacing: 0.3px;
    transition: all 0.25s ease;
    box-shadow: inset 0 -2px 0 rgba(0,0,0,0.15);
}
.cta-bottom-link.cta-enhanced:hover {
    background: linear-gradient(135deg, #c2410c 0%, #9a3412 100%);
    box-shadow: inset 0 -2px 0 rgba(0,0,0,0.2), 0 4px 12px rgba(234, 88, 12, 0.3);
}
.cta-bottom-link.cta-enhanced:active {
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}
.cta-bottom-link.cta-enhanced svg {
    transition: transform 0.2s ease;
}
.cta-bottom-link.cta-enhanced:hover svg {
    transform: translateX(4px);
}

.sm-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.sm-modal-overlay.open {
    display: flex;
}

.sm-modal {
    background: #fff;
    border-radius: 3px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.25);
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.25s ease;
}

/* No transform: native <select> dropdown breaks inside transformed ancestors (Chrome/Edge on Windows). */
@keyframes modalSlideIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.sm-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: none;
    background: #f1f5f9;
    border-radius: 3px;
    font-size: 20px;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
    line-height: 1;
}

.sm-modal-close:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.sm-modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px 24px 0;
}

.sm-modal-header svg {
    stroke: var(--primary, #ea580c);
}

.sm-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
}

.sm-modal-body {
    padding: 20px 24px 24px;
}

.modal-company-label {
    background: #f8fafc;
    padding: 10px 14px;
    border-radius: 3px;
    font-size: 14px;
    color: #475569;
    margin: 0 0 16px;
}

.modal-company-label strong {
    color: #0f172a;
}

.modal-description {
    font-size: 14px;
    color: #64748b;
    line-height: 1.6;
    margin: 0 0 20px;
}

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

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 6px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 3px;
    font-size: 14px;
    color: #0f172a;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary, #ea580c);
    box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.input-with-prefix {
    position: relative;
}

.input-prefix {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-weight: 600;
}

.input-with-prefix input {
    padding-left: 30px;
}

.btn-submit-report {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary, #ea580c) 0%, #c2410c 100%);
    border: none;
    border-radius: 3px;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-submit-report:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(234, 88, 12, 0.3);
}

.btn-submit-report:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.report-success {
    background: #ecfdf5;
    border: 1px solid #86efac;
    color: #166534;
    padding: 12px 16px;
    border-radius: 3px;
    font-size: 14px;
    margin-bottom: 16px;
    text-align: center;
}

.report-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    padding: 12px 16px;
    border-radius: 3px;
    font-size: 14px;
    margin-bottom: 16px;
    text-align: center;
}

.metal-readonly-field {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 3px;
    font-size: 15px;
    font-weight: 600;
    color: #0f172a;
}

.metal-readonly-field svg {
    stroke: var(--primary, #ea580c);
    flex-shrink: 0;
}

@media (max-width: 520px) {
    .sm-modal {
        max-height: 100vh;
        border-radius: 3px 16px 0 0;
        margin-top: auto;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}