/* Color Tokens */
:root {
    --green-primary: #76b900;
    --green-dark: #5a8c00;
    --green-bg: #f0f7e6;
    --text-dark: #333;
    --text-medium: #555;
    --text-light: #666;
    --text-muted: #888;
    --text-faint: #999;
    --border-light: #e0e0e0;
    --border-faint: #ddd;
    --bg-light: #fafafa;
    --bg-subtle: #f5f5f5;
    --bg-page: #f9f9f9;
    --red-error: #e53935;
}

/* Base Styles */
* {
    box-sizing: border-box;
}
body {
    font-family: "Titillium Web", "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
    font-weight: 300;
    font-size: 17px;
    margin-left: auto;
    margin-right: auto;
    width: 1000px;
}
h1 {
    font-weight: 300;
    line-height: 1.15em;
    font-size: 36px;
    font-weight: 500;
    text-align: center;
}
h2 {
    font-size: 1.5em;
    font-weight: 400;
    margin: 16px 0px 4px 0px;
    text-align: center;
}
h3 {
    font-size: 1.2em;
    font-weight: 400;
    margin: 16px 0px 4px 0px;
}
a:link, a:visited {
    color: #76b900;
    text-decoration: none;
}
a:hover {
    color: #5a8c00;
}
.paper-title {
    padding: 16px 0px 16px 0px;
}
section {
    margin: 32px 0px 32px 0px;
    text-align: justify;
    clear: both;
}
.author-row, .affil-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    font-size: 18px;
    font-weight: 400;
    text-align: center;
    gap: 4px 0;
}
.author-item, .affil-item {
    padding: 2px 16px;
    white-space: nowrap;
}
.affil-row {
    font-size: 16px;
    margin-top: 8px;
}
hr {
    height: 1px;
    border: 0; 
    border-top: 1px solid #ddd;
    margin: 0;
}
.caption-center {
    font-size: 16px;
    color: #666;
    text-align: center;
    margin-top: 8px;
    margin-bottom: 8px;
}
.container {
    margin-left: auto;
    margin-right: auto;
}

/* Supplementary PDF Button Styles */
.supp-btn {
    background-color: #fff;
    border: 1.5px solid #000;
    color: #000 !important;
    font-size: 16px;
    padding: 12px 24px;
    border-radius: 50px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    transition-duration: 0.4s;
    cursor: pointer;
    letter-spacing: 1px;
    margin: 8px;
    width: fit-content;
    font-weight: 400;
}
.supp-btn:hover {
    background-color: #000;
    color: #fff !important;
}
.material-icons {
    vertical-align: -6px;
}
p {
    line-height: 1.5em;
}
.paper-btn-parent {
    display: flex;
    justify-content: center;
    margin: 16px 0px;
}

/* Grid System */
.col-6 {
    width: 16.6%;
    float: left;
}
.col-5 {
    width: 20%;
    float: left;
}
.col-4 {
    width: 25%;
    float: left;
}
.col-3 {
    width: 33%;
    float: left;
}
.col-2 {
    width: 50%;
    float: left;
}
.col-1 {
    width: 100%;
    float: left;
}
.text-center {
    text-align: center;
}

/* Figure Styles */
.figure-container {
    margin: 20px auto;
    text-align: center;
    max-width: 100%;
}
.figure-container img {
    max-width: 100%;
    width: 100%;
    height: auto;
    border-radius: 8px;
}
@media (min-width: 768px) {
    .figure-container {
        max-width: 700px;
    }
}

/* Table Styles */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 15px;
}
th, td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}
th {
    background-color: #f5f5f5;
    font-weight: 500;
}
tr:hover {
    background-color: #fafafa;
}
.highlight-row {
    background-color: #f0f7e6 !important;
}

/* TLDR */
.tldr {
    margin: 24px 0;
    font-size: 18px;
    text-align: center;
}
.tldr-label {
    font-weight: 600;
    color: var(--green-primary);
}
.tldr-note {
    font-size: 14px;
    color: var(--green-primary);
}

/* Unified Dropdown/Details Styling */
details {
    margin: 16px 0;
    border: 1px solid #e0e0e0;
    border-left: 3px solid #76b900;
    border-radius: 4px;
    background: #fafafa;
}
details summary {
    font-size: 1.05em;
    font-weight: 500;
    padding: 14px 18px;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #5a8c00;
}
details summary:hover {
    color: #76b900;
}
details summary::-webkit-details-marker {
    display: none;
}
details summary::before {
    content: "▶";
    font-size: 0.75em;
    color: #76b900;
    transition: transform 0.2s;
}
details[open] summary::before {
    transform: rotate(90deg);
}
details[open] summary {
    border-bottom: 1px solid #e0e0e0;
}
details .details-content {
    padding: 16px 18px;
}

