/* Page baseline */
body {
    font-family: Arial, sans-serif;
    background-color: #f5f7fa;
    margin: 0;
    padding: 20px;
}

/* Top banner */
.top-banner {
    position: sticky;
    top: 0;
    z-index: 1000;

    margin: -20px -20px 20px;
    padding: 20px 20px 0;

    background-color: #f5f7fa;
    border-bottom: 2px solid #d0d4d9;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.06);
}

/* Tab container */
.tabs {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 6px;
}

/* Individual tab */
.tab {
    padding: 10px 18px;
    background: #e8dcc0;
    border: 1px solid #cbbf9e;
    border-bottom: none;
    border-radius: 6px 6px 0 0;

    font-size: 14px;
    font-weight: 600;
    color: #5a513c;

    text-decoration: none;   /* 👈 important */
    display: inline-block;
}

.tab:hover {
    background: #f2e8cf;
}

.tab.active {
    background: #f5ecd6;
    border-bottom: 2px solid white;
    position: relative;
    top: 2px;
}

/* Permanent Ko-fi support link */
.kofi-support-link {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    margin-left: 100px;
    margin-bottom: 3px;
    text-decoration: none;
}

.kofi-support-image {
    display: block;
    width: auto;
    height: 40px;
}

.kofi-support-link:hover .kofi-support-image {
    opacity: 0.88;
}

.beta-label {
    align-self: center;
    margin-left: 52px;
    color: #9ca3af;
    font-size: 1.7rem;
    font-style: italic;
    letter-spacing: 0.04em;
}

.summary-kofi-link {
    display: inline-flex;
    margin-left: 6px;
    vertical-align: middle;
}

.summary-kofi-cup {
    display: block;
    width: 32px;
    height: 32px;
}

.summary-kofi-link:hover .summary-kofi-cup {
    opacity: 0.88;
}

/* Dashboard container */
.dashboard {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
}

.dashboard-summary-row {
    box-sizing: border-box;
    display: flex;
    align-items: flex-end;
    position: relative;
    width: 1040px;
    max-width: calc(100vw - 40px);
}

.dashboard-subreddit-heading {
    position: absolute;
    left: 50%;
    bottom: 8px;
    transform: translateX(-50%);
    color: rgb(60, 60, 60);
    font-size: 24pt;
    font-weight: 600;
    line-height: 1.1;
    text-align: center;
    white-space: nowrap;
}

.analysis-timezone-control {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    color: rgb(60, 60, 60);
    font-size: 13px;
    white-space: nowrap;
}

.figure-caption-row {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    width: 1040px;
    max-width: calc(100vw - 40px);
}

.analysis-timezone-control label {
    font-weight: 600;
}

.analysis-timezone-control select {
    box-sizing: border-box;
    width: 205px;
    min-height: 34px;
    padding: 5px 30px 5px 9px;
    border: 1px solid rgb(190, 198, 204);
    border-radius: 6px;
    background-color: #ffffff;
    color: rgb(45, 55, 62);
    font: inherit;
}

.analysis-timezone-control select:focus-visible {
    outline: 2px solid rgb(104, 150, 54);
    outline-offset: 2px;
}

/* Metric card container */
.metric-card {
    display: inline-flex;
    flex-direction: column;
    align-items: center;

    padding: 16px 20px;

    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Main metric card for every metric type */
.metric-card {
    background-color: #ffffff;
    border-radius: 10px;
    padding: 16px 20px;

    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);

    display: flex;
    flex-direction: column;
    align-items: center;

    text-align: center;
}

/* Card-specific deep links */
.shareable-card {
    position: relative;
}

.shareable-card > .metric-label {
    box-sizing: border-box;
    max-width: 100%;
    padding-right: 82px;
    padding-left: 82px;
}

.copy-share-link {
    position: absolute;
    z-index: 4;
    top: 12px;
    right: 14px;
    display: inline-flex;
    align-items: center;
    width: 34px;
    height: 34px;
    padding: 6px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #52616b;
    font: 600 12px/1.2 Arial, sans-serif;
    cursor: pointer;
}

