:root {
    --border: 1px solid rgba(0, 0, 0, 0.1);
}

* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    background: #fafafa;
    margin: 0;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    color: #111;
}

.container {
    background: #fff;
    border-radius: 12px;
    border: var(--border);
    max-width: 840px;
    width: 100%;
    padding: 32px 40px;
}

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

.header-left,
.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

h1 {
    font-size: 22px;
    margin: 0;
    font-weight: 600;
}

form {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    flex-wrap: wrap;
}

.arrow {
    text-decoration: none;
    font-size: 20px;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 6px;
    color: #000;
    border: var(--border);
    background: rgba(0, 0, 0, .03);
}

button.arrow {
    cursor: pointer;
    font-family: inherit;
}

.trials-controls .arrow {
    margin-left: 6px;
}

.trials-range {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-right: 10px;
}

input[type=date],
input[type=number] {
    padding: 8px 10px;
    font-size: 15px;
    border-radius: 8px;
    border: var(--border);
    background: #fff;
    color: #000;
    width: 140px;
}

input[type=number].stepper {
    width: 80px;
}

.stepper-label {
    font-size: 15px;
    color: rgba(0, 0, 0, 0.6);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24px;
}

th,
td {
    padding: 12px 14px;
    text-align: left;
    font-size: 14px;
}

th {
    font-weight: 600;
    border-bottom: var(--border);
}

td {
    border-bottom: var(--border);
}

.no-border td {
    border-bottom: none;
}

details {
    border: var(--border);
    border-radius: 8px;
}

summary {
    padding: 14px;
    cursor: pointer;
    font-weight: 600;
    user-select: none;
}

summary::-webkit-details-marker {
    display: none;
}

.no-data {
    padding: 20px;
    text-align: center;
    border: var(--border);
    border-radius: 8px;
    font-size: 14px;
    background: rgba(0, 0, 0, .03);
}

.section {
    padding: 16px;
    margin-top: 24px;
}

.section-no-top {
    margin-top: 0;
}

.section-title {
    font-weight: 600;
    margin: 0 0 12px;
}

.chart {
    padding: 72px 12px 44px;
    margin-bottom: 24px;
    border-radius: 8px;
    position: relative;
}

.chart-no-bottom {
    margin-bottom: 0;
}

.chart-summary {
    position: absolute;
    right: 12px;
    top: 8px;
    display: inline-flex;
    flex-direction: row;
    gap: 12px;
    z-index: 3;
}

.chart-pill {
    background: #1f2838;
    color: #fff;
    border-radius: 14px;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.chart-bars {
    display: flex;
    flex: 1;
    align-items: flex-end;
    gap: clamp(2px, 1vw, var(--bar-gap, 10px));
    height: clamp(100px, 20vw, 160px);
    padding: 0 2px;
    border-bottom: none;
    position: relative;
    overflow: visible;
    background-image:
        repeating-linear-gradient(to right, rgba(0, 0, 0, 0.20) 0 6px, transparent 6px 12px),
        repeating-linear-gradient(to right, rgba(0, 0, 0, 0.20) 0 6px, transparent 6px 12px),
        repeating-linear-gradient(to right, rgba(0, 0, 0, 0.20) 0 6px, transparent 6px 12px),
        repeating-linear-gradient(to right, rgba(0, 0, 0, 0.20) 0 6px, transparent 6px 12px),
        repeating-linear-gradient(to right, rgba(0, 0, 0, 0.20) 0 6px, transparent 6px 12px);
    background-size: 100% 1px, 100% 1px, 100% 1px, 100% 1px, 100% 1px;
    background-repeat: no-repeat;
    background-position: 0 0%, 0 25%, 0 50%, 0 75%, 0 100%;
}

.chart-bars.dense .bar-label {
    font-size: 10px;
}

.chart-bars.dense .bar-value {
    font-size: 11px;
}

.chart-grid {
    display: flex;
    align-items: stretch;
    gap: 10px;
}

.chart-y-axis {
    width: 56px;
    height: clamp(100px, 20vw, 160px);
    position: relative;
}

.chart-y-label {
    position: absolute;
    right: 0;
    font-size: 12px;
    color: rgba(0, 0, 0, 0.6);
    line-height: 1;
}

.chart-y-label:nth-child(1) {
    top: 0;
    transform: translateY(-50%);
}

.chart-y-label:nth-child(2) {
    top: 25%;
    transform: translateY(-50%);
}

.chart-y-label:nth-child(3) {
    top: 50%;
    transform: translateY(-50%);
}

.chart-y-label:nth-child(4) {
    top: 75%;
    transform: translateY(-50%);
}

.chart-y-label:nth-child(5) {
    top: 100%;
    transform: translateY(-100%);
}

@media (max-width: 700px) {
    .chart-bars .bar-label {
        display: none;
    }

    .chart-y-axis {
        width: 46px;
    }

    .chart-y-label {
        font-size: 11px;
    }
}

@media (max-width: 520px) {
    .chart-bars .bar-value {
        display: none;
    }
}

.bar {
    flex: 1 1 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    min-width: 10px;
    position: relative;
}

.bar-fill {
    width: 100%;
    height: var(--bar-height, 0%);
    background: #1f2838;
    border-radius: 12px 12px 0 0;
    min-height: 0;
}

.bar-value {
    display: none;
    position: absolute;
    bottom: calc(var(--bar-height, 0%) + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: #1f2838;
    color: #fff;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    padding: 6px 12px 7px;
    white-space: nowrap;
    z-index: 2;
}

.bar-value::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -8px;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid #1f2838;
}

.bar:hover .bar-value,
.bar.bar-active .bar-value {
    display: block;
}

.bar-label {
    font-size: clamp(9px, 1.2vw, 12px);
    color: rgba(0, 0, 0, 0.6);
    font-weight: 600;
    margin-top: 0;
    white-space: nowrap;
    position: absolute;
    bottom: -20px;
    right: 50%;
    text-align: right;
    transform: rotate(-45deg);
    transform-origin: top right;
}

.chart-bars.rotate-45 .bar-label {
    transform: rotate(-45deg);
    transform-origin: top right;
}
