.supply-page {
    --supply-blue: #1d4ed8;
    --supply-blue-soft: #dbeafe;
    --supply-cyan: #0891b2;
    --supply-green: #059669;
    --supply-orange: #ea580c;
    --supply-slate: #475569;
}

.supply-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr);
    gap: 2rem;
    margin: 2rem 0 3rem;
    padding: 2.25rem;
    overflow: hidden;
    border: 1px solid #bfdbfe;
    border-radius: 1.5rem;
    background:
        radial-gradient(circle at 86% 18%, rgba(14, 165, 233, 0.16), transparent 28%),
        linear-gradient(135deg, #eff6ff 0%, #f8fafc 55%, #ecfeff 100%);
}

.supply-hero::after {
    content: '';
    position: absolute;
    right: -4rem;
    bottom: -6rem;
    width: 15rem;
    height: 15rem;
    border: 1px solid rgba(29, 78, 216, 0.12);
    border-radius: 50%;
    box-shadow: 0 0 0 2rem rgba(29, 78, 216, 0.04), 0 0 0 4rem rgba(8, 145, 178, 0.025);
    pointer-events: none;
}

.supply-hero-copy,
.supply-hero-actions {
    position: relative;
    z-index: 1;
}

.supply-eyebrow,
.supply-section-kicker {
    margin: 0 0 0.55rem;
    color: var(--supply-blue);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.supply-hero h1 {
    margin: 0;
    color: #0f172a;
    font-size: clamp(2rem, 4vw, 3.3rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.035em;
}

.supply-lead {
    max-width: 58rem;
    margin: 1.15rem 0 0;
    color: #475569;
    font-size: 1.05rem;
    line-height: 1.85;
}

.supply-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem 1.4rem;
    margin-top: 1.25rem;
    color: #475569;
    font-size: 0.9rem;
}

.supply-meta-line i {
    margin-right: 0.35rem;
    color: var(--supply-blue);
}

.supply-hero-actions {
    align-self: end;
    padding: 1.1rem;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(8px);
}

.supply-hero-actions p {
    margin: 0.75rem 0 0;
    color: #64748b;
    font-size: 0.82rem;
    line-height: 1.65;
}

.supply-secondary-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--supply-blue);
    font-weight: 700;
    text-decoration: none;
}

.supply-secondary-link:hover {
    color: #1e40af;
}

.supply-section {
    margin-bottom: 4rem;
    scroll-margin-top: 5rem;
}

.supply-section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1.25rem;
}

.supply-section-heading .section-title {
    margin: 0;
}

.supply-section-heading > p {
    max-width: 38rem;
    margin: 0;
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.7;
    text-align: right;
}

.supply-metric-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid #dbe3ee;
    border-radius: 1.25rem;
    background: #fff;
}

.supply-metric {
    position: relative;
    min-height: 9.2rem;
    padding: 1.3rem 1.1rem;
    border-left: 1px solid #e2e8f0;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.supply-metric:first-child {
    border-left: 0;
}

.supply-metric::before {
    content: '';
    position: absolute;
    top: 1.6rem;
    right: 1.1rem;
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: var(--metric-color, var(--supply-blue));
}

.supply-metric-label {
    display: block;
    margin-top: 0;
    padding-right: 0.9rem;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.5;
}

.supply-metric-value {
    display: block;
    margin-top: 0.55rem;
    color: var(--metric-color, var(--supply-blue));
    font-size: clamp(1.5rem, 2.2vw, 2rem);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.03em;
}

.supply-metric-note {
    display: block;
    margin-top: 0.5rem;
    color: #64748b;
    font-size: 0.75rem;
    line-height: 1.5;
}

.supply-loading-block {
    grid-column: 1 / -1;
    padding: 2.5rem;
    color: #64748b;
    text-align: center;
}

.supply-snapshot-note {
    margin-top: 0.9rem;
    color: #64748b;
    font-size: 0.84rem;
    line-height: 1.7;
}