.copy-share-link:hover {
    color: #3f6425;
    background: rgba(104, 150, 54, 0.09);
}

.copy-share-link:focus-visible {
    outline: 2px solid #689636;
    outline-offset: 2px;
}

.copy-share-link svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

/* Hide the text node used by earlier cached button markup. */
.copy-share-link > span {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.copy-share-tooltip {
    position: absolute;
    z-index: 5;
    top: 53px;
    right: 14px;
    width: max-content;
    max-width: 180px;
    padding: 6px 8px;
    border-radius: 5px;
    background: #30383e;
    color: #ffffff;
    font: normal 12px/1.2 Arial, sans-serif;
    font-weight: normal;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-2px);
    transition:
        opacity 120ms ease,
        transform 120ms ease;
    visibility: hidden;
    white-space: nowrap;
}

.copy-share-link:hover + .copy-share-tooltip,
.copy-share-link:focus-visible + .copy-share-tooltip {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

.copy-share-link.copy-share-link-error {
    color: #a33a3a;
}

.shared-card-highlight {
    animation: shared-card-pulse 2.4s ease-out;
}

@keyframes shared-card-pulse {
    0%, 22% {
        box-shadow:
            0 0 0 4px rgba(104, 150, 54, 0.38),
            0 2px 8px rgba(0, 0, 0, 0.08);
    }

    100% {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }
}

@media (prefers-reduced-motion: reduce) {
    .shared-card-highlight {
        animation: none;
        outline: 3px solid rgba(104, 150, 54, 0.55);
        outline-offset: 2px;
    }
}

/* Optional label (we'll use this next step) */
.metric-label {
    font-size: 14px;
    color: rgb(60, 60, 60);
    margin-bottom: 5px;
    font-weight: bold;
}

.dashboard-title {
    font-size: 28px;
    color: rgb(60, 60, 60);
}

.figure-caption {
    color: rgb(90, 90, 90);
    font-size: 13px;
    font-style: italic;
}

.figure-block {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.figure-explanation {
    max-width: 900px;
    color: rgb(60, 60, 60);
    font-size: 14px;
    line-height: 1.6;
    text-align: left;
}

.figure-explanation p {
    margin: 4px 0 8px;
}

.cluster-example-card {
    box-sizing: border-box;
    width: 1240px;
    max-width: calc(100vw - 40px);
    border: 1px solid #b8a77d;
}

.cluster-example-svg {
    display: block;
    flex: 0 0 auto;
    width: 100%;
    height: auto;
    font-family: Arial, sans-serif;
}

.cluster-example-guides line {
    stroke: #c8cdd2;
    stroke-width: 1;
    stroke-dasharray: 5 5;
}

.cluster-example-axis,
.cluster-example-ticks line {
    stroke: #58636b;
    stroke-width: 1.5;
}

.cluster-example-minute-labels text,
.cluster-example-axis-title,
.cluster-example-category-labels text {
    fill: rgb(60, 60, 60);
    text-anchor: middle;
}

.cluster-example-minute-labels text {
    font-size: 12px;
}

.cluster-example-axis-title {
    font-size: 14px;
    font-weight: 600;
}

.cluster-example-posts circle {
    fill: #858d94;
}

.cluster-example-post-legend circle {
    fill: #858d94;
}

.cluster-example-post-legend text {
    fill: rgb(60, 60, 60);
    font-size: 12px;
    text-anchor: start;
}

.cluster-example-category-labels text {
    font-size: 12px;
    font-weight: 600;
}

.cluster-example-noncluster-label {
    fill: #697279;
    font-size: 12px;
    font-style: italic;
    text-anchor: middle;
}

.cluster-inline-marker {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin: 0 3px;
    border-radius: 50%;
    vertical-align: baseline;
}

.cluster-bin-0-5 {
    background-color: rgb(160, 120, 200);
}

.cluster-bin-5-10 {
    background-color: rgb(104, 150, 54);
}

.cluster-bin-10-15 {
    background-color: rgb(247, 196, 31);
}

.cluster-bin-15-20 {
    background-color: rgb(100, 100, 160);
}


.metric-value {
    font-size: 48px;
    font-weight: bold;
    color: #2c3e50;
}

#pie-chart {
    width: 350px;
    height: 350px;
}

.metric-content {
    display: inline-block;   /* 👈 shrink-wrap magic */
}

/* Top Ten Chart */
#top10-chart {
    width: 1000px;
    height: 400px;
}

