/* RailDiary statistics – inspired by the information hierarchy of Flightdiary.
   This is its own accessible, responsive RailDiary design. All counts come from
   actually travelled journeys; no guessed distances or flight-specific data. */
.rd-fd-stats { padding-bottom: 2.5rem; }
.rd-fd-heading { align-items: flex-end; margin-bottom: 1.2rem; }
.rd-statistics .rd-stats-filter { min-width: 180px; }
.rd-statistics .rd-stats-filter label { color: var(--rd-muted); font-size: .75rem; font-weight: 650; }
.rd-statistics .rd-stats-filter select {
    background-color: var(--rd-surface);
    border-color: var(--rd-border);
    color: var(--rd-text);
}
.rd-stats-note { font-size: .78rem; color: var(--rd-muted); line-height: 1.5; }
.rd-stats-footnote { margin: 1.25rem .15rem 0; color: var(--rd-muted); font-size: .76rem; line-height: 1.6; }
.rd-fd-stats h2 { font-size: .96rem; font-weight: 750; }
.rd-fd-map-panel {
    background: var(--rd-surface);
    border: 1px solid var(--rd-border);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 1rem;
}
.rd-fd-map-heading, .rd-fd-map-caption {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem 1.4rem;
    flex-wrap: wrap;
    padding: .8rem 1.2rem;
}
.rd-fd-map-heading h2 { margin: 0; }
.rd-fd-map-heading > span, .rd-fd-map-caption {
    color: var(--rd-muted);
    font-size: .76rem;
}
.rd-fd-map-caption a { color: var(--rd-accent); }
.rd-fd-map-viewport { width: 100%; height: 490px; background: #d9e9e6; }
.rd-fd-map-legend { display: flex; flex-wrap: wrap; gap: .55rem 1.15rem; align-items: center; }
.rd-fd-map-legend > span { display: inline-flex; align-items: center; gap: .42rem; }
.rd-fd-map-key { display: inline-block; width: 1.45rem; height: 0; border-top: 3px solid; }
.rd-fd-map-rail { border-color: #0e8876; }
.rd-fd-map-transit { border-color: #3479bc; }
.rd-fd-map-unverified { border-color: #bd8535; }
.rd-fd-map-schematic { border-color: #8b8998; border-top-style: dashed; }
.rd-fd-map-dot { display: inline-block; height: .6rem; width: .6rem; border: 2px solid #277d70; border-radius: 100%; background: white; }
.rd-fd-map-data-status { padding: 0 1.2rem .9rem; color: var(--rd-muted); font-size: .74rem; margin: 0; min-height: 1.65rem; }
.rd-fd-map-panel .rd-stats-note { padding: 0 1.2rem .75rem; }
.rd-fd-hero-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    background: var(--rd-surface);
    border: 1px solid var(--rd-border);
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 1.25rem;
}
.rd-fd-hero-metric {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: .12rem;
    padding: 1.15rem 1.35rem 1.25rem;
    border-right: 1px solid var(--rd-border);
    min-width: 0;
}
.rd-fd-hero-metric:last-child { border-right: 0; }
.rd-fd-hero-metric > strong {
    font-size: clamp(1.65rem, 2.45vw, 2.75rem);
    letter-spacing: -.065em;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
    color: var(--rd-text);
}
.rd-fd-hero-metric > span:not(.rd-fd-metric-symbol) { font-size: .9rem; font-weight: 750; color: var(--rd-text); }
.rd-fd-hero-metric > small { color: var(--rd-muted); font-size: .72rem; line-height: 1.45; }
.rd-fd-metric-symbol { position: absolute; right: 1.2rem; top: 1.25rem; color: var(--rd-accent); opacity: .7; font-size: 1.1rem; }
.rd-fd-empty {
    margin: 0 0 1rem;
    padding: 1rem 1.25rem;
    background: var(--rd-surface);
    border: 1px dashed var(--rd-border);
    border-radius: 12px;
    color: var(--rd-muted);
    font-size: .84rem;
}
.rd-fd-empty a { margin-left: .45rem; color: var(--rd-accent); }
.rd-fd-ranking-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .85rem;
    margin-bottom: 1.25rem;
}
.rd-fd-ranking-card {
    --fd-card-color: #0f8a84;
    --fd-card-ink: #fff;
    min-width: 0;
    overflow: hidden;
    border-radius: 13px;
    border: 1px solid var(--rd-border);
    background: var(--rd-surface);
    box-shadow: 0 5px 20px rgb(12 45 44 / 5%);
}
.rd-fd-ranking-card.rd-fd-lime { --fd-card-color: #91bb12; --fd-card-ink: #142c16; }
.rd-fd-ranking-card.rd-fd-yellow { --fd-card-color: #efb617; --fd-card-ink: #302a10; }
.rd-fd-ranking-card.rd-fd-red { --fd-card-color: #ca5254; --fd-card-ink: #fff; }
.rd-fd-ranking-card.rd-fd-purple { --fd-card-color: #8d5291; --fd-card-ink: #fff; }
.rd-fd-ranking-card.rd-fd-teal { --fd-card-color: #087d84; --fd-card-ink: #fff; }
.rd-fd-ranking-top {
    min-height: 247px;
    background: var(--fd-card-color);
    color: var(--fd-card-ink);
    padding: 1rem .85rem .9rem;
}
.rd-fd-ranking-top h2 {
    min-height: 2.15em;
    margin: 0 0 .65rem;
    color: inherit;
    font-size: .73rem;
    letter-spacing: .045em;
    font-weight: 800;
    text-align: center;
}
.rd-fd-ranking-empty { font-size: .76rem; opacity: .85; }
.rd-fd-ranking-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .52rem; }
.rd-fd-ranking-list li { display: grid; grid-template-columns: minmax(0, 42%) minmax(0, 1fr) auto; align-items: center; gap: .42rem; font-size: .71rem; }
.rd-fd-ranking-name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.rd-fd-ranking-track { height: .48rem; background: rgb(255 255 255 / 18%); border-radius: 2px; overflow: hidden; }
.rd-fd-ranking-bar { display: block; height: 100%; min-width: 1px; background: currentColor; opacity: .83; }
.rd-fd-ranking-list li strong { min-width: 1.35rem; text-align: right; font-variant-numeric: tabular-nums; font-size: .71rem; }
.rd-fd-ranking-bottom { display: flex; flex-direction: column; padding: .82rem .92rem 1rem; min-height: 87px; }
.rd-fd-ranking-bottom strong { font-size: 1.8rem; font-variant-numeric: tabular-nums; line-height: 1.2; color: var(--rd-text); letter-spacing: -.05em; }
.rd-fd-ranking-bottom span { font-size: .72rem; color: var(--rd-muted); line-height: 1.4; }
.rd-fd-timeline, .rd-fd-period-card, .rd-fd-donut-panel, .rd-fd-delay-panel {
    background: var(--rd-surface);
    border: 1px solid var(--rd-border);
    border-radius: 15px;
    min-width: 0;
}
.rd-fd-timeline { padding: 1.4rem 1.35rem 1.1rem; margin-bottom: 1rem; background: #7eadd1; border-color: #7eadd1; color: #142a3a; }
.rd-fd-section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.rd-fd-section-heading h2 { margin: 0; color: inherit; }
.rd-fd-section-heading p { font-size: .73rem; margin: .25rem 0 0; color: inherit; opacity: .75; }
.rd-fd-section-heading > span { font-size: .73rem; opacity: .75; white-space: nowrap; }
.rd-fd-year-graph { overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; margin-top: .6rem; }
.rd-fd-year-graph svg { display: block; width: 100%; min-width: 560px; height: 180px; }
.rd-fd-chart-axis { stroke: #fff; stroke-opacity: .5; stroke-width: 1; }
.rd-fd-chart-gridline { stroke: #fff; stroke-opacity: .28; stroke-width: 1; }
.rd-fd-chart-line { stroke: #fff; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; fill: none; vector-effect: non-scaling-stroke; }
.rd-fd-chart-dot { fill: #fff; stroke: #2874a2; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.rd-fd-years-labels { display: flex; justify-content: space-between; gap: 0; min-width: 560px; margin: .1rem 12px 0; }
.rd-fd-years-labels span { flex: 1; text-align: center; color: #1b3d50; font-size: .67rem; font-variant-numeric: tabular-nums; }
.rd-fd-years-labels span.rd-fd-selected-year { color: #fff; font-weight: 800; }
.rd-fd-timeline-empty { margin: 1.5rem 0; font-size: .85rem; }
.rd-fd-period-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.rd-fd-period-card { padding: 1.25rem 1.3rem 1rem; color: #3e2642; }
.rd-fd-period-pink { background: #e7b4d6; border-color: #e7b4d6; }
.rd-fd-period-blue { background: #b9a4d7; border-color: #b9a4d7; }
.rd-fd-period-bars { display: flex; justify-content: space-around; gap: .25rem; align-items: end; margin-top: .75rem; min-width: 0; }
.rd-fd-period-column { min-width: 0; flex: 1 1 0; height: 167px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: .28rem; }
.rd-fd-period-value { font-size: .67rem; line-height: 1; font-variant-numeric: tabular-nums; height: .74rem; color: #362f43; }
.rd-fd-period-track { position: relative; width: 75%; max-width: 40px; height: 122px; display: flex; align-items: end; border-bottom: 1px solid rgb(255 255 255 / 70%); }
.rd-fd-period-bar { display: block; width: 100%; background: rgb(255 255 255 / 87%); border-radius: 3px 3px 0 0; }
.rd-fd-period-label { font-size: .65rem; color: #352c43; white-space: nowrap; }
.rd-fd-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.rd-fd-delay-panel { grid-column: 1 / -1; }
.rd-fd-donut-panel, .rd-fd-delay-panel { padding: 1.2rem 1.25rem; }
.rd-fd-donut-panel h2, .rd-fd-delay-panel h2 { margin: 0 0 1rem; }
.rd-fd-donut-content { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: .8rem; }
.rd-fd-donut { width: 232px; height: 232px; display: grid; place-items: center; flex: 0 0 232px; border-radius: 50%; }
.rd-fd-donut-core { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 165px; height: 165px; border-radius: 50%; background: var(--rd-surface); color: var(--rd-text); box-shadow: 0 1px 7px rgb(0 0 0 / 4%); }
.rd-fd-donut-core strong { font-size: 2.45rem; letter-spacing: -.06em; font-variant-numeric: tabular-nums; }
.rd-fd-donut-core small { font-size: .66rem; color: var(--rd-muted); }
.rd-fd-donut-legend { list-style: none; display: grid; gap: .4rem; padding: 0; margin: 0; flex: 0 1 auto; width: max-content; max-width: 100%; }
.rd-fd-donut-legend li { display: grid; grid-template-columns: 9px max-content max-content; column-gap: .35rem; align-items: center; justify-content: start; font-size: .76rem; color: var(--rd-text); }
.rd-fd-donut-legend li strong { font-variant-numeric: tabular-nums; }
.rd-fd-donut-swatch { width: 9px; height: 9px; border-radius: 2px; }
.rd-fd-delay-comparison { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.rd-fd-delay-record { border-top: 1px solid var(--rd-border); padding-top: .8rem; display: flex; flex-direction: column; gap: .25rem; font-size: .73rem; }
.rd-fd-delay-record > small { font-size: .63rem; color: var(--rd-muted); }
.rd-fd-delay-record > strong { font-size: 1.35rem; }
/* Deviation sign, not the card's accent, determines severity. Keep the same
   semantics in light and dark themes: late red, early green, zero neutral. */
.rd-fd-hero-metric > strong.rd-fd-deviation-positive,
.rd-fd-delay-record > strong.rd-fd-deviation-positive { color: #b42332; }
.rd-fd-hero-metric > strong.rd-fd-deviation-negative,
.rd-fd-delay-record > strong.rd-fd-deviation-negative { color: #177c4f; }
.rd-fd-hero-metric > strong.rd-fd-deviation-neutral,
.rd-fd-delay-record > strong.rd-fd-deviation-neutral { color: var(--rd-text); }
:root[data-bs-theme="dark"] .rd-fd-hero-metric > strong.rd-fd-deviation-positive,
:root[data-bs-theme="dark"] .rd-fd-delay-record > strong.rd-fd-deviation-positive { color: #ff8994; }
:root[data-bs-theme="dark"] .rd-fd-hero-metric > strong.rd-fd-deviation-negative,
:root[data-bs-theme="dark"] .rd-fd-delay-record > strong.rd-fd-deviation-negative { color: #72deb0; }
.rd-fd-distance-note { display: flex; align-items: flex-start; gap: 1rem; background: var(--rd-surface); color: var(--rd-text); border: 1px solid var(--rd-border); border-radius: 14px; padding: 1rem 1.2rem; }
.rd-fd-distance-note > i { color: var(--rd-accent); font-size: 1.4rem; margin-top: .15rem; }
.rd-fd-distance-note strong { font-size: .9rem; }
.rd-fd-distance-note p { margin: .3rem 0 0; color: var(--rd-muted); font-size: .74rem; line-height: 1.5; }
:root[data-bs-theme="dark"] .rd-fd-timeline { color: #e0edfa; background: #254865; border-color: #3a6b88; }
:root[data-bs-theme="dark"] .rd-fd-years-labels span { color: #bed7e8; }
:root[data-bs-theme="dark"] .rd-fd-years-labels span.rd-fd-selected-year { color: #fff; }
:root[data-bs-theme="dark"] .rd-fd-period-pink { color: #fff; background: #643d62; border-color: #795174; }
:root[data-bs-theme="dark"] .rd-fd-period-blue { color: #fff; background: #46446a; border-color: #68638b; }
:root[data-bs-theme="dark"] .rd-fd-period-label, :root[data-bs-theme="dark"] .rd-fd-period-value { color: #ecdfef; }
:root[data-bs-theme="dark"] .rd-fd-map-viewport { background: #24353b; }
@media (max-width: 1150px) {
    .rd-fd-ranking-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1060px) {
    .rd-fd-hero-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .rd-fd-hero-metric:nth-child(2) { border-right: 0; }
    .rd-fd-hero-metric:nth-child(-n+2) { border-bottom: 1px solid var(--rd-border); }
    .rd-fd-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 780px) {
    .rd-fd-ranking-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .rd-fd-period-grid { grid-template-columns: 1fr; }
    .rd-fd-detail-grid { grid-template-columns: 1fr; }
    .rd-fd-delay-panel { grid-column: auto; }
    .rd-fd-delay-comparison { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .rd-fd-map-viewport { height: 390px; }
    .rd-fd-map-heading, .rd-fd-map-caption { padding: .75rem .85rem; }
    .rd-fd-map-data-status { padding: 0 .85rem .8rem; }
    .rd-fd-map-legend { gap: .45rem .8rem; }
    .rd-fd-donut-content { gap: .65rem; }
    .rd-fd-donut { width: 205px; height: 205px; flex-basis: 205px; }
    .rd-fd-donut-core { width: 146px; height: 146px; }
    .rd-fd-donut-legend { flex-basis: auto; }
    .rd-fd-stats .rd-home-heading { flex-direction: column; align-items: flex-start; gap: .7rem; }
    .rd-statistics .rd-stats-filter { width: 100%; }
    .rd-fd-hero-metric { padding: .9rem; }
    .rd-fd-hero-metric > strong { font-size: 1.8rem; }
    .rd-fd-metric-symbol { right: .75rem; top: .75rem; }
    .rd-fd-ranking-grid { grid-template-columns: minmax(0, 1fr); }
    .rd-fd-ranking-top { min-height: 0; padding: 1.2rem; }
    .rd-fd-ranking-list { gap: .55rem; }
    .rd-fd-timeline { padding: 1rem .8rem; }
    .rd-fd-section-heading > span { display: none; }
    .rd-fd-period-card { padding: 1rem .8rem; }
    .rd-fd-period-label { font-size: .59rem; }
}


/* Clickable totals link to the whole list instead of ending at the top seven. */
.rd-fd-ranking-details {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .15rem;
    color: var(--rd-text);
    text-decoration: none;
}
.rd-fd-ranking-details:hover,
.rd-fd-ranking-details:focus-visible { color: var(--rd-accent); text-decoration: none; }
.rd-fd-ranking-details:hover span,
.rd-fd-ranking-details:focus-visible span { text-decoration: underline; }
.rd-fd-ranking-details:focus-visible { outline: 2px solid var(--rd-accent); outline-offset: 3px; border-radius: 3px; }
.rd-fd-ranking-details i { font-size: .7rem; vertical-align: middle; margin-left: .25rem; opacity: .6; }
.rd-fd-metric-unit { font-size: .47em; font-weight: 650; letter-spacing: 0; vertical-align: baseline; }

/* Entire rankings: ordinary accessible HTML table, no capped result count. */
.rd-fd-back-link {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    color: var(--rd-accent);
    font-size: .8rem;
    font-weight: 650;
    text-decoration: none;
    margin: 0 0 .85rem;
}
.rd-fd-back-link:hover { text-decoration: underline; }
.rd-fd-fullranking-panel {
    background: var(--rd-surface);
    border: 1px solid var(--rd-border);
    border-radius: 15px;
    padding: 1.1rem 1.25rem;
    color: var(--rd-text);
}
.rd-fd-fullranking-toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}
.rd-fd-fullranking-toolbar strong { font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.rd-fd-fullranking-toolbar p { color: var(--rd-muted); font-size: .78rem; margin: .25rem 0 0; }
.rd-fd-fullranking-toolbar label { display: block; font-size: .74rem; font-weight: 650; color: var(--rd-muted); margin-bottom: .25rem; }
.rd-fd-fullranking-toolbar input { width: min(100%, 310px); background: var(--rd-surface); border-color: var(--rd-border); color: var(--rd-text); }
.rd-fd-fullranking-empty { color: var(--rd-muted); font-size: .85rem; padding: 1.2rem .4rem; }
.rd-fd-fullranking-scroll { overflow-x: auto; max-height: min(70vh, 880px); overflow-y: auto; }
.rd-fd-fullranking-table { border-collapse: collapse; width: 100%; min-width: 540px; font-size: .83rem; }
.rd-fd-fullranking-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--rd-surface);
    color: var(--rd-muted);
    border-bottom: 2px solid var(--rd-border);
    font-size: .73rem;
    text-align: left;
    padding: .65rem .8rem;
}
.rd-fd-fullranking-table td { padding: .7rem .8rem; border-bottom: 1px solid var(--rd-border); vertical-align: middle; }
.rd-fd-fullranking-table tbody tr:hover { background: color-mix(in srgb, var(--rd-accent) 6%, transparent); }
.rd-fd-fullranking-rank { width: 4rem; color: var(--rd-muted); font-variant-numeric: tabular-nums; }
.rd-fd-fullranking-label { width: 55%; overflow-wrap: anywhere; }
.rd-fd-fullranking-track { height: .5rem; width: 100%; min-width: 80px; background: var(--rd-border); border-radius: 3px; overflow: hidden; }
.rd-fd-fullranking-track span { display: block; height: 100%; background: var(--rd-accent); border-radius: 3px; }
.rd-fd-fullranking-count { text-align: right !important; font-variant-numeric: tabular-nums; width: 6rem; font-weight: 700; }
@media (max-width: 600px) {
    .rd-fd-fullranking-panel { padding: .75rem; }
    .rd-fd-fullranking-toolbar > div:last-child { width: 100%; }
    .rd-fd-fullranking-toolbar input { width: 100%; }
}

/* Travelled source-track kilometres, deliberately separated from trip counts. */
.rd-fd-distance-section {
    margin-top: 1.4rem;
    padding: 1.35rem;
    border: 1px solid var(--rd-border);
    border-radius: 16px;
    background: var(--rd-surface);
    color: var(--rd-text);
}
.rd-fd-distance-totals {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: .85rem;
    margin: 1.1rem 0;
}
.rd-fd-distance-total, .rd-fd-distance-source {
    border: 1px solid var(--rd-border);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: .38rem;
}
.rd-fd-distance-total { background: color-mix(in srgb, var(--rd-accent) 9%, var(--rd-surface)); }
.rd-fd-distance-total small { font-size: .69rem; letter-spacing: .06em; color: var(--rd-muted); }
.rd-fd-distance-total strong { font-size: clamp(1.7rem, 3vw, 2.3rem); line-height: 1.1; }
.rd-fd-distance-source strong { font-size: 1.5rem; line-height: 1.2; }
.rd-fd-distance-total span, .rd-fd-distance-source span:last-child {
    color: var(--rd-muted); font-size: .75rem;
}
.rd-fd-distance-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .85rem;
    margin: 1rem 0;
}
.rd-fd-distance-period { min-width: 0; border: 1px solid var(--rd-border); border-radius: 12px; padding: .85rem; }
.rd-fd-distance-period h3 { font-size: .92rem; font-weight: 750; margin-bottom: .65rem; }
.rd-fd-distance-period table { border-collapse: collapse; width: 100%; font-size: .78rem; }
.rd-fd-distance-period th { font-weight: 500; text-align: left; color: var(--rd-muted); }
.rd-fd-distance-period td { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rd-fd-distance-period th, .rd-fd-distance-period td { padding: .33rem .12rem; border-bottom: 1px solid var(--rd-border); }
.rd-fd-distance-method, .rd-fd-distance-footer, .rd-fd-distance-empty, .rd-fd-distance-more {
    color: var(--rd-muted); font-size: .8rem; line-height: 1.55; margin: .7rem 0 0;
}
.rd-fd-distance-footer { display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem; }
@media (max-width: 1050px) { .rd-fd-distance-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) {
    .rd-fd-distance-totals, .rd-fd-distance-grid { grid-template-columns: 1fr; }
    .rd-fd-distance-section { padding: 1rem; }
}

/* Kilometerdiagramme teilen Layout und Farbschema mit den Reisegrafiken.
   Daily and weekly breakdowns below show exact values alongside scrollable bars. */
.rd-fd-distance-charts { display: grid; gap: 1rem; margin: 1.15rem 0; }
.rd-fd-distance-charts .rd-fd-timeline { margin-bottom: 0; }
.rd-fd-distance-month-chart .rd-fd-period-value { white-space: nowrap; font-size: .63rem; }
.rd-fd-distance-month-chart .rd-fd-period-bars { margin-top: .9rem; }
@media (max-width: 600px) {
    .rd-fd-distance-month-chart .rd-fd-period-value { font-size: .58rem; }
}

/* All historic days and weeks remain accessible without excessive height. */
.rd-fd-distance-scroll { max-height: 19rem; overflow-y: auto; scrollbar-gutter: stable; }
.rd-fd-map-data-status { font-variant-numeric: tabular-nums; }
.rd-fd-distance-empty .spinner-border { vertical-align: middle; }
.rd-fd-distance-period > p { color: var(--rd-muted); font-size: .8rem; }

/* Exact daily/ISO-week mileage bars, newest periods first. */
.rd-fd-distance-bar-list { display: grid; gap: .42rem; }
.rd-fd-distance-bar-row {
    display: grid;
    grid-template-columns: minmax(6.2rem, auto) minmax(0, 1fr) minmax(5.8rem, auto);
    align-items: center;
    column-gap: .7rem;
    min-height: 1.9rem;
    font-size: .76rem;
    font-variant-numeric: tabular-nums;
}
.rd-fd-distance-bar-row + .rd-fd-distance-bar-row {
    border-top: 1px solid var(--rd-border);
    padding-top: .38rem;
}
.rd-fd-distance-bar-label { color: var(--rd-muted); white-space: nowrap; }
.rd-fd-distance-bar-value { text-align: right; white-space: nowrap; font-weight: 650; }
.rd-fd-distance-bar-track {
    height: .75rem;
    border-radius: 4px;
    overflow: hidden;
    background: color-mix(in srgb, var(--rd-accent) 10%, var(--rd-surface));
}
.rd-fd-distance-bar-fill {
    height: 100%;
    border-radius: inherit;
    background: var(--rd-accent);
}
@media (max-width: 540px) {
    .rd-fd-distance-bar-row { grid-template-columns: 5.7rem minmax(0, 1fr) 5.5rem; gap: .35rem; font-size: .68rem; }
}