/* Math Block */
.math-block {
    padding: 12px 16px;
    border-radius: 4px;
    margin: 12px 0;
    text-align: center;
    font-size: 16px;
    overflow-x: auto;
}


/* BibTeX */
#bibtex pre {
    font-size: 14px;
    background-color: #eee;
    padding: 16px;
    border-radius: 4px;
    overflow-x: auto;
}

/* Venue badge */
.venue {
    color: #76b900;
    font-weight: 500;
    font-size: 18px;
}

/* Abstract */
.abstract-text {
    background: #f9f9f9;
    border-left: 4px solid #76b900;
    padding: 16px 20px;
    margin: 16px 0;
}

/* Ablation Chart */
#ablation-chart-container {
    position: relative;
    max-width: 960px;
    margin: 20px auto;
}
#ablation-chart {
    width: 100%;
    height: auto;
    font-family: "Titillium Web", sans-serif;
}
/* Bar chart */
.chart-bar-recurrent {
    fill: var(--green-primary);
    transition: opacity 0.15s ease;
    opacity: 0.5;
}
.chart-bar-parallel {
    fill: var(--green-primary);
    transition: opacity 0.15s ease;
    opacity: 0.9;
}
.chart-bar-na {
    fill: none;
    stroke: var(--border-light);
    stroke-width: 1;
    stroke-dasharray: 4,2;
    transition: opacity 0.15s ease;
}
.chart-bar-group.hovered .chart-bar-recurrent,
.chart-bar-group.hovered .chart-bar-parallel,
.chart-bar-group.hovered .chart-bar-na {
    opacity: 0.3;
}
.chart-legend-box {
    fill: white;
    fill-opacity: 0.92;
    stroke: var(--border-light);
    stroke-width: 0.5;
}
.chart-legend-swatch-recurrent {
    fill: var(--green-primary);
    opacity: 0.5;
}
.chart-legend-swatch-parallel {
    fill: var(--green-primary);
    opacity: 0.9;
}
.chart-bg {
    fill: var(--bg-light);
}
.chart-grid {
    stroke: #e8e8e8;
    stroke-width: 1.0;
}
.chart-axis {
    stroke: var(--text-dark);
    stroke-width: 1.5;
}
.chart-tick-mark line {
    stroke: var(--text-dark);
    stroke-width: 1.5;
}
.chart-axis-label {
    font-size: 14px;
    fill: var(--text-dark);
    font-weight: 400;
}
.chart-tick-label {
    font-size: 12px;
    fill: var(--text-light);
}
.chart-x-label {
    font-size: 12px;
    fill: var(--text-medium);
    font-weight: 400;
}
.chart-legend-text {
    font-size: 13px;
    fill: var(--text-dark);
}

/* Bar hover zones */
.chart-hover-zone {
    fill: transparent;
    cursor: pointer;
}

/* Ablation Tooltip */
#ablation-tooltip {
    display: none;
    position: absolute;
    pointer-events: none;
    background: white;
    border: 1px solid var(--border-faint);
    border-radius: 6px;
    padding: 10px 14px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    font-size: 13px;
    line-height: 1.5;
    z-index: 10;
    width: 250px;
}
.tt-header {
    font-weight: 600;
    margin-bottom: 2px;
    font-size: 14px;
}
.tt-desc {
    color: var(--text-light);
    font-size: 13px;
    margin-bottom: 6px;
}
.tt-ppl-line {
    margin-bottom: 6px;
}
.tt-metric-table {
    width: 100%;
    border-collapse: collapse;
    margin: 4px 0;
    font-size: 13px;
}
.tt-metric-table td {
    padding: 2px 0;
}
.tt-metric-table td:first-child {
    white-space: nowrap;
    padding-right: 10px;
}
.tt-metric-table td:nth-child(2) {
    text-align: right;
    padding-right: 6px;
    white-space: nowrap;
}
.tt-metric-table td:nth-child(3) {
    text-align: right;
    white-space: nowrap;
}
.tt-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
    padding: 2px 0;
}
.tt-form-badge {
    font-size: 13px;
    font-weight: 500;
    min-width: 68px;
}
.tt-form-badge-recurrent {
    color: rgba(118, 185, 0, 0.6);
}
.tt-form-badge-parallel {
    color: var(--green-primary);
}
.tt-separator {
    border: none;
    border-top: 1px solid var(--border-faint);
    margin: 5px 0;
}
.tt-delta-positive {
    color: var(--red-error);
    font-weight: 600;
}
.tt-delta-negative {
    color: var(--green-primary);
    font-weight: 600;
}
.tt-delta-baseline {
    color: var(--text-muted);
}
.tt-na {
    color: var(--text-muted);
    font-style: italic;
}

/* Responsive */
@media (max-width: 1050px) {
    body {
        width: 95%;
        padding: 0 16px;
    }
    .observation-grid {
        grid-template-columns: 1fr;
    }
}