/* 7-day running average chart */
#running-avg-chart {
    width: 1500px;
    height: 450px;
}

/* Clustered posting */
#cluster-chart {
    width: 1200px;
    height: 450px;
}

/* Daily raw post count */
#stacked-chart {
    width: 1500px;
    height: 450px;
}

/* Daily post count percentages*/
#stacked-percent-chart {
    width: 1500px;
    height: 450px;
}


/* SUMMARY styles */
.summary-text {
    text-align: left;
    max-width: 800px;
}

.summary-text p {
    margin-bottom: 14px;
    line-height: 1.6;
    color: #2c3e50;
}

.summary-text ul {
    margin-left: 20px;
    margin-bottom: 14px;
}

.summary-text li {
    margin-bottom: 6px;
}

.methodology-questions {
    color: #2c3e50;
}

/* METHODOLOGY styles */
.code-block {
    text-align: left;
    background: #1e1e1e;
    color: #d4d4d4;

    padding: 20px;
    border-radius: 8px;

    font-family: Consolas, monospace;
    font-size: 13px;
    line-height: 1.5;

    overflow-x: auto;
    white-space: pre;
}

/* METHODOLOGY summary styles */
.methodology-text {
    max-width: 900px;
    text-align: left;
}

.methodology-list {
    margin: 0;
    padding-left: 28px;

    color: #2c3e50;
    line-height: 1.6;
}

.methodology-list li {
    margin-bottom: 14px;
    padding-left: 6px;
}

.script-link {
    margin: 20px 0 0;
    font-weight: 600;
    color: #2c3e50;
}

.script-link a {
    color: #4f7f2b;
}

.arctic-shift-comparison {
    margin-top: 36px;
    color: #2c3e50;
}

.arctic-shift-comparison h2 {
    margin: 0 0 10px;
    color: rgb(60, 60, 60);
    font-size: 20px;
}

.arctic-shift-comparison p {
    margin: 0 0 14px;
    line-height: 1.6;
}

.comparison-timeline-card {
    box-sizing: border-box;
    width: 100%;
    margin: 22px 0 14px;
    padding: 12px;
    overflow-x: auto;
    background: #ffffff;
    border: 1px solid #b8a77d;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.comparison-timeline-svg {
    display: block;
    width: 100%;
    min-width: 760px;
    height: auto;
    font-family: Arial, sans-serif;
}

.comparison-timeline-heading {
    fill: rgb(60, 60, 60);
    font-size: 17px;
    font-weight: 600;
    text-anchor: middle;
}

.comparison-timeline-subheading {
    fill: #69747c;
    font-size: 12px;
    font-style: italic;
    text-anchor: middle;
}

.comparison-timeline-guides line {
    stroke: #c8cdd2;
    stroke-width: 1;
    stroke-dasharray: 5 5;
}

.comparison-timeline-event-labels text {
    fill: rgb(60, 60, 60);
    font-size: 11px;
    font-weight: 600;
    text-anchor: middle;
}

.comparison-timeline-event-labels .comparison-timeline-removal-label {
    fill: #a33a3a;
}

.comparison-timeline-lane-labels text {
    fill: rgb(60, 60, 60);
    font-size: 13px;
    font-weight: 600;
}

.comparison-timeline-axis {
    stroke: #7f898f;
    stroke-width: 2;
}

.comparison-timeline-arrowhead {
    fill: #7f898f;
}

.comparison-timeline-direction-labels text {
    fill: #52616b;
    font-size: 11px;
    font-weight: 600;
    text-anchor: middle;
}