.supply-scope-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin: -1rem 0 3rem;
    padding: 1rem 1.2rem;
    border: 1px solid #bfdbfe;
    border-radius: 1rem;
    background: #f8fbff;
}

.supply-scope-copy h2 {
    margin: 0.15rem 0 0;
    color: #0f172a;
    font-size: 1.05rem;
    font-weight: 750;
}

.supply-scope-copy > p:last-child {
    margin-top: 0.3rem;
    color: #64748b;
    font-size: 0.84rem;
    line-height: 1.6;
}

.supply-heading-with-control {
    align-items: center;
}

.certificate-switch,
.status-switch,
.composition-switch {
    display: inline-flex;
    gap: 0.3rem;
    padding: 0.3rem;
    border: 1px solid #dbe3ee;
    border-radius: 999px;
    background: #f8fafc;
}

.certificate-switch-button,
.status-switch-button,
.composition-switch-button {
    min-height: 2.25rem;
    padding: 0.45rem 0.95rem;
    border: 0;
    border-radius: 999px;
    color: #475569;
    background: transparent;
    font-family: inherit;
    font-size: 0.86rem;
    font-weight: 650;
    cursor: pointer;
    transition: color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
}

.certificate-switch-button:hover,
.status-switch-button:hover,
.composition-switch-button:hover {
    color: var(--supply-blue);
}

.certificate-switch-button.is-active,
.status-switch-button.is-active,
.composition-switch-button.is-active {
    color: #fff;
    background: var(--supply-blue);
    box-shadow: 0 3px 10px rgba(29, 78, 216, 0.2);
}

.certificate-switch-button:focus-visible,
.status-switch-button:focus-visible,
.composition-switch-button:focus-visible,
.batch-year-button:focus-visible {
    outline: 2px solid var(--supply-blue);
    outline-offset: 2px;
}

.supply-chart-card,
.supply-table-card,
.supply-company-panel,
.supply-region-ranking,
.supply-composition-card,
.supply-method-card {
    background: #fff;
}

.supply-chart-card {
    padding: 1rem 1.25rem 1.25rem;
}

.supply-chart,
.supply-region-chart {
    width: 100%;
    height: 440px;
}

.supply-region-chart {
    height: 590px;
}

.supply-chart.is-loading,
.supply-region-chart.is-loading,
.supply-chart.is-error,
.supply-region-chart.is-error {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 260px;
}

.supply-chart.is-error,
.supply-region-chart.is-error {
    height: auto;
}

.supply-chart-error {
    display: grid;
    justify-items: center;
    gap: 0.65rem;
    max-width: 32rem;
    padding: 2rem;
    color: #64748b;
    text-align: center;
}

.supply-chart-error i {
    color: #dc2626;
    font-size: 1.6rem;
}

.supply-chart-insight {
    margin: 0 0.5rem;
    padding: 1rem 1.1rem;
    border-radius: 0.45rem;
    color: #334155;
    background: #eff6ff;
    font-size: 0.92rem;
    line-height: 1.8;
}

.supply-table-card {
    margin-top: 0;
}

.supply-table-section-heading {
    align-items: flex-end;
    margin-top: 3.5rem;
    margin-bottom: 1.25rem;
}

.supply-table-section-heading > div {
    min-width: 0;
}

.supply-table-description {
    margin: 0.7rem 0 0;
    color: #64748b;
    font-size: 0.8rem;
    line-height: 1.6;
}

.supply-table-hint {
    flex: none;
    color: var(--supply-blue);
    font-size: 0.8rem;
    font-weight: 650;
}

.supply-table-scroll,
.supply-company-table-wrap {
    overflow-x: auto;
}

.supply-data-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.supply-data-table th,
.supply-data-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #e5e7eb;
    color: #475569;
    font-size: 0.86rem;
    line-height: 1.55;
    text-align: left;
    vertical-align: middle;
}

.supply-data-table th {
    color: #334155;
    background: #f8fafc;
    font-weight: 700;
    white-space: nowrap;
}

