.otc-graph-surface {
    background-color: #fff;
    border: 1px solid #ddd;
    color: #2e2e2e;
}

body.theme-dark .otc-graph-surface {
    background-color: #fff;
    border-color: #ddd;
    color: #2e2e2e;
}

.otc-graph-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.otc-graph-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 0.35rem;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.otc-graph-card h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.otc-graph-card__graph-link,
.otc-graph-card a {
    display: flex;
    flex: 1;
    flex-direction: column;
}

.otc-graph-card__graph {
    aspect-ratio: 4 / 5;
    margin-top: auto;
    min-height: 250px;
    overflow: hidden;
}

.otc-graph-card [data-stat-graph] {
    min-height: 250px;
    padding: 0.75rem;
}

.otc-graph-card [data-stat-graph] svg {
    display: block;
    width: 100%;
    height: auto;
}

.otc-graph-card [data-stat-graph]:focus-within,
.otc-graph-card a:focus-visible {
    outline: 3px solid rgba(0, 123, 255, 0.45);
    outline-offset: 3px;
}

.otc-graph-card:hover {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14);
}

.otc-graph-card__loading,
.otc-graph-card__error,
.otc-graph-error {
    padding: 1rem;
    color: #666;
}

.otc-graph-card__error,
.otc-graph-error {
    color: #a00;
}

.otc-graph-axis .domain,
.otc-graph-axis .tick line {
    stroke: #000;
}

.otc-graph-axis .tick text {
    fill: #000;
}

#graph_element svg {
    max-width: 100%;
    height: auto;
}

.otc-graph-canvas.is-wide {
    overflow-x: auto;
}

.otc-graph-canvas.is-wide #graph_element svg {
    max-width: none;
}