.comparison-timeline-capture,
.comparison-timeline-recheck {
    fill: #689636;
    stroke: #ffffff;
    stroke-width: 2;
}

.comparison-timeline-recheck {
    fill: #4f7f2b;
    stroke: rgb(90, 90, 90);
    stroke-width: 1;
}

.comparison-timeline-open,
.comparison-timeline-missed {
    fill: #ffffff;
    stroke: #7f898f;
    stroke-width: 2;
}

.comparison-timeline-posts .comparison-post-1,
.comparison-timeline-posts .comparison-post-2,
.comparison-timeline-posts .comparison-post-3,
.comparison-timeline-posts .comparison-post-4,
.comparison-timeline-posts .comparison-post-5,
.comparison-timeline-posts .comparison-post-6,
.comparison-timeline-posts .comparison-post-7,
.comparison-timeline-legend .comparison-post-1,
.comparison-timeline-legend .comparison-post-2,
.comparison-timeline-legend .comparison-post-3,
.comparison-timeline-legend .comparison-post-4,
.comparison-timeline-legend .comparison-post-5,
.comparison-timeline-legend .comparison-post-6,
.comparison-timeline-legend .comparison-post-7 {
    stroke: #ffffff;
    stroke-width: 1.5;
}

.comparison-post-1 {
    fill: #4c78a8;
}

.comparison-post-2 {
    fill: #f58518;
}

.comparison-post-3 {
    fill: #b279a2;
}

.comparison-post-4 {
    fill: #54a24b;
}

.comparison-post-5 {
    fill: #eeca3b;
}

.comparison-post-6 {
    fill: #72b7b2;
}

.comparison-post-7 {
    fill: #e45756;
}

.comparison-timeline-collection-ring {
    fill: #ffffff;
    stroke: #4f7f2b;
    stroke-width: 2;
}

.comparison-timeline-excluded-posts path {
    fill: none;
    stroke: #a33a3a;
    stroke-width: 3;
    stroke-linecap: round;
}

.comparison-timeline-visible-marker circle {
    fill: #4f7f2b;
    stroke: rgb(90, 90, 90);
    stroke-width: 1;
}

.comparison-timeline-visible-marker path {
    fill: none;
    stroke: #ffffff;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.comparison-timeline-display-flow > circle {
    fill: #4f7f2b;
    stroke: rgb(90, 90, 90);
    stroke-width: 1;
}

.comparison-timeline-display-flow > line {
    stroke: #7f898f;
    stroke-width: 1.5;
}

.comparison-timeline-display-flow > text {
    fill: #52616b;
    font-size: 11px;
    text-anchor: middle;
}

.comparison-timeline-display-flow .comparison-timeline-flow-label {
    fill: rgb(60, 60, 60);
    font-weight: 600;
    text-anchor: start;
}

.comparison-timeline-removal-marker line,
.comparison-timeline-not-collected {
    stroke: #a33a3a;
    stroke-width: 3;
    stroke-linecap: round;
}

.comparison-timeline-callout,
.comparison-timeline-unavailable,
.comparison-timeline-legend text {
    fill: #52616b;
    font-size: 11px;
    text-anchor: middle;
}

.comparison-timeline-unavailable {
    fill: #7f898f;
    font-style: italic;
}

.comparison-timeline-legend text {
    text-anchor: start;
}

.comparison-timeline-legend .comparison-timeline-scale-note {
    fill: #7f898f;
    font-style: italic;
    text-anchor: end;
}

.comparison-source-note {
    color: #52616b;
    font-size: 12px;
}

.comparison-source-note a {
    color: #4f7f2b;
    font-weight: 600;
}

.data-collection-notes {
    margin-top: 36px;
    color: #2c3e50;
}

.data-collection-notes h2 {
    margin: 0 0 10px;
    color: rgb(60, 60, 60);
    font-size: 20px;
}

.data-collection-notes p {
    margin: 0 0 14px;
    line-height: 1.6;
}

.data-collection-notes table {
    width: 100%;
    border-collapse: collapse;
    line-height: 1.5;
    font-size: 10pt;
    font-style: italic;
}