.supply-data-table .numeric {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.supply-data-table tbody tr {
    transition: background-color 0.15s ease;
}

.supply-data-table tbody tr:hover,
.supply-data-table tbody tr.is-selected {
    background: #eff6ff;
}

.batch-year-button {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0;
    border: 0;
    color: var(--supply-blue);
    background: transparent;
    font-family: inherit;
    font-size: inherit;
    font-weight: 750;
    white-space: nowrap;
    cursor: pointer;
}

.batch-year-button i {
    font-size: 0.65rem;
    transition: transform 0.15s ease;
}

.batch-year-button:hover i {
    transform: translateX(2px);
}

.batch-baseline-label {
    color: #64748b;
    font-weight: 700;
}

.supply-change-positive {
    color: #047857;
}

.supply-change-negative {
    color: #c2410c;
}

.supply-change-neutral {
    color: #94a3b8;
}

.supply-empty-cell {
    padding: 2rem !important;
    color: #64748b !important;
    text-align: center !important;
}

.supply-company-panel {
    overflow: visible;
}

.supply-filter-row {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) minmax(180px, 0.45fr) auto;
    gap: 0.9rem;
    align-items: center;
    padding: 1rem 1.2rem;
    border-bottom: 1px solid #e2e8f0;
}

.supply-search-field {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-height: 2.6rem;
    padding: 0 0.85rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.7rem;
    background: #fff;
}

.supply-search-field i {
    color: #94a3b8;
}

.supply-search-field input {
    width: 100%;
    border: 0;
    outline: 0;
    color: #334155;
    background: transparent;
    font-family: inherit;
    font-size: 0.88rem;
}

.supply-select-field {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 2.6rem;
    padding: 0 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.7rem;
    color: #64748b;
    background: #fff;
    font-size: 0.82rem;
}

.supply-select-field select {
    flex: 1;
    border: 0;
    outline: 0;
    color: #334155;
    background: transparent;
    font-family: inherit;
}

.supply-search-field:focus-within,
.supply-select-field:focus-within {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.16);
}

.supply-result-summary {
    margin: 0;
    color: #64748b;
    font-size: 0.82rem;
    text-align: right;
    white-space: nowrap;
}

.supply-company-name {
    color: #0f172a;
    font-weight: 650;
}

.supply-status-badge,
.supply-level-badge {
    display: inline-flex;
    align-items: center;
    min-height: 1.65rem;
    padding: 0.18rem 0.55rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
}

.supply-status-badge.is-new {
    color: #047857;
    background: #d1fae5;
}

.supply-status-badge.is-renewal {
    color: #1d4ed8;
    background: #dbeafe;
}

.supply-level-badge {
    color: #92400e;
    background: #fef3c7;
}

.supply-company-links {
    display: inline-flex;
    gap: 0.7rem;
    white-space: nowrap;
}

.supply-company-links a {
    color: var(--supply-blue);
    font-size: 0.8rem;
    font-weight: 650;
    text-decoration: none;
}

.supply-company-links a:hover {
    text-decoration: underline;
}

.supply-pagination {
    min-height: 3.8rem;
    padding: 0.85rem 1.2rem;
    border-top: 1px solid #e2e8f0;
}

.supply-pagination-fallback {
    margin: 0;
    color: #64748b;
    font-size: 0.82rem;
    text-align: center;
}

.supply-region-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) minmax(320px, 0.82fr);
    gap: 1.25rem;
    align-items: stretch;
}

.supply-region-ranking {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.supply-region-list {
    flex: 1;
    max-height: 590px;
    overflow-y: auto;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
    padding: 0.4rem 1.65rem 1rem 1.2rem;
}

.supply-region-list::-webkit-scrollbar {
    width: 8px;
}

.supply-region-list::-webkit-scrollbar-track {
    background: transparent;
}

.supply-region-list::-webkit-scrollbar-thumb {
    border: 2px solid transparent;
    border-radius: 999px;
    background: #cbd5e1;
    background-clip: content-box;
}

.supply-region-row {
    display: grid;
    grid-template-columns: 2.2rem minmax(3.75rem, 0.45fr) minmax(60px, 1fr) 3.5rem;
    gap: 0.55rem;
    align-items: center;
    padding: 0.68rem 0;
    border-bottom: 1px solid #eef2f7;
}

.supply-region-rank {
    color: #94a3b8;
    font-size: 0.78rem;
    font-weight: 700;
    text-align: center;
}

.supply-region-name {
    color: #334155;
    font-size: 0.86rem;
    font-weight: 650;
}

.supply-region-bar-track {
    height: 0.45rem;
    overflow: hidden;
    border-radius: 999px;
    background: #e2e8f0;
}

.supply-region-bar {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--supply-blue), #3b82f6);
}

