#sub_header {
    width: 800px;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

#sub_header>h2 {
    margin: 0;
    font-size: 1.25em;
}

:root {
    --year-w: 60px;
    --ratio-w: 100px;
    --row-h: 36px;
    --gutter: 5px;
    --primary: #4682b4;
    --grid: #4682b466;
    --chart-w: calc(100% - var(--year-w) - var(--ratio-w));
}

body {
    margin: 0;
    padding: 20px;
    font-family: sans-serif;
    color: #333:
}

h2 {
    text-align: center;
    margin-bottom: 16px;
}

.table-container {
    position: relative;
    width: 800px;
    min-width: 800px;
    max-width: 800px;
    --chart-w: calc(800px - var(--year-w) - var(--ratio-w));
    visibility: hidden;
    margin-bottom: 10px;
}

.row {
    display: grid;
    grid-template-columns: var(--year-w) var(--chart-w) var(--ratio-w);
    align-items: center;
    height: var(--row-h);
    position: relative;
    z-index: 1;
    border-bottom: 1px solid #ccc;
}

.table-container,
.row,
.cell {
    box-sizing: border-box;
}

.row.multi10 {
    border-bottom: 1px solid #333;
}

.header {
    position: sticky;
    top: 70px;
    background: #666;
    color: #fff;
    z-index: 10;
    border: 1px solid #ccc;
    scrollbar-gutter: stable;
    width: 800px;
    height: 50px;
}

.fixed {
    position: sticky;
    top: calc(50px + 70px);
    background: #ffc;
    z-index: 9;
    border: 1px solid #ccc;
    border-top: none;
    scrollbar-gutter: stable;
    width: 800px;
}

.body {
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
    border: 1px solid #ccc;
    border-top: none;
}

.cell {
    padding: 0 var(--gutter);
    font-size: 14px;
    position: relative;
}

.cell.year {
    font-weight: bold;
}

.header .cell.chart {
    height: 50px;
    padding-top: 5px;
}

.cell.chart {
    height: var(--row-h);
    border-left: 1px solid #ccc;
    border-right: 1px solid #ccc;
}

.cell.chart::before {
    content: '';
    position: absolute;
    top: 4px;
    bottom: 4px;
    background: var(--primary);
    left: calc(var(--bar-start));
    width: calc(var(--bar-width));
    border-radius: 2px;
}

.cell.chart.undecidedStart::before {
    background: linear-gradient(to right, transparent 0%, var(--primary) 15%, var(--primary) 100%);
}

.cell.chart.undecidedEnd::before {
    background: linear-gradient(to right, var(--primary) 0%, var(--primary) 85%, transparent 100%);
}

.cell.chart.undecidedBoth::before {
    background: linear-gradient(to right, transparent 0%, var(--primary) 15%, var(--primary) 85%, transparent 100%);
}

.cell.chart .label {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    white-space: nowrap;
    pointer-events: none;
}

.header .cell.chart .label.tick {
    transform: translate(-50%, -50%);
    color: #666;
    z-index: 11;
}

.label.tick {
    top: auto !important;
    bottom: -5px;
    color: #fff !important;
}

.cell.chart .label.start {
    left: calc(var(--bar-start) - 2px);
    transform: translate(-100%, -50%);
}

.cell.chart .label.end {
    left: calc(var(--bar-start) + var(--bar-width) + 2px);
    transform: translate(0, -50%);
}

.cell.chart.undecidedEnd .label.end {
    left: calc(var(--bar-start) + var(--bar-width) - 15px);
}

.cell.chart .label.dur {
    left: calc(var(--bar-start) + var(--bar-width) / 2);
    transform: translate(-50%, -50%);
    color: #fff;
}

.cell.ratio {
    text-align: right;
    padding-right: 20px;
}

.grid-line {
    position: absolute;
    top: 0;
    bottom: 0;
    border-left: 1px dashed var(--grid);
    pointer-events: none;
    z-index: 0;
}

.area-grid {
    position: sticky;
    top: 0;
    z-index: 99;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-gap: 5px;
    max-width: 800px;
    margin: 10px auto;
    height: 70px;
    background-color: #fff;
}

.area-btn {
    font-size: 14px;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    user-select: none;
    color: #666;
    text-decoration: none;
    height: 30px;
    align-content: center;
}

.area-btn.selected {
    background-color: #36f;
    color: #fff;
}

.area-btn:hover {
    text-decoration: none;
}

.area-btn:not(.selected):hover {
    background-color: #e0e0e0;
    color: #666;
}