/* ===========================================================================
   Cusco Monthly Planner: clear, linear travel-planning interface
   ========================================================================== */

/* Planner canvas: keeps the full experience bright and visually continuous. */
.csp-tour-category .cusco-monthly-planner {
    --cmp-red: #d71920;
    --cmp-red-dark: #aa1117;
    --cmp-ink: #1d1d1b;
    --cmp-copy: #555550;
    --cmp-muted: #767671;
    --cmp-line: #deded9;
    --cmp-line-strong: #bfbfba;
    --cmp-soft: #f7f7f4;
    --cmp-red-soft: #fff3f3;
    --cmp-white: #ffffff;
    --cmp-radius: 7px;
    position: relative;
    overflow: hidden;
    border-block: 1px solid var(--cmp-line);
    background: var(--cmp-white);
    scroll-margin-top: 92px;
}

/* Browser surfaces: aligns selection, focus and scrollbars with the planner palette. */
.csp-tour-category .cusco-monthly-planner ::selection {
    color: var(--cmp-white);
    background: var(--cmp-red);
}

.csp-tour-category .cusco-monthly-planner :focus-visible {
    outline: 3px solid rgba(215, 25, 32, 0.28);
    outline-offset: 3px;
}

.csp-tour-category .cusco-monthly-planner * {
    scrollbar-color: #a9a9a3 var(--cmp-soft);
    scrollbar-width: thin;
}

.csp-tour-category .cusco-monthly-planner *::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.csp-tour-category .cusco-monthly-planner *::-webkit-scrollbar-track {
    background: var(--cmp-soft);
}

.csp-tour-category .cusco-monthly-planner *::-webkit-scrollbar-thumb {
    border: 2px solid var(--cmp-soft);
    border-radius: var(--cmp-radius);
    background: #a9a9a3;
}

/* Shared typography: establishes one restrained hierarchy across the planner. */
.csp-tour-category .cmp-region-heading h3,
.csp-tour-category .cmp-chart-heading h3,
.csp-tour-category .cmp-month-summary h3,
.csp-tour-category .cmp-packing-card h3,
.csp-tour-category .cmp-data-card h3,
.csp-tour-category .cmp-highlights-heading h3,
.csp-tour-category .cmp-highlight-card h4,
.csp-tour-category .cmp-methodology h3 {
    margin: 0;
    color: var(--cmp-ink);
    font-family: var(--font-heading, "Metromedium", sans-serif);
    font-weight: 700;
    letter-spacing: -0.015em;
    line-height: 1.16;
}

/* Planner heading: pairs the promise with a compact destination control. */
.csp-tour-category .cmp-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(290px, 380px);
    gap: clamp(32px, 6vw, 84px);
    align-items: end;
    margin-bottom: 38px;
}

.csp-tour-category .cmp-heading-copy {
    max-width: 760px;
}

.csp-tour-category .cmp-title {
    max-width: 720px;
    margin: 0 0 18px;
    color: var(--cmp-ink);
    font-family: var(--font-heading, "Metromedium", sans-serif);
    font-size: clamp(2.2rem, 4.2vw, 4.6rem) !important;
    font-weight: 500;
    letter-spacing: -0.03em;
    line-height: 0.99;
}

.csp-tour-category .cmp-intro {
    max-width: 70ch;
    margin: 0;
    color: var(--cmp-copy);
    font-size: clamp(1rem, 1.25vw, 1.12rem);
    line-height: 1.72;
}

/* Select controls: presents destination, horizon and priority with matching geometry. */
.csp-tour-category .cmp-destination-control,
.csp-tour-category .cmp-period-control,
.csp-tour-category .cmp-priority-control {
    display: grid;
    gap: 8px;
}

.csp-tour-category .cmp-destination-control label,
.csp-tour-category .cmp-period-control label,
.csp-tour-category .cmp-priority-control label {
    margin: 0;
    color: var(--cmp-ink);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    line-height: 1.2;
    text-transform: uppercase;
}

.csp-tour-category .cmp-destination-control > span {
    color: var(--cmp-muted);
    font-size: 0.77rem;
    line-height: 1.45;
}

.csp-tour-category .cmp-select-wrap {
    position: relative;
}

.csp-tour-category .cmp-select-wrap > i {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 15px;
    color: var(--cmp-red);
    pointer-events: none;
    transform: translateY(-50%);
}

.csp-tour-category .cmp-select-wrap select,
.csp-tour-category .cmp-period-control select,
.csp-tour-category .cmp-priority-control select {
    width: 100%;
    min-height: 50px;
    border: 1px solid var(--cmp-line-strong);
    border-radius: var(--cmp-radius);
    color: var(--cmp-ink);
    background-color: var(--cmp-white);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: border-color 180ms ease, background-color 180ms ease;
}

.csp-tour-category .cmp-select-wrap select {
    padding: 0 42px;
}

.csp-tour-category .cmp-period-control select,
.csp-tour-category .cmp-priority-control select {
    padding: 0 38px 0 13px;
}