.data-collection-notes th,
.data-collection-notes td {
    padding: 10px 12px;
    border: none;
    text-align: left;
    vertical-align: top;
}

.data-collection-notes th {
    background: transparent;
    color: rgb(60, 60, 60);
    font-weight: 600;
}

.data-collection-notes th:first-child,
.data-collection-notes td:first-child {
    width: 145px;
    white-space: nowrap;
}

.data-collection-notes th:nth-child(2),
.data-collection-notes td:nth-child(2) {
    width: 190px;
}

/* Subreddit selector card */
.dashboard-introduction {
    max-width: 900px;
    margin: 0 0 16px;
    color: rgb(60, 60, 60);
    font-size: 15px;
    line-height: 1.6;
}

.dashboard-introduction a {
    color: #4f7f2b;
    font-weight: 600;
}

.subreddit-selector {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;

    margin: 12px 0 14px;
    padding: 16px 20px;

    background-color: #ffffff;
    border-radius: 10px;

    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Subreddit selector label */
.subreddit-selector-label {
    font-size: 14px;
    font-weight: bold;
    color: rgb(60, 60, 60);
}

/* Visible subreddit choices */
.subreddit-button-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(145px, 1fr));
    gap: 8px;
}

.subreddit-option {
    padding: 10px 12px;
    font-family: Arial, sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    text-align: center;
    white-space: nowrap;
    background-color: #f8fafc;
    border: 1px solid #d0d4d9;
    border-radius: 7px;
    cursor: pointer;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease;
}

.subreddit-option:hover {
    background-color: #ffffff;
    border-color: #a2aab1;
}

.subreddit-option:focus-visible {
    outline: none;
    border-color: #689636;
    box-shadow:
        0 0 0 3px rgba(104, 150, 54, 0.18);
}

.subreddit-option.active {
    background-color: #f5ecd6;
    border-color: #689636;
    color: #3f6425;
}

/* Subreddit comparison charts */
#daily-posts-comparison-card {
    box-sizing: border-box;
    width: 1240px;
    max-width: calc(100vw - 40px);
}

.daily-posts-comparison-layout {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    width: 100%;
}

.daily-posts-chart-wrapper {
    flex: 1 1 auto;
    min-width: 0;
}

#daily-posts-comparison-chart {
    width: 100%;
    height: 520px;
}

.daily-posts-controls {
    flex: 0 0 180px;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    padding-top: 24px;
    text-align: left;
}

.daily-posts-provisional-option {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid #d7dde2;
    color: rgb(60, 60, 60);
    font-size: 13px;
    line-height: 1.3;
    cursor: pointer;
}

.daily-posts-provisional-option input {
    flex: 0 0 auto;
    width: 15px;
    height: 15px;
    margin: 1px 0 0;
    accent-color: #c58a16;
    cursor: pointer;
}

.daily-posts-provisional-help {
    align-self: flex-start;
    margin: 4px 0 0 22px;
    font-size: 12px;
    color: rgb(120, 120, 120);
    text-decoration: none;
}

.daily-posts-provisional-help:visited,
.daily-posts-provisional-help:hover,
.daily-posts-provisional-help:active {
    color: rgb(120, 120, 120);
    text-decoration: none;
}

#provisional-data {
    scroll-margin-top: 80px;
}

.daily-posts-date-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 36px;
    margin: 4px 24px 8px 50px;
    padding-top: 14px;
    border-top: 1px solid #d7dde2;
}

.daily-posts-date-control {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: rgb(60, 60, 60);
    font-size: 13px;
}

.daily-posts-date-control span {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.daily-posts-date-control output {
    font-weight: bold;
}

.daily-posts-date-control input[type="range"] {
    width: 100%;
    margin: 0;
    accent-color: #689636;
    cursor: pointer;
}

.daily-posts-controls-title {
    margin-bottom: 10px;
    color: rgb(60, 60, 60);
    font-size: 14px;
    font-weight: bold;
    text-decoration: underline;
}

.daily-posts-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.daily-posts-option {
    display: flex;
    align-items: center;
    gap: 7px;
    color: rgb(60, 60, 60);
    font-size: 13px;
    cursor: pointer;
}

.daily-posts-option input {
    width: 15px;
    height: 15px;
    margin: 0;
    cursor: pointer;
}

#top10-share-comparison-chart {
    width: 800px;
    max-width: calc(100vw - 100px);
    height: 500px;
}

