.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

a {
    color: rgb(72 110 222);
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
}

h3#media-nav-container {
    font-size: 1.05rem;
}

.nowrap {
    white-space: nowrap;
}

div.external-links>a {
    text-decoration: underline;
}

blockquote:not(instagram-media) {
    background: #f9f9f9;
    border-left: 5px solid #ccc;
    margin: 1.5em 10px;
    padding: 0.5em 10px;
    border-radius: 5px;
}

div.media-caption>small>p {
    margin-bottom: 2px;
}

p.supporters {
    font-size: 1.2rem;
}

img.supporters-logo {
    height: 1.2rem;
}

.ukc-logo {
    height: 1rem;
}

.external-logo {
    height: 1.5rem;
}

a.no-link-underline {
    text-decoration: none;
    color: #212529;
}

.overflow-wrap {
    overflow-wrap: break-word;
}

.climber-info-box-right {
    float: right;
    width: 25%;
    height: auto;
    margin: 1rem;
}

.climber-info-box-left {
    float: left;
    width: 25%;
    height: auto;
}

tr.climber-info-item:last-child {
    border-color: white;
}

.featured-article {
    overflow: hidden;
    height: 20em;
}

.featured-article-long {
    overflow: hidden;
    height: 50em;
}

.featured-article-fade {
    background-image: linear-gradient(rgba(255, 255, 255, 0), rgb(255, 255, 255));
    height: 5em;
    margin-top: -5em;
    position: relative;
}

.wrapped {
    word-wrap: break-word;
}

div.crag-map,
div.summit-map {
    height: 30em;
}

video.library-video {
    width: 100%;
    height: auto;
}

code {
    white-space: pre-wrap;
}

.ascent-notes>h1 {
    font-size: 1.2rem;
}

.ascent-notes>h2 {
    font-size: 1.1rem;
}

.ascent-notes>h3 {
    font-size: 1.05rem;
}

.ascent-notes>h4 {
    font-size: 1rem;
}

.ascent-notes>h5 {
    font-size: 1rem;
}

.ascent-notes>h6 {
    font-size: 1rem;
}

div.ascent-grade-suggestions-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

tr.ascent.dnf>td:not(.year) {
    color: #888;
    opacity: 0.7;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 */
    padding-top: 25px;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Guessing game */

.clue {
    display: none;
}

/* Library collection */

div.library-thumbnail-container {
    height: 10rem;
    width: 10rem;
}

div.library-thumbnail-container img {
    height: 100%;
}

/* Threads */

div#threads_container>div.card.read {
    color: #888;
    opacity: 0.7;
}

div#posts_container>div.card.deleted {
    color: #888;
    opacity: 0.7;
}

.note-reactions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}

.note-reaction-badge {
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 1rem;
    padding: 0.15rem 0.5rem;
    font-size: 0.85rem;
    cursor: pointer;
    line-height: 1.4;
}

.note-reaction-badge:hover {
    background: #e4e4e4;
}

.note-reaction-badge.active {
    background: #d4e4f7;
    border-color: #7192BE;
}

.note-reaction-badge:disabled {
    cursor: default;
}

.note-add-reaction {
    background: none;
    border: 1px dashed #ccc;
    border-radius: 1rem;
    padding: 0.15rem 0.5rem;
    font-size: 0.85rem;
    cursor: pointer;
    color: #888;
    line-height: 1.4;
}

.note-add-reaction:hover {
    background: #f0f0f0;
    border-color: #aaa;
    color: #555;
}

/* ============================================
   Collapsible Ascent Table Rows
   ============================================ */

/* Clickable row styling */
tr.collapsible-row {
    cursor: pointer;
    transition: background-color 0.15s ease;
}

tr.collapsible-row:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

tr.collapsible-row:focus {
    outline: 2px solid #486EDE;
    outline-offset: -2px;
}

/* Chevron indicator and spacer for alignment */
.collapse-chevron-spacer {
    display: inline-block;
    width: 1.25rem;
    text-align: center;
}

.collapse-chevron-col {
    width: 1.5rem;
    text-align: center;
}

.collapse-chevron {
    display: inline-block;
    transition: transform 0.2s ease;
    color: #6c757d;
    font-size: 0.75rem;
}

tr.collapsible-row.collapsed .collapse-chevron {
    transform: rotate(-90deg);
}