.csp-tour-category .cmp-select-wrap select:hover,
.csp-tour-category .cmp-period-control select:hover,
.csp-tour-category .cmp-priority-control select:hover,
.csp-tour-category .cmp-select-wrap select:focus,
.csp-tour-category .cmp-period-control select:focus,
.csp-tour-category .cmp-priority-control select:focus {
    border-color: var(--cmp-red);
    background-color: #fffdfd;
}

/* Workspace: contains the controls, timeline, chart and evidence without extra decoration. */
.csp-tour-category .cmp-workspace {
    position: relative;
}

/* Filter toolbar: uses horizontal rules and whitespace instead of a heavy container. */
.csp-tour-category .cmp-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(440px, 0.72fr);
    gap: 34px;
    align-items: end;
    padding-block: 24px;
    border-block: 1px solid var(--cmp-line);
}

.csp-tour-category .cmp-metric-filter {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.csp-tour-category .cmp-metric-filter legend {
    float: none;
    width: auto;
    margin: 0 0 11px;
    padding: 0;
    color: var(--cmp-ink);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    line-height: 1.2;
    text-transform: uppercase;
}

.csp-tour-category .cmp-metric-filter legend span {
    margin-left: 7px;
    color: var(--cmp-muted);
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
}

.csp-tour-category .cmp-metric-options {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.csp-tour-category .cmp-metric-option {
    position: relative;
    margin: 0;
    cursor: pointer;
}

.csp-tour-category .cmp-metric-option input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.csp-tour-category .cmp-metric-option span {
    display: inline-flex;
    min-height: 44px;
    gap: 8px;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border: 1px solid var(--cmp-line-strong);
    border-radius: var(--cmp-radius);
    color: #484844;
    background: var(--cmp-white);
    font-size: 0.79rem;
    font-weight: 700;
    line-height: 1.1;
    transition: color 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

/* Metric color key: repeats one stable category color in controls, chart and legend. */
.csp-tour-category .cmp-metric-option span::before {
    flex: 0 0 18px;
    width: 18px;
    height: 3px;
    border-radius: var(--cmp-radius);
    background: var(--cmp-metric-color);
    content: "";
    transition: height 180ms ease;
}

.csp-tour-category .cmp-metric-option input:checked + span {
    border-color: var(--cmp-metric-color);
    color: var(--cmp-metric-color);
    background: var(--cmp-metric-soft);
}

.csp-tour-category .cmp-metric-option input:checked + span::before {
    height: 5px;
}

.csp-tour-category .cmp-metric-option:hover span {
    border-color: var(--cmp-metric-color);
    background: var(--cmp-metric-soft);
}

.csp-tour-category .cmp-metric-option input:focus-visible + span {
    outline: 3px solid var(--cmp-metric-color);
    outline-offset: 3px;
}

.csp-tour-category .cmp-filter-message {
    min-height: 1.2em;
    margin: 7px 0 0;
    color: var(--cmp-red-dark);
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1.25;
}

.csp-tour-category .cmp-select-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

/* Timeline region: gives the planning score a simple heat-line treatment. */
.csp-tour-category .cmp-month-region {
    margin-top: 30px;
    padding: 24px;
    border: 1px solid var(--cmp-line);
    border-radius: var(--cmp-radius);
    background: var(--cmp-white);
}

.csp-tour-category .cmp-region-heading,
.csp-tour-category .cmp-chart-heading,
.csp-tour-category .cmp-highlights-heading {
    display: flex;
    gap: 24px;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 19px;
}

.csp-tour-category .cmp-region-heading h3,
.csp-tour-category .cmp-chart-heading h3,
.csp-tour-category .cmp-highlights-heading h3 {
    font-size: 1.28rem !important;
}

.csp-tour-category .cmp-region-heading p,
.csp-tour-category .cmp-chart-heading p,
.csp-tour-category .cmp-highlights-heading p {
    max-width: 70ch;
    margin: 6px 0 0;
    color: var(--cmp-muted);
    font-size: 0.83rem;
    line-height: 1.5;
}

.csp-tour-category .cmp-heat-key {
    display: flex;
    flex: 0 0 auto;
    gap: 6px;
    align-items: center;
    color: var(--cmp-muted);
    font-size: 0.7rem;
    font-weight: 700;
}

.csp-tour-category .cmp-heat-swatch {
    width: 21px;
    height: 7px;
    border: 1px solid rgba(215, 25, 32, 0.2);
    border-radius: var(--cmp-radius);
}

.csp-tour-category .cmp-heat-swatch-low {
    background: rgba(215, 25, 32, 0.08);
}

.csp-tour-category .cmp-heat-swatch-mid {
    background: rgba(215, 25, 32, 0.3);
}

.csp-tour-category .cmp-heat-swatch-high {
    background: rgba(215, 25, 32, 0.66);
}

/* Month trail: supports the full 26-month horizon inside a contained scroller. */
.csp-tour-category .cmp-month-trail {
    display: flex;
    gap: 7px;
    padding: 3px 2px 11px;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x proximity;
}

.csp-tour-category .cmp-month-button {
    position: relative;
    display: grid;
    flex: 0 0 104px;
    min-height: 82px;
    align-content: space-between;
    justify-items: start;
    gap: 4px;
    padding: 12px 11px 13px;
    overflow: hidden;
    border: 1px solid var(--cmp-line);
    border-radius: var(--cmp-radius);
    color: var(--cmp-ink);
    background: var(--cmp-white);
    font: inherit;
    text-align: left;
    cursor: pointer;
    scroll-snap-align: start;
    transition: border-color 180ms ease, color 180ms ease, background-color 180ms ease, transform 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

.csp-tour-category .cmp-month-button::after {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 4px;
    border-radius: var(--cmp-radius);
    background: rgba(215, 25, 32, var(--cmp-heat-opacity, 0.24));
    content: "";
    transition: height 220ms cubic-bezier(0.16, 1, 0.3, 1), background-color 180ms ease;
}

.csp-tour-category .cmp-month-button:hover {
    border-color: var(--cmp-red);
    transform: translateY(-2px);
}

.csp-tour-category .cmp-month-button.is-active {
    border-color: var(--cmp-red);
    color: var(--cmp-red-dark);
    background: var(--cmp-red-soft);
}

.csp-tour-category .cmp-month-button.is-active::after {
    height: 6px;
    background: var(--cmp-red);
}

.csp-tour-category .cmp-month-name {
    color: inherit;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.csp-tour-category .cmp-month-score {
    color: inherit;
    font-size: 1.1rem;
    font-variant-numeric: tabular-nums;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.csp-tour-category .cmp-month-rain {
    color: var(--cmp-muted);
    font-size: 0.65rem;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}

/* Chart panel: uses a white plotting field and precise Cartesian labels. */
.csp-tour-category .cmp-chart-panel {
    margin-top: 18px;
    padding: clamp(22px, 3vw, 32px);
    border: 1px solid var(--cmp-line);
    border-radius: var(--cmp-radius);
    background: var(--cmp-white);
}

.csp-tour-category .cmp-chart-period,
.csp-tour-category [data-cmp-highlights-period] {
    display: inline-flex;
    min-height: 32px;
    align-items: center;
    padding: 6px 10px;
    border: 1px solid var(--cmp-line-strong);
    border-radius: var(--cmp-radius);
    color: var(--cmp-copy);
    background: var(--cmp-white);
    font-size: 0.71rem;
    font-weight: 800;
    white-space: nowrap;
}

.csp-tour-category .cmp-chart-viewport {
    position: relative;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-inline: contain;
}

.csp-tour-category .cmp-chart {
    display: block;
    max-width: none;
    height: 400px;
    overflow: visible;
}

.csp-tour-category .cmp-chart-grid {
    stroke: #e5e5e1;
    stroke-width: 1;
}

.csp-tour-category .cmp-chart-tick {
    stroke: #b8b8b2;
    stroke-width: 1;
}

.csp-tour-category .cmp-chart-axis-label {
    fill: #6b6b66;
    font-family: "Metromedium", "Trebuchet MS", sans-serif;
    font-size: 11px;
    font-weight: 700;
}

.csp-tour-category .cmp-chart-month-label {
    fill: #4d4d49;
    font-size: 10px;
}

.csp-tour-category .cmp-chart-axis-title {
    fill: var(--cmp-ink);
    font-family: "Metromedium", "Trebuchet MS", sans-serif;
    font-size: 12px;
    font-weight: 800;
}

.csp-tour-category .cmp-chart-selection-line {
    stroke: rgba(215, 25, 32, 0.52);
    stroke-dasharray: 4 5;
    stroke-width: 1;
}

.csp-tour-category .cmp-chart-line {
    fill: none;
    stroke: var(--cmp-series-color);
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.4;
    transition: stroke-dashoffset 520ms cubic-bezier(0.16, 1, 0.3, 1);
}

.csp-tour-category .cmp-chart-point-group {
    cursor: pointer;
}

.csp-tour-category .cmp-chart-point-hit {
    fill: transparent;
    pointer-events: all;
}

.csp-tour-category .cmp-chart-point {
    fill: var(--cmp-white);
    stroke: var(--cmp-series-color);
    stroke-width: 3;
    transform-box: fill-box;
    transform-origin: center;
    transition: fill 170ms ease, stroke-width 170ms ease, transform 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

.csp-tour-category .cmp-chart-point-group:hover .cmp-chart-point,
.csp-tour-category .cmp-chart-point-group:focus .cmp-chart-point,
.csp-tour-category .cmp-chart-point-group.is-selected .cmp-chart-point {
    fill: var(--cmp-series-color);
    stroke-width: 2;
    transform: scale(1.35);
}

.csp-tour-category .cmp-chart-point-group:focus {
    outline: none;
}

/* Animated point tooltip: explains the exact X and Y meaning on hover or keyboard focus. */
.csp-tour-category .cmp-chart-tooltip {
    position: fixed;
    z-index: 1100;
    display: grid;
    width: min(310px, calc(100vw - 24px));
    gap: 4px;
    padding: 13px 14px;
    border: 1px solid #30302e;
    border-radius: var(--cmp-radius);
    color: var(--cmp-white);
    background: #232321;
    box-shadow: 0 12px 30px rgba(29, 29, 27, 0.18);
    opacity: 0;
    pointer-events: none;
    transform: translateY(6px);
    transition: opacity 160ms ease, transform 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

.csp-tour-category .cmp-chart-tooltip.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.csp-tour-category .cmp-chart-tooltip strong {
    font-size: 0.82rem;
}

.csp-tour-category .cmp-chart-tooltip > span {
    display: flex;
    gap: 8px;
    align-items: center;
    color: var(--cmp-white);
    font-size: 0.88rem;
    font-variant-numeric: tabular-nums;
    font-weight: 800;
}

/* Tooltip series key: preserves the button-to-point color relationship on hover. */
.csp-tour-category .cmp-tooltip-value::before {
    flex: 0 0 18px;
    width: 18px;
    height: 3px;
    border-radius: var(--cmp-radius);
    background: var(--cmp-series-color);
    content: "";
}

.csp-tour-category .cmp-chart-tooltip small {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.7rem;
    line-height: 1.45;
}

/* Axis guide: repeats the Cartesian semantics outside the scrollable SVG. */
.csp-tour-category .cmp-axis-guide {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 4px;
}

.csp-tour-category .cmp-axis-guide > span {
    display: flex;
    min-width: 0;
    gap: 9px;
    align-items: baseline;
    padding-top: 10px;
    border-top: 1px solid var(--cmp-line);
    color: var(--cmp-muted);
    font-size: 0.75rem;
    line-height: 1.4;
}

.csp-tour-category .cmp-axis-guide strong {
    color: var(--cmp-red-dark);
    font-size: 0.82rem;
}

/* Chart legend: shows exact selected-month values next to their line colors. */
.csp-tour-category .cmp-chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.csp-tour-category .cmp-legend-item {
    display: flex;
    min-height: 42px;
    align-items: center;
    gap: 9px;
    padding: 8px 11px;
    border: 1px solid var(--cmp-series-color);
    border-radius: var(--cmp-radius);
    color: var(--cmp-muted);
    background: var(--cmp-series-soft);
    font-size: 0.73rem;
}

.csp-tour-category .cmp-legend-mark {
    flex: 0 0 20px;
    width: 20px;
    height: 3px;
    border-radius: var(--cmp-radius);
    background: var(--cmp-series-color);
}

.csp-tour-category .cmp-legend-content {
    display: grid;
    gap: 1px;
    color: var(--cmp-series-color);
}

.csp-tour-category .cmp-legend-content strong {
    color: var(--cmp-ink);
    font-size: 0.8rem;
    font-variant-numeric: tabular-nums;
}

/* Selected-month summary: links the analytical state to a practical packing note. */
.csp-tour-category .cmp-month-summary {
    display: grid;
    grid-template-columns: minmax(220px, 0.62fr) minmax(0, 1fr) minmax(250px, 0.72fr);
    gap: 24px;
    align-items: center;
    margin-top: 18px;
    padding: 24px 0;
    border-block: 1px solid var(--cmp-line);
}

.csp-tour-category .cmp-month-summary h3 {
    font-size: clamp(1.42rem, 2.1vw, 1.9rem) !important;
}

.csp-tour-category .cmp-month-summary > p {
    margin: 0;
    color: var(--cmp-copy);
    line-height: 1.65;
}

.csp-tour-category .cmp-summary-packing {
    display: flex;
    gap: 11px;
    align-items: flex-start;
    padding: 13px 14px;
    border: 1px solid var(--cmp-line);
    border-radius: var(--cmp-radius);
    color: #454541;
    background: var(--cmp-soft);
    font-size: 0.8rem;
    line-height: 1.5;
}

.csp-tour-category .cmp-summary-packing i {
    margin-top: 3px;
    color: var(--cmp-red);
}

/* Packing checklist: turns the selected month's climate references into a practical preparation card. */
.csp-tour-category .cmp-packing-card {
    margin-top: 18px;
    padding: clamp(20px, 2.8vw, 30px);
    border: 1px solid var(--cmp-line);
    border-radius: var(--cmp-radius);
    background: #fcfcfa;
}

/* Packing header: keeps the month and completion state visible without a heavy dashboard treatment. */
.csp-tour-category .cmp-packing-heading {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 14px;
    align-items: start;
}

.csp-tour-category .cmp-packing-icon {
    display: inline-flex;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--cmp-line-strong);
    border-radius: var(--cmp-radius);
    color: var(--cmp-red);
    background: var(--cmp-white);
}

.csp-tour-category .cmp-packing-heading h3 {
    margin: 0;
    font-size: 1.25rem !important;
}

.csp-tour-category .cmp-packing-heading h3 span {
    color: var(--cmp-red-dark);
}

.csp-tour-category .cmp-packing-heading p {
    max-width: 68ch;
    margin: 6px 0 0;
    color: var(--cmp-muted);
    font-size: 0.82rem;
    line-height: 1.5;
}

.csp-tour-category .cmp-packing-progress {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    padding: 6px 10px;
    border: 1px solid var(--cmp-line-strong);
    border-radius: var(--cmp-radius);
    color: var(--cmp-ink);
    background: var(--cmp-white);
    font-size: 0.82rem;
    font-variant-numeric: tabular-nums;
    font-weight: 800;
    white-space: nowrap;
}

/* Checklist rows: use separators and native checkboxes instead of nested cards. */
.csp-tour-category .cmp-packing-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 24px;
    margin: 22px 0 0;
    padding: 0;
    border-block: 1px solid var(--cmp-line);
    list-style: none;
}

.csp-tour-category .cmp-packing-list li {
    min-width: 0;
}

.csp-tour-category .cmp-packing-item {
    display: grid;
    min-height: 100%;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    padding: 15px 2px;
    border-bottom: 1px solid var(--cmp-line);
    cursor: pointer;
    transition: color 180ms ease, opacity 180ms ease;
}

.csp-tour-category .cmp-packing-list li:nth-last-child(-n + 2) .cmp-packing-item {
    border-bottom: 0;
}

.csp-tour-category .cmp-packing-item input {
    width: 20px;
    height: 20px;
    margin: 2px 0 0;
    border-radius: var(--cmp-radius);
    accent-color: var(--cmp-red);
    cursor: pointer;
}

.csp-tour-category .cmp-packing-copy {
    display: grid;
    min-width: 0;
    gap: 4px;
}

.csp-tour-category .cmp-packing-copy strong {
    color: var(--cmp-ink);
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.4;
}

.csp-tour-category .cmp-packing-copy small {
    color: var(--cmp-muted);
    font-size: 0.82rem;
    line-height: 1.5;
}

.csp-tour-category .cmp-packing-item:hover .cmp-packing-copy strong {
    color: var(--cmp-red-dark);
}

.csp-tour-category .cmp-packing-item.is-checked {
    opacity: 0.62;
}

.csp-tour-category .cmp-packing-item.is-checked strong {
    text-decoration: line-through;
    text-decoration-thickness: 1px;
}

.csp-tour-category .cmp-packing-loading {
    grid-column: 1 / -1;
    padding: 18px 2px;
    color: var(--cmp-muted);
    font-size: 0.82rem;
}

/* Packing footer: explains the planning limit and keeps source and reset actions together. */
.csp-tour-category .cmp-packing-footer {
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
}

.csp-tour-category .cmp-packing-footer > p {
    max-width: 74ch;
    margin: 0;
    color: var(--cmp-copy);
    font-size: 0.82rem;
    line-height: 1.55;
}

.csp-tour-category .cmp-packing-actions {
    display: flex;
    flex: 0 0 auto;
    gap: 8px;
    align-items: center;
}

.csp-tour-category .cmp-packing-actions a,
.csp-tour-category .cmp-packing-actions button {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    padding: 8px 11px;
    border: 1px solid var(--cmp-line-strong);
    border-radius: var(--cmp-radius);
    color: var(--cmp-ink);
    background: var(--cmp-white);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1.25;
    text-decoration: none;
    cursor: pointer;
    transition: color 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.csp-tour-category .cmp-packing-actions a:hover,
.csp-tour-category .cmp-packing-actions a:focus-visible,
.csp-tour-category .cmp-packing-actions button:hover:not(:disabled),
.csp-tour-category .cmp-packing-actions button:focus-visible:not(:disabled) {
    border-color: var(--cmp-red);
    color: var(--cmp-red-dark);
    background: var(--cmp-red-soft);
}

.csp-tour-category .cmp-packing-actions button:disabled {
    color: var(--cmp-muted);
    background: var(--cmp-soft);
    cursor: not-allowed;
    opacity: 0.7;
}

/* Evidence grid: keeps factual cards white, flat and proportionate to their content. */
.csp-tour-category .cmp-evidence-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.csp-tour-category .cmp-data-card {
    min-width: 0;
    padding: clamp(19px, 2.4vw, 26px);
    border: 1px solid var(--cmp-line);
    border-radius: var(--cmp-radius);
    background: var(--cmp-white);
}

.csp-tour-category .cmp-climate-card {
    grid-column: span 7;
}

.csp-tour-category .cmp-visitors-card {
    grid-column: span 5;
}

.csp-tour-category .cmp-best-card,
.csp-tour-category .cmp-festival-card,
.csp-tour-category .cmp-moon-card {
    grid-column: span 4;
}

.csp-tour-category .cmp-nature-card {
    grid-column: span 6;
}

/* Evidence headings: uses one compact icon system without adding color blocks. */
.csp-tour-category .cmp-card-heading {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 17px;
}

.csp-tour-category .cmp-card-icon {
    display: inline-flex;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--cmp-line);
    border-radius: var(--cmp-radius);
    color: var(--cmp-red);
    background: var(--cmp-white);
}

.csp-tour-category .cmp-data-card h3 {
    font-size: 1.08rem !important;
}

.csp-tour-category .cmp-card-context {
    margin: 5px 0 0;
    color: var(--cmp-red-dark);
    font-size: 0.79rem;
    font-weight: 800;
    line-height: 1.35;
}

.csp-tour-category .cmp-card-lead,
.csp-tour-category .cmp-data-card > p {
    margin: 0;
    color: var(--cmp-copy);
    line-height: 1.62;
}

/* Climate metrics: uses thin separators instead of nested filled tiles. */
.csp-tour-category .cmp-climate-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0 14px;
    margin: 20px 0 0;
    border-top: 1px solid var(--cmp-line);
}

.csp-tour-category .cmp-climate-metrics div {
    min-width: 0;
    padding: 13px 0;
    border-bottom: 1px solid var(--cmp-line);
}

.csp-tour-category .cmp-climate-metrics dt {
    margin: 0 0 5px;
    color: var(--cmp-muted);
    font-size: 0.66rem;
    font-weight: 800;
    line-height: 1.25;
    text-transform: uppercase;
}

.csp-tour-category .cmp-climate-metrics dd {
    margin: 0;
    color: var(--cmp-ink);
    font-size: 0.95rem;
    font-variant-numeric: tabular-nums;
    font-weight: 900;
    line-height: 1.25;
}

/* Visitor estimate: distinguishes the projection from the actual 2025 baseline. */
.csp-tour-category .cmp-visitor-number {
    display: block;
    margin-top: 8px;
    color: var(--cmp-ink);
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-variant-numeric: tabular-nums;
    font-weight: 900;
    letter-spacing: -0.035em;
    line-height: 1;
}

.csp-tour-category .cmp-visitor-level {
    display: block;
    margin-top: 8px;
    color: var(--cmp-red-dark);
    font-size: 0.74rem;
    font-weight: 900;
    text-transform: uppercase;
}

.csp-tour-category .cmp-visitor-scale {
    height: 7px;
    margin: 17px 0;
    overflow: hidden;
    border-radius: var(--cmp-radius);
    background: #ecece8;
}

.csp-tour-category .cmp-visitor-scale span {
    display: block;
    width: var(--cmp-visitor-width, 0%);
    height: 100%;
    border-radius: var(--cmp-radius);
    background: var(--cmp-red);
    transition: width 420ms cubic-bezier(0.16, 1, 0.3, 1);
}

.csp-tour-category .cmp-card-note {
    color: var(--cmp-muted) !important;
    font-size: 0.76rem;
}

/* Best-match card: keeps the score prominent without a saturated background. */
.csp-tour-category .cmp-best-card {
    border-color: #d8b2b4;
    background: #fffafa;
}

.csp-tour-category .cmp-best-score {
    display: flex;
    align-items: baseline;
    margin: 16px 0 12px;
    color: var(--cmp-red-dark);
}

.csp-tour-category .cmp-best-score strong {
    font-size: clamp(2.8rem, 5vw, 4.2rem);
    font-variant-numeric: tabular-nums;
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 0.9;
}

.csp-tour-category .cmp-best-score span {
    margin-left: 7px;
    color: var(--cmp-muted);
    font-weight: 800;
}

/* Festival and moon cards: keeps dates legible in the same light system. */
.csp-tour-category .cmp-festival-date {
    display: block;
    margin-bottom: 12px;
    color: var(--cmp-red-dark);
    font-size: 0.8rem;
    font-weight: 900;
}

/* Festival source: exposes the official schedule only for dated special events. */
.csp-tour-category .cmp-festival-source {
    display: inline-flex;
    width: fit-content;
    margin-top: 12px;
    color: var(--cmp-red-dark);
    font-size: 0.76rem;
    font-weight: 900;
    line-height: 1.35;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
}

.csp-tour-category .cmp-festival-source:hover,
.csp-tour-category .cmp-festival-source:focus-visible {
    color: var(--cmp-red);
}

.csp-tour-category .cmp-festival-source[hidden] {
    display: none;
}

.csp-tour-category .cmp-moon-card {
    position: relative;
    overflow: hidden;
}

.csp-tour-category .cmp-moon-card .cmp-card-heading,
.csp-tour-category .cmp-moon-card > strong,
.csp-tour-category .cmp-moon-card > p {
    position: relative;
    z-index: 1;
}

.csp-tour-category .cmp-moon-card > strong {
    display: block;
    max-width: 290px;
    margin-bottom: 10px;
    color: var(--cmp-ink);
    font-size: 1.02rem;
    line-height: 1.45;
}

.csp-tour-category .cmp-moon-card > p {
    max-width: 38ch;
    color: var(--cmp-muted);
    font-size: 0.79rem;
}

.csp-tour-category .cmp-moon-visual {
    position: absolute;
    top: 22px;
    right: 24px;
    color: #edede9;
    font-size: 5.8rem;
    line-height: 1;
    transition: color 220ms ease, transform 320ms cubic-bezier(0.16, 1, 0.3, 1);
}

.csp-tour-category .cmp-moon-card:hover .cmp-moon-visual {
    color: #e2e2dc;
    transform: translateY(-3px);
}

/* Nature cards: retains a subtle distinction while remaining on a clear surface. */
.csp-tour-category .cmp-nature-card {
    background: #fcfcfa;
}

.csp-tour-category .cmp-nature-card .cmp-card-icon {
    color: var(--cmp-ink);
}

/* Monthly highlights: shows exactly four useful destination cards for the selected month. */
.csp-tour-category .cmp-highlights {
    margin-top: 30px;
    padding-top: 28px;
    border-top: 1px solid var(--cmp-line);
}

.csp-tour-category .cmp-highlight-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.csp-tour-category .cmp-highlight-card {
    display: flex;
    min-width: 0;
    min-height: 100%;
    flex-direction: column;
    padding: 20px;
    border: 1px solid var(--cmp-line);
    border-radius: var(--cmp-radius);
    background: var(--cmp-white);
    transition: border-color 180ms ease, transform 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

.csp-tour-category .cmp-highlight-card:hover {
    border-color: var(--cmp-red);
    transform: translateY(-2px);
}

.csp-tour-category .cmp-highlight-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 13px;
    color: var(--cmp-muted);
    font-size: 0.67rem;
    font-weight: 800;
    line-height: 1.35;
    text-transform: uppercase;
}

.csp-tour-category .cmp-highlight-meta span + span::before {
    margin-right: 5px;
    content: "·";
}

.csp-tour-category .cmp-highlight-card h4 {
    font-size: 1.06rem !important;
}

.csp-tour-category .cmp-highlight-area {
    margin: 5px 0 14px;
    color: var(--cmp-red-dark);
    font-size: 0.76rem;
    font-weight: 800;
}

.csp-tour-category .cmp-highlight-reason {
    margin: 0 0 12px;
    color: var(--cmp-ink);
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1.5;
}

.csp-tour-category .cmp-highlight-description {
    margin: 0 0 18px;
    color: var(--cmp-copy);
    font-size: 0.78rem;
    line-height: 1.55;
}

.csp-tour-category .cmp-highlight-card a {
    margin-top: auto;
    color: var(--cmp-red-dark);
    font-size: 0.75rem;
    font-weight: 900;
    text-decoration: underline;
    text-decoration-color: rgba(170, 17, 23, 0.35);
    text-underline-offset: 4px;
    transition: color 180ms ease, text-decoration-color 180ms ease;
}

.csp-tour-category .cmp-highlight-card a:hover,
.csp-tour-category .cmp-highlight-card a:focus-visible {
    color: var(--cmp-red);
    text-decoration-color: currentColor;
}

/* Methodology footer: keeps assumptions and official sources visible beside the data. */
.csp-tour-category .cmp-methodology {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 28px;
    margin-top: 24px;
    padding: 24px 0 0;
    border-top: 1px solid var(--cmp-line);
}

.csp-tour-category .cmp-methodology h3 {
    margin-bottom: 8px;
    font-size: 1rem !important;
}

.csp-tour-category .cmp-methodology p {
    max-width: 70ch;
    margin: 0;
    color: var(--cmp-copy);
    font-size: 0.8rem;
    line-height: 1.62;
}

.csp-tour-category .cmp-source-links {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    align-content: flex-start;
    justify-content: flex-end;
}

.csp-tour-category .cmp-source-links a {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    padding: 7px 10px;
    border: 1px solid var(--cmp-line-strong);
    border-radius: var(--cmp-radius);
    color: var(--cmp-ink);
    background: var(--cmp-white);
    font-size: 0.71rem;
    font-weight: 800;
    text-decoration: underline;
    text-decoration-color: transparent;
    text-underline-offset: 3px;
    transition: color 180ms ease, border-color 180ms ease, text-decoration-color 180ms ease;
}

.csp-tour-category .cmp-source-links a:hover,
.csp-tour-category .cmp-source-links a:focus-visible {
    border-color: var(--cmp-red);
    color: var(--cmp-red-dark);
    text-decoration-color: currentColor;
}

/* Large-tablet layout: reduces evidence density and keeps highlight cards readable. */
@media (max-width: 1199px) {
    .csp-tour-category .cmp-toolbar {
        grid-template-columns: 1fr;
    }

    .csp-tour-category .cmp-select-controls {
        max-width: 720px;
    }

    .csp-tour-category .cmp-climate-metrics {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .csp-tour-category .cmp-best-card,
    .csp-tour-category .cmp-festival-card {
        grid-column: span 6;
    }

    .csp-tour-category .cmp-moon-card {
        grid-column: span 12;
    }

    .csp-tour-category .cmp-highlight-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Compact layout: stacks narrative blocks without changing the chart interaction. */
@media (max-width: 991px) {
    .csp-tour-category .cmp-heading,
    .csp-tour-category .cmp-month-summary,
    .csp-tour-category .cmp-methodology {
        grid-template-columns: 1fr;
    }

    .csp-tour-category .cmp-heading {
        gap: 24px;
    }

    .csp-tour-category .cmp-destination-control {
        max-width: 520px;
    }

    .csp-tour-category .cmp-month-summary {
        gap: 15px;
    }

    .csp-tour-category .cmp-climate-card,
    .csp-tour-category .cmp-visitors-card {
        grid-column: span 12;
    }

    .csp-tour-category .cmp-source-links {
        justify-content: flex-start;
    }

    .csp-tour-category .cmp-packing-footer {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* Mobile layout: keeps all long datasets inside their own horizontal scrollers. */
@media (max-width: 767px) {
    .csp-tour-category .cusco-monthly-planner {
        scroll-margin-top: 82px;
    }

    .csp-tour-category .cmp-heading {
        margin-bottom: 28px;
    }

    .csp-tour-category .cmp-title {
        font-size: clamp(2.1rem, 12vw, 3.5rem) !important;
        line-height: 1;
    }

    .csp-tour-category .cmp-select-controls,
    .csp-tour-category .cmp-axis-guide {
        grid-template-columns: 1fr;
    }

    .csp-tour-category .cmp-region-heading,
    .csp-tour-category .cmp-chart-heading,
    .csp-tour-category .cmp-highlights-heading {
        display: grid;
        gap: 12px;
        align-items: start;
    }

    .csp-tour-category .cmp-heat-key {
        flex-wrap: wrap;
    }

    .csp-tour-category .cmp-month-region,
    .csp-tour-category .cmp-chart-panel,
    .csp-tour-category .cmp-data-card {
        padding: 19px;
    }

    .csp-tour-category .cmp-month-trail {
        margin-inline: -19px;
        padding-inline: 19px;
    }

    .csp-tour-category .cmp-month-button {
        flex-basis: 96px;
    }

    .csp-tour-category .cmp-climate-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .csp-tour-category .cmp-best-card,
    .csp-tour-category .cmp-festival-card,
    .csp-tour-category .cmp-moon-card,
    .csp-tour-category .cmp-nature-card {
        grid-column: span 12;
    }

    .csp-tour-category .cmp-highlight-grid {
        grid-template-columns: 1fr;
    }

    .csp-tour-category .cmp-packing-heading,
    .csp-tour-category .cmp-packing-list {
        grid-template-columns: 1fr;
    }

    .csp-tour-category .cmp-packing-icon {
        display: none;
    }

    .csp-tour-category .cmp-packing-progress {
        justify-self: start;
    }

    .csp-tour-category .cmp-packing-list li:nth-last-child(-n + 2) .cmp-packing-item {
        border-bottom: 1px solid var(--cmp-line);
    }

    .csp-tour-category .cmp-packing-list li:last-child .cmp-packing-item {
        border-bottom: 0;
    }
}

/* Small-phone layout: prevents filters and source links from becoming cramped. */
@media (max-width: 479px) {
    .csp-tour-category .cmp-metric-options {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .csp-tour-category .cmp-metric-option span,
    .csp-tour-category .cmp-source-links a {
        width: 100%;
    }

    .csp-tour-category .cmp-source-links {
        display: grid;
        grid-template-columns: 1fr;
    }

    .csp-tour-category .cmp-packing-actions {
        width: 100%;
        align-items: stretch;
        flex-direction: column;
    }

    .csp-tour-category .cmp-packing-actions a,
    .csp-tour-category .cmp-packing-actions button {
        width: 100%;
    }

    .csp-tour-category .cmp-climate-metrics {
        grid-template-columns: 1fr;
    }
}

/* Reduced motion: preserves state changes while removing travel and drawn-path animation. */
@media (prefers-reduced-motion: reduce) {
    .csp-tour-category .cmp-month-button,
    .csp-tour-category .cmp-month-button::after,
    .csp-tour-category .cmp-metric-option span,
    .csp-tour-category .cmp-chart-line,
    .csp-tour-category .cmp-chart-point,
    .csp-tour-category .cmp-chart-tooltip,
    .csp-tour-category .cmp-visitor-scale span,
    .csp-tour-category .cmp-moon-visual,
    .csp-tour-category .cmp-highlight-card,
    .csp-tour-category .cmp-source-links a,
    .csp-tour-category .cmp-packing-item,
    .csp-tour-category .cmp-packing-actions a,
    .csp-tour-category .cmp-packing-actions button {
        transition-duration: 1ms;
    }

    .csp-tour-category .cmp-month-button:hover,
    .csp-tour-category .cmp-chart-point-group:hover .cmp-chart-point,
    .csp-tour-category .cmp-chart-point-group:focus .cmp-chart-point,
    .csp-tour-category .cmp-chart-point-group.is-selected .cmp-chart-point,
    .csp-tour-category .cmp-chart-tooltip,
    .csp-tour-category .cmp-chart-tooltip.is-visible,
    .csp-tour-category .cmp-moon-card:hover .cmp-moon-visual,
    .csp-tour-category .cmp-highlight-card:hover {
        transform: none;
    }
}

/* WordPress admin bar: keeps the planner anchor clear of both sticky bars. */
body.admin-bar .csp-tour-category .cusco-monthly-planner {
    scroll-margin-top: 124px;
}

@media (max-width: 782px) {
    body.admin-bar .csp-tour-category .cusco-monthly-planner {
        scroll-margin-top: 132px;
    }
}