/* Top-three comparison pie charts */
.top-three-comparison-wrapper {
    max-width: calc(100vw - 40px);
    overflow-x: auto;
    padding-bottom: 4px;
}

.top-three-comparison-grid {
    display: grid;
    grid-template-columns: repeat(3, 390px);
    gap: 20px;

    width: max-content;
    align-items: start;
}

.comparison-pie-card {
    width: 390px;
    box-sizing: border-box;
    position: relative;
}

.top-x-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0 4px;
    color: rgb(60, 60, 60);
    font-size: 13px;
    font-weight: 600;
}

.top-x-selector select {
    min-width: 64px;
    padding: 6px 28px 6px 10px;
    border: 1px solid #c7ced4;
    border-radius: 7px;
    background-color: #ffffff;
    color: rgb(60, 60, 60);
    font: inherit;
    cursor: pointer;
}

/* Cross-subreddit contribution-group comparison */
.cross-subreddit-overlap-card {
    box-sizing: border-box;
    width: 900px;
    max-width: calc(100vw - 40px);
    align-items: stretch;
}

.cross-subreddit-overlap-card > .metric-label {
    text-align: center;
}

.cross-subreddit-overlap-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 12px;
    text-align: left;
}

.cross-subreddit-overlap-section {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.cross-subreddit-overlap-heading {
    color: rgb(60, 60, 60);
    font-size: 14px;
    font-weight: bold;
}

.cross-subreddit-overlap-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.cross-subreddit-overlap-row {
    display: grid;
    grid-template-columns: minmax(150px, 210px) 1fr;
    gap: 22px;
    align-items: baseline;
    padding: 5px 8px;
    border-bottom: 1px solid #edf0f2;
}

.cross-subreddit-overlap-username {
    color: rgb(60, 60, 60);
    font-family: Consolas, "Courier New", monospace;
    font-size: 13px;
    font-weight: 600;
}

.cross-subreddit-overlap-subreddits,
.cross-subreddit-overlap-empty {
    color: rgb(80, 80, 80);
    font-size: 13px;
}

@media (max-width: 620px) {
    .cross-subreddit-overlap-row {
        grid-template-columns: 1fr;
        gap: 3px;
    }
}

.comparison-pie-subreddit,
.subreddit-card-label {
    align-self: flex-start;
    margin: 0 0 8px;

    color: rgb(90, 90, 90);
    font-size: 13px;
    font-style: italic;
    font-weight: normal;
}

.comparison-pie-total {
    margin-top: 5px;

    color: #5a6770;
    font-size: 14px;
    font-weight: normal;
}

.comparison-pie-rank {
    align-self: flex-start;
    margin: -4px 0 8px;

    color: rgb(90, 90, 90);
    font-size: 13px;
    font-style: italic;
    font-weight: normal;
}

.comparison-pie-chart {
    width: 350px;
    height: 350px;
}

.comparison-pie-empty {
    display: flex;
    align-items: center;
    justify-content: center;

    color: #7f8c8d;
    font-size: 14px;
}

/* Poster-threshold comparison card */
.poster-threshold-layout {
    display: flex;
    align-items: flex-start;
    gap: 24px;
}

.poster-threshold-wrapper {
    max-width: calc(100vw - 300px);
    overflow-x: auto;
    padding-bottom: 4px;
}

.poster-ranking-controls {
    flex: 0 0 130px;
    padding: 12px 0 0;
    text-align: left;
}

.poster-ranking-controls-title {
    margin-bottom: 10px;
    color: rgb(60, 60, 60);
    font-size: 14px;
    font-weight: bold;
    text-decoration: underline;
}

.poster-ranking-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.poster-ranking-option {
    display: flex;
    align-items: center;
    gap: 7px;
    color: rgb(60, 60, 60);
    font-size: 13px;
    cursor: pointer;
}

.poster-ranking-option input {
    width: 15px;
    height: 15px;
    margin: 0;
    cursor: pointer;
}

/* Entire label/header/tile grid */
.poster-threshold-grid {
    display: grid;
    position: relative;

    grid-template-columns:
        190px
        repeat(12, 50px);

    grid-auto-rows: 50px;

    gap: 2px;

    width: max-content;
}

/* Empty upper-left grid position */
.poster-threshold-corner {
    width: 190px;
    height: 50px;
}

/* Percentage headings */
.poster-threshold-header {
    width: 50px;
    height: 50px;

    display: flex;
    align-items: center;
    justify-content: center;

    box-sizing: border-box;

    font-size: 12px;
    font-weight: bold;
    color: #5a6770;
}

/* Subreddit labels */
.poster-threshold-row-label {
    width: 190px;
    height: 50px;

    display: flex;
    align-items: center;
    justify-content: flex-end;

    box-sizing: border-box;

    padding-right: 10px;

    font-size: 13px;
    font-weight: 600;
    color: #2c3e50;

    white-space: nowrap;
}

/* Individual 50px by 50px data tile */
.poster-threshold-tile {
    position: relative;

    width: 50px;
    height: 50px;

    display: flex;
    align-items: center;
    justify-content: center;

    box-sizing: border-box;

    border: 1px solid #d7dce1;
    border-radius: 3px;

    color: #263238;

    font-size: 12px;
    font-weight: bold;

    text-shadow: none;

    cursor: default;
}

.poster-threshold-tile-text {
    position: relative;
    z-index: 3;
}

/* Neutral endpoint: every subreddit is at 100%. */
.poster-threshold-neutral-tile {
    background-color: #e8edf1;
    color: #263238;
    border-color: #c7ced4;
}

/* Optional lines connect each rank across the 10%-90% columns. */
.poster-threshold-line-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;

    width: 100%;
    height: 100%;

    overflow: visible;
    pointer-events: none;
}