/* Detail row collapse behavior */
tr.ascent-detail-row {
    transition: opacity 0.15s ease;
}

tr.ascent-detail-row:not(.show) {
    display: none;
}

/* Remove all row borders - tbody border handles separation between ascents */
tbody:has(> tr.ascent) td {
    border-top: none !important;
    border-bottom: none !important;
}

tbody:has(> tr.ascent) {
    border-bottom: var(--bs-border-width) solid var(--bs-border-color);
}

/* Prevent expanded notes from affecting column widths */
tr.ascent-detail-row>td {
    padding-top: 0;
    padding-bottom: 0;
    max-width: 0;
}

/* Notes styling - simple and connected to parent row */
tr.ascent-detail-row .ascent-notes {
    overflow-wrap: break-word;
    word-break: break-word;
    font-size: 0.9rem;
    color: #495057;
}

/* Subtitle styling - now in its own row */
.ascent-subtitle {
    display: block;
    padding-top: 0.25rem;
    overflow-wrap: break-word;
    word-break: break-word;
}

tr.ascent-subtitle-row td {
    padding-top: 0;
}

/* Fix route column width */
.ascent-route-col {
    min-width: 200px;
}

/* Expand/Collapse All toggle - minimal text link style */
.collapse-toggle-btn {
    background: none;
    border: none;
    padding: 0.25rem 0;
    font-size: 0.75rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: color 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.collapse-toggle-btn:hover {
    color: #495057;
    background: none;
    border: none;
}

.collapse-toggle-btn:focus {
    outline: none;
    box-shadow: none;
    color: #495057;
}

.collapse-toggle-btn::before {
    content: "\203A";
    font-size: 1rem;
    line-height: 1;
    transition: transform 0.2s ease;
}

.collapse-toggle-btn.expanded::before {
    transform: rotate(90deg);
}

/* Contributions Heatmap */
.contributions-heatmap-wrapper {
    position: relative;
    margin-bottom: 1rem;
    overflow-x: auto;
}

.contributions-heatmap-container {
    display: flex;
    gap: 4px;
}

.contributions-day-labels {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-top: 20px;
}

.contributions-day-label {
    height: 11px;
    font-size: 9px;
    color: #6c757d;
    line-height: 11px;
    text-align: right;
    padding-right: 4px;
}

.contributions-grid-container {
    display: flex;
    flex-direction: column;
}

.contributions-month-labels {
    position: relative;
    height: 20px;
}

.contributions-month-label {
    position: absolute;
    font-size: 10px;
    color: #6c757d;
}

.contributions-weeks {
    display: flex;
    gap: 2px;
}

.contributions-week {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.contributions-day {
    width: 11px;
    height: 11px;
    border-radius: 2px;
    outline: 1px solid rgba(27, 31, 35, 0.06);
    outline-offset: -1px;
}

.contributions-level-0 {
    background-color: #ebedf0;
}

.contributions-level-1 {
    background-color: #d4e4f7;
}

.contributions-level-2 {
    background-color: #b6d4f0;
}

.contributions-level-3 {
    background-color: #8dc1e8;
}

.contributions-level-4 {
    background-color: #6baed6;
}

.contributions-level-5 {
    background-color: #4a9bc9;
}

.contributions-level-6 {
    background-color: #2f7ebc;
}

.contributions-level-7 {
    background-color: #1c60a0;
}

.contributions-level-8 {
    background-color: #08306b;
}

.contributions-future {
    background-color: transparent;
    outline: none;
}

.contributions-legend {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
    margin-left: 28px;
    justify-content: flex-start;
}

.contributions-legend-label {
    font-size: 11px;
    color: #6c757d;
    margin: 0 4px;
}

.contributions-legend .contributions-day {
    cursor: default;
}

.contributions-tooltip {
    position: absolute;
    background-color: #24292f;
    color: #ffffff;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.sortable .drag-handle {
    cursor: move;
    color: #6c757d;
}

.sortable .drag-handle:hover {
    color: #000;
}

.sortable .dragging {
    opacity: 0.5;
}

.sortable tbody tr {
    transition: background-color 0.2s;
}

.sortable tbody tr:hover {
    background-color: #f8f9fa;
}

.report-chart {
    margin-bottom: 1.5rem;
}