.supply-region-value {
    color: #0f172a;
    font-size: 0.84rem;
    font-weight: 750;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.supply-composition-card {
    padding: 1.4rem;
}

.supply-composition-summary {
    margin-bottom: 1.1rem;
    color: #475569;
    font-size: 0.9rem;
    line-height: 1.75;
}

.supply-composition-bars {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem 1.5rem;
}

.supply-composition-row {
    display: grid;
    grid-template-columns: minmax(9rem, 0.8fr) minmax(100px, 1fr) 4.2rem;
    gap: 0.7rem;
    align-items: center;
}

.supply-composition-name {
    overflow: hidden;
    color: #475569;
    font-size: 0.82rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.supply-composition-track {
    height: 0.55rem;
    overflow: hidden;
    border-radius: 999px;
    background: #e2e8f0;
}

.supply-composition-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--supply-blue), #3b82f6);
}

.supply-composition-value {
    color: #0f172a;
    font-size: 0.8rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.supply-method-card {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    margin-top: 1.15rem;
}

.supply-method-card > div {
    padding: 1.35rem 1.45rem;
    border-top: 1px solid #e2e8f0;
    border-left: 1px solid #e2e8f0;
}

.supply-method-card > div:nth-child(-n + 2) {
    border-top: 0;
}

.supply-method-card > div:nth-child(odd) {
    border-left: 0;
}

.supply-method-card h3 {
    margin: 0 0 0.5rem;
    color: #0f172a;
    font-size: 1rem;
    font-weight: 750;
}

.supply-method-card p {
    margin: 0;
    color: #64748b;
    font-size: 0.86rem;
    line-height: 1.75;
}

@media (max-width: 1180px) {
    .supply-metric-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .supply-metric:nth-child(4) {
        border-left: 0;
        border-top: 1px solid #e2e8f0;
    }

    .supply-metric:nth-child(5),
    .supply-metric:nth-child(6) {
        border-top: 1px solid #e2e8f0;
    }

    .supply-filter-row {
        grid-template-columns: minmax(220px, 1fr) minmax(170px, 0.5fr);
    }

    .supply-result-summary {
        grid-column: 1 / -1;
        text-align: left;
    }
}

@media (max-width: 900px) {
    .supply-hero,
    .supply-region-grid {
        grid-template-columns: 1fr;
    }

    .supply-hero-actions {
        max-width: 34rem;
    }

    .supply-section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .supply-section-heading > p {
        text-align: left;
    }

    .supply-composition-bars {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .supply-page {
        padding-top: 1rem !important;
    }

    .supply-hero {
        gap: 1.35rem;
        margin-top: 0.75rem;
        padding: 1.35rem;
        border-radius: 1.1rem;
    }

    .supply-hero h1 {
        font-size: 2rem;
    }

    .supply-lead {
        font-size: 0.94rem;
        line-height: 1.75;
    }

    .supply-section {
        margin-bottom: 3rem;
    }

    .supply-section-heading {
        gap: 0.9rem;
    }

    .supply-scope-bar {
        align-items: stretch;
        flex-direction: column;
        gap: 0.9rem;
        margin: -0.5rem 0 2.5rem;
    }

    .supply-metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .supply-metric {
        min-height: 8.5rem;
        padding: 1.05rem 0.9rem;
        border-top: 1px solid #e2e8f0;
    }

    .supply-metric:nth-child(-n + 2) {
        border-top: 0;
    }

    .supply-metric:nth-child(odd) {
        border-left: 0;
    }

    .supply-metric:nth-child(even) {
        border-left: 1px solid #e2e8f0;
    }

    .supply-metric-value {
        font-size: 1.55rem;
    }

    .certificate-switch,
    .status-switch,
    .composition-switch {
        width: 100%;
    }

    .certificate-switch-button,
    .status-switch-button,
    .composition-switch-button {
        flex: 1;
    }

    .supply-chart-card {
        padding: 0.6rem 0.35rem 1rem;
    }

    .supply-chart {
        height: 360px;
    }

    .supply-region-chart {
        height: 430px;
    }

    .supply-chart-insight {
        margin: 0 0.55rem;
        font-size: 0.85rem;
    }

    .supply-table-section-heading {
        align-items: flex-start;
        flex-direction: column;
        margin-top: 2.75rem;
        margin-bottom: 1rem;
    }

    .supply-table-hint {
        display: none;
    }

    .supply-table-card {
        padding: 0;
    }

    .supply-data-table th,
    .supply-data-table td {
        padding: 0.75rem;
        font-size: 0.8rem;
    }

    .supply-table-card .supply-data-table th:first-child,
    .supply-table-card .supply-data-table td:first-child {
        min-width: 5.5rem;
    }

    .supply-company-panel {
        padding: 0;
    }

    .supply-filter-row {
        grid-template-columns: 1fr;
        padding: 0.75rem 0.65rem;
    }

    .supply-result-summary {
        grid-column: auto;
    }

    .supply-company-table,
    .supply-company-table tbody,
    .supply-company-table tr,
    .supply-company-table td {
        display: block;
        width: 100%;
    }

    .supply-company-table thead {
        display: none;
    }

    .supply-company-table tbody {
        padding: 0.45rem;
    }

    .supply-company-table tbody tr {
        margin-bottom: 0.55rem;
        padding: 0.75rem;
        border: 1px solid #e2e8f0;
        border-radius: 0.85rem;
        background: #fff;
    }

    .supply-company-table tbody tr:last-child {
        margin-bottom: 0;
    }

    .supply-pagination {
        padding-right: 0.65rem;
        padding-left: 0.65rem;
    }

    .supply-company-table tbody tr:hover {
        background: #f8fbff;
    }

    .supply-company-table td {
        display: grid;
        grid-template-columns: 5.5rem minmax(0, 1fr);
        gap: 0.65rem;
        padding: 0.42rem 0;
        border-bottom: 1px dashed #e2e8f0;
    }

    .supply-company-table .supply-level-badge,
    .supply-company-table .supply-status-badge {
        justify-self: start;
        width: fit-content;
        max-width: 100%;
    }

    .supply-company-table td:last-child {
        border-bottom: 0;
    }

    .supply-company-table td::before {
        content: attr(data-label);
        color: #94a3b8;
        font-size: 0.75rem;
        font-weight: 650;
    }

    .supply-region-list {
        max-height: none;
        padding: 0.4rem 0.9rem 1rem;
    }

    .supply-region-ranking {
        padding: 0;
    }

    .supply-region-row {
        grid-template-columns: 1.8rem 4rem minmax(80px, 1fr) 3.4rem;
        gap: 0.55rem;
    }

    .supply-composition-card {
        padding: 1rem;
    }

    .supply-composition-row {
        grid-template-columns: minmax(7.5rem, 0.85fr) minmax(70px, 1fr) 3.8rem;
        gap: 0.5rem;
    }

    .supply-method-card {
        padding: 0;
        grid-template-columns: 1fr;
    }

    .supply-method-card > div,
    .supply-method-card > div:nth-child(-n + 2),
    .supply-method-card > div:nth-child(odd) {
        padding: 1rem 1.05rem;
        border-top: 1px solid #e2e8f0;
        border-left: 0;
    }

    .supply-method-card > div:first-child {
        border-top: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .certificate-switch-button,
    .status-switch-button,
    .composition-switch-button,
    .supply-data-table tbody tr {
        transition: none;
    }
}