.poster-threshold-line-overlay.is-hidden {
    display: none;
}

.poster-threshold-rank-line {
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Unique-poster column */
.unique-posters-header {
    line-height: 1.1;
    text-align: center;

    border-left:
        2px solid #b8c0c7;
}

.unique-posters-tile {
    background-color: #e8edf1;

    color: #263238;

    border-color: #c7ced4;
    border-left:
        2px solid #b8c0c7;

    text-shadow: none;
}

/* Estimated weekly-post context column */
.weekly-posts-header {
    line-height: 1.1;
    text-align: center;

    border-left:
        1px solid #c7ced4;
}

.weekly-posts-tile {
    background-color: #dfe9f0;

    color: #263238;

    border-color: #c3ced6;
    border-left:
        1px solid #b8c4cc;

    text-shadow: none;
}

@media (max-width: 1050px) {
    .daily-posts-comparison-layout {
        flex-direction: column;
    }

    .daily-posts-controls {
        flex-basis: auto;
        width: 100%;
        padding-top: 0;
    }

    .daily-posts-checkboxes {
        display: grid;
        grid-template-columns:
            repeat(3, minmax(150px, 1fr));
    }

    .poster-threshold-layout {
        flex-direction: column;
    }

    .poster-threshold-wrapper {
        max-width: calc(100vw - 100px);
    }

    .poster-ranking-controls {
        padding-top: 0;
    }

    .poster-ranking-checkboxes {
        display: grid;
        grid-template-columns:
            repeat(4, minmax(85px, 1fr));
    }
}

@media (max-width: 650px) {
    .daily-posts-date-controls {
        grid-template-columns: 1fr;
        gap: 14px;
        margin-right: 12px;
        margin-left: 12px;
    }

    .daily-posts-checkboxes {
        grid-template-columns:
            repeat(2, minmax(130px, 1fr));
    }
}